Re: Timeout on Xserver for client connections
- From: "jilerner@xxxxxxxxx" <jilerner@xxxxxxxxx>
- Date: 8 Jan 2006 09:21:09 -0800
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.
You need to replace two parameters (1) address of some host on LAN that
this script pings every second to check if laptop is connected, and
(2) name of your application.
#!/bin/sh
REMOTE=SomeHostOnLan
MY_CLIENT=MyClient
while true; do
X=`ping -c 1 -t 1 $REMOTE`
case $x in
"0 received") pkill $MY_CLIENT
echo >>/tmp/myloglication "App $MY_CLIENT killed on `date`"
;;
esac
sleep 1
done
# end of script
.
- Follow-Ups:
- Re: Timeout on Xserver for client connections
- From: Frode Tenneboe
- Re: Timeout on Xserver for client connections
- References:
- Timeout on Xserver for client connections
- From: Frode Tenneboe
- Timeout on Xserver for client connections
- Prev by Date: changing resource of another Xt window while it runs
- Next by Date: Re: Driver and display resolution
- Previous by thread: Re: Timeout on Xserver for client connections
- Next by thread: Re: Timeout on Xserver for client connections
- Index(es):
Relevant Pages
|