Re: Timeout on Xserver for client connections



jilerner@xxxxxxxxx <jilerner@xxxxxxxxx> wrote:
> The easiest solution is to run a script in the background; the script
> that check checks periodically whether laptop is connected
> to the LAN, and if not, kills your client . Check the script below that
> does just this.

I'm already doing this. And it's not the client _process_ which is
the problem, but the client _window_ remotely displayed on the X-server.

As Alan Coopersmith pointed out, it takes two hours for the X-server to
notice that it has no connection to the owner of it's windows and
not until then removes them.

However, I did come up with a solution which works adequately:

#!/bin/sh
#Kill client if connection has been lost.

IP_ADDR1=192.168.0.2
IP_ADDR2=10.1.0.22

while true ; do
ping ${IP_ADDR1} 1 > /dev/null
STATUS_PING1=$?
ping ${IP_ADDR2} 1 > /dev/null
STATUS_PING2=$?

if [ $STATUS_PING1 != 0 -a $STATUS_PING2 != 0 ]; then
WID=`xwininfo -name ARTHUR|grep "Window id"|awk '{print $4}'`
xkill -id $WID > /dev/null
fi

sleep 15
done

(Runs on the X-server. Note that this particular variant has
two possible network connections. Hence two checks.)

-Frode

--
^ Frode Tennebø | email: Frode.Tennebo@xxxxxxxxxxxx ^
| Ericsson AS., N-1788 Halden | Phone: +47 67 25 09 39 |
| with Standard.Disclaimer; use Standard.Disclaimer; |
.



Relevant Pages

  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... kernel socket family. ... presentation side is left to the client. ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... Make it possible for the client socket to be used to go to more than one ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #2]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... Make it possible for the client socket to be used to go to more than one ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • Re: Remote Client Configuration
    ... the client computer to the SBS domain via connect computer wizard remotely. ... local network or via dial up VPN connection, you will use an local copy on ... connection is established, Group Policy is not applied during logon. ...
    (microsoft.public.windows.server.sbs)
  • RE: RWW not accessible over web
    ... You can install the ISA firewall client on the laptop. ... |> option will configure ISA to provide network security and packet ... Before you run the Configure E-mail and Internet Connection Wizard, ...
    (microsoft.public.windows.server.sbs)