Re: Timeout on Xserver for client connections



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

.



Relevant Pages

  • Re: Application Hang when Domain is not present
    ... It would seem to me that the LAN side of these computers is badly set-up. ... Having persistent network drive-mappings will cause problems such as ... No DC logon, no script, no mappings, no trouble. ... When the laptop is off site and as long as they are not connected to ...
    (microsoft.public.windowsxp.general)
  • Re: HP G60-249WM Notebook overheats (on lenny)
    ... This laptop came with Vista installed, ... tuning certain parameters of the Nvidia driver. ... Except for the part about writing a script, ... overheating problems than the radeon and the vesa/framebuffer drivers. ...
    (Debian-User)
  • solved: started by user with ~/ on vfat: cannot find a window manager
    ... and because the laptop was installed only ... the laptop doesn't have this offending script.) ... VFAT home directories is apparently misleading, ... >> mounted the partition), I took to mounting these partitions during ...
    (comp.os.linux.x)
  • Re: Authorization levels and login scripts
    ... have disappeared along with the laptop. ... > of the sensitive data will be stuff that is from the network and not ... It's a bit of a silly exercise, but I don't make the decisions ... >> in how you set it up, then run your script from the logon script. ...
    (microsoft.public.scripting.vbscript)
  • Re: Move computer and Laptop to correct OU
    ... MsgBox asking if its weather a desktop and laptop and then ask for the ... ' Retrieve Distinguished Name of current computer. ... A script could use ADO to retrieve the sAMAccountName of all computers in ...
    (microsoft.public.scripting.vbscript)