David Johnston wrote:
On Wed, 2005-02-16 at 13:54, A Gilmore wrote:
Hello,
If you poweroff the terminal without logging off you cannot log back in
as your x-session-manager and applications are all still running on the
server. The x-session-manager then becomes defunct and doesn't even die
with a kill -9.
Is there a common or known way to get around this? My users are
powering off the terminals regularly and then cannot log back in without
me manually terminating processes at the command line and restarting the
X server.
I fix this by killing off unwanted processes in
/etc/X11/gdm/PostSession/Default
That script runs as the user, so you can't just kill all of the user's
processes or you risk killing the executioner before he does his job ;-)
Here's part of mine:
######## Shut down the oaf daemon
oafdpids=`ps -u $USER | grep oafd | cut -c1-5`
[ -z $oafdpids ] || kill -1 $oafdpids
######## Remove files left in /tmp by the user
###### Remove Evolution temporary directories
for EvolutionTempDir in /tmp/evolution-$EUID-*
do
[ -d $EvolutionTempDir ] && rm -Rf $EvolutionTempDir
done
###### Remove orbit & KDE temporary directories
[ -d /tmp/orbit-$USER ] && rm -Rf /tmp/orbit-$USER
[ -d /tmp/ksocket-$USER ] && rm -Rf /tmp/ksocket-$USER
[ -d /tmp/kde-$USER ] && rm -Rf /tmp/kde-$USER
[ -d /tmp/mcop-$USER ] && rm -Rf /tmp/mcop-$USER
###### Remove any scrollkeeper tempfiles
for TempFile in /tmp/scrollkeeper-tempfile*
do
[ `stat -c %u $TempFile` -eq $EUID ] && rm -Rf $TempFile
done
######## Kill any processes the user left running
[ $USER = 'root' ] && exit 0 # Don't zap root
# Clean up a few other things.
LeftoverPids=`ps ho pid -u $USER`
if [ ! -z "$LeftoverPids" ]
then
logger -t "gdmPostSession " $USER "left processes behind"
ps -aef|grep ^$USER | logger -t gdmPostSession
logger -t gdmPostSession.1 "TERM signals to $LeftoverPids..."
kill -15 $LeftoverPids | logger -t gdmPostSession.1
sleep 1
LeftoverPids=`ps -aef | grep ^$USER | cut -c10-15 `
if [ ! -z "$LeftoverPids" ]
then
logger -t gdmPostSession.2 "Kill signals to $LeftoverPids..."
kill -9 $LeftoverPids | logger -t gdmPostSession.2
sleep 1
LeftoverPids=`ps -aef | grep ^$USER | cut -c10-15 `
if [ ! -z "$LeftoverPids" ]
then
logger -t gdmPostSession.failed "Can't kill $LeftoverPids."
ps -aef | grep $LeftoverPids | logger -t gdmPostSession.failed
fi
fi
fi
exit 0
That looks interesting, Ill give it a shot. Thanks.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_____________________________________________________________________
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