[openbox] openbox connected to remote display doesn't know X server gone

Anthony Thyssen A.Thyssen at griffith.edu.au
Thu Sep 24 02:57:10 EDT 2009


On Wed, 23 Sep 2009 16:13:10 -0500
Xavier Toth <txtoth at gmail.com> wrote:

| I'm running an X server for remote display purposes (some might call
| it an X terminal). The X client starts an openbox session when a user
| logs in. If I power off the X server box (something that shouldn't
| happen but can) when a user is logged in and then do a ps on the X
| client I see that openbox and a number of other processes started by
| the openbox session continue to run indefinitely. It appears that
| openbox doesn't know that it's X connection has been lost. Is there
| anything that can be done to cleanup these dead sessions?
| 
Many internet connections don't die when the remote server dies.
Basically it cant't tell if the host has disappeared, or is just
not talking.

When the host comes back online usally such connections get a error
about no such connection from the rebooted host, and the clients
die.  But only when the host comes back.

This is especially the case with X window UDP packets.

The other solution is that the socket connection be setup with a
'keepalive' flag.  This checks the connection for response, and
closed dead connections when the remote client 'dissapears'.

X windows via SSH tunneling encryption is the standard way X window
connections are handled these days.   And SSH has options to use
'keepalive' socket techniques.

In the system ssh_config or your personal $HOME/.ssh/config
add the following...

----------8<--------------
Host *
  TCPKeepAlive yes
  ServerAliveInterval 1800
----------8<--------------

the second item is not really needed, but sends an "I'm here"
type packet every 5 mins to prevent some firewalls and routers
from killing 'unused connections'.  that takes care of the opposite
problems.   connections dying when you aren't using them even though
nothing is wrong at either end.

Both flags are worth it.

PS: to ensure X windows is passed with SSH by default also include a
   ForwardX11 yes
in the above.


  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 -----------------------------------------------------------------------------
            Graffito in a MIT lavatory...
                   Heisenberg might have been here
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


More information about the openbox mailing list