[openbox] Logging out of Openbox

Jeremy Nickurak jeremy at nickurak.ca
Thu Feb 4 13:25:53 EST 2010

On Thu, Feb 4, 2010 at 11:15, Erik Iverson <eriki at ccbr.umn.edu> wrote:

> On my desk, I have a thin client that is configured to connect to an
> ancient version of Solaris, and I did not deem it worth my time to try to
> get openbox to compile on this machine.  So I compiled it on a comparatively
> new Linux server installation, and have as the last line of my .xinitrc:
> ssh -Y linux-server openbox-session
> (the -Y option enables X forwarding on this version of ssh)
> So, of course any programs that start over the X-forwarded ssh connection
> will have to be terminated before ssh returns, including anything I start up
> in autostart.sh.
> I will just have to come up with a script that will kill all X-forwarded
> apps before attempting to exit, or just do it myself.  That's probably not
> too bad since the list of applications that will be X-forwarded are pretty
> predictable in my case (the dock apps, panel stuff, etc.).

 What I do in a similar case is the following:

> ssh host "$SESSION; kill \$PPID"

where SESSION is openbox, or gnome, or whatever. This means that after the
SESSION exits, the parent process of the remote session (the user-specific
sshd fork) gets killed, killing ssh. This is exactly what happens in a
normal X session approach: once the session-controlling process terminates,
the X server terminates, forcibly killing anything else that was attached to
it. Just in this case, it's the ssh-tunneled X environment.

Note the backslash, to ensure that PPID is interpolated on the other
machine, not the local one.

Jeremy Nickurak -= Email/XMPP: jeremy at nickurak.ca =-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20100204/483cc90a/attachment.htm>

More information about the openbox mailing list