Hi Gary,
Sorry for having forgotten about this issue. I've come back to it and
experimented together with Richard Eckart who was running GNOME 1.4, and on
my machine with KDE installed. I like your idea to use readlink;
debianutils is essential anyway so that's not a problem.
On my KDE system, ps -pID -ocmd --no-heading is really wierd:
$ ps -p29289 --no-heading -ocmd
ksmserver --restore
But using readlink in /proc/PID/exe is much better:
$ readlink -f /proc/29289/exe
/usr/bin/ksmserver
To avoid problems if someone doesn't have /proc mounted, I added a test for
the link /proc/PID/exe before using it, so now I have:
SMPID=`echo $SESSION_MANAGER | sed --quiet "s,local.*/,,p"`
if [ -n "$SMPID" ] && [ -L /proc/"$SMPID"/exe ]; then
SESMGR="`readlink -f /proc/$SMPID/exe`"
if [ "$SESMGR" = "/usr/bin/gnome-session" ]; then
echo "Gnome session manager detected - session management disabled"
unset SESSION_MANAGER
fi
fi
Does that work properly on your system too?
> I doubt it's actually
> specific to GNOME2 at all...
Yes it is, and is due to the default setting of --purge-delay, which is 15
seconds and on many machines shorter than it takes OpenOffice to come up
first time, which causes gnome-session to tell OOo to quit.
Chris
Attachment:
pgpYh79vTlvc5.pgp
Description: PGP signature