<div dir="ltr">I actually don't hang my X windows session on the window manager.<br>That way I can completely exit the window manager and restart or try out a different one as and when I like.<div>The window manager is after all just another X window application!<br><div><br></div><div>Instead I have a button on the bottom-right of the screen (actually its a xmessage window). </div><div><br></div><div>When pressed it pops up a set of 5 buttons (another xmessage window actually) asking what action you want.</div><div><br></div><div>Poweroff     -- shutdown computer completely</div><div>Reboot        -- equivelent to a power cycle </div><div>Restart       -- kill off ALL applications (including window manager), using xclosedown, and start them again<br>                      I use this after changing start up scripts, or just get a clean start without needing to login again</div><div>Logout        -- obvious</div><div>Cancel        -- return to the single 'logout' button.<br></div><div><br></div><div>There is also a timeout (built into xmessage) that can be configured to do ANY of the above actions</div><div>And the script tests the exit codes to see if the windows were killed by a xkill or xclosedown<br>and if they were just exit and logout as you would expect.<br><br>I created that script over 20 years ago  (date is 1 November 1994 but it started before that!)</div><div>And am still using it, basically unchanged since then.</div><div><br>I did need to install the package "xorg-x11-xinit-session" to get logins to call my ".xsession" script,</div></div><div>rather than a system provided one, but I have always used my own session script!</div><div><br></div><div><br></div><div>A Basic xlogout button (using any application it can find to generate the button), can be downloaded from...</div><div>   <a href="http://www.ict.griffith.edu.au/anthony/software/#xlogout">http://www.ict.griffith.edu.au/anthony/software/#xlogout</a></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 25, 2018 at 1:02 PM, MJ Fleming <span dir="ltr"><<a href="mailto:marstonfleming@gmail.com" target="_blank">marstonfleming@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">> Trying to do that _within openbox_ is like cutting a branch on which you are sitting<div><br></div><div>I don't feel that's actually true. I haven't looked at the source so I'm not totally sure what the function of openbox --exit is (I have read it tries to kill any open processes but don't quote me).</div><div><br></div><div>However, systemd certainly does permit processes to persist after logout. And under Debian, unless I have a very borked system, I'm able to execute something like openbox --exit && systemctl poweroff, I'm assuming it wouldn't be much to sleep the poweroff 10 seconds and pkill -u myuser after openbox --exit if you want to be really anal about it.</div><div><br></div><div>It's also possible to run X and openbox as systemd services which would then be conflicted by the poweroff or reboot targets in systemd, but I think that method has some caveats in itself. There are some instructions on Archwiki under the systemd article.</div><div><br></div><div>Just some thoughts.</div></div>
<br>______________________________<wbr>_________________<br>
openbox mailing list<br>
<a href="mailto:openbox@icculus.org">openbox@icculus.org</a><br>
<a rel="noreferrer" href="http://icculus.org/mailman/listinfo/openbox" target="_blank">https://protect-au.mimecast.<wbr>com/s/y7O3CBNZl8i7EWpAfzf6ix?<wbr>domain=icculus.org</a><br>
<br></blockquote></div><br></div>