On Tuesday, 5 October 2004 08:23, Eilert wrote:
> If it's only 10 lines, why don't you just quote it here, so we may all
> benefit from it. Otherwise, yes, please send me the script, I would be
> very interested.
Well the basic code is actually very simple (you can do this with a plain bash 
script, I used a compiled program in openlab purely for performance reasons)
In this case I'm using zenity to show an error, but xmessage or some such 
could easilly be swapped in.

#!/bin/sh
#Begin: /usr/bin/kickdouble
if who | grep ws | grep $1 
then
        exit 0
else
        exit 1
fi

############
In you Xsession
###########

USER=`whoami`
if kickdouble $USER
then
        zenity --error --text "You are already logged in on another workstation" 
else
        #Normal startup procedure goes here
fi


Si Voila.

Not exactly the openlab version, but the latter has support for a lot of other 
things built in (e.g. direqcafe etc.) but close enough to share the basic 
idea methinks.

-- 
A.J Venter
Lead Developer, DireqLearn 
082 726 5103
http://www.direqlearn.org
http://www.direqlearn.net/olce
http://silentcoder.blogsite.org


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to