xlock+apm suspend -- how?
Short version:
I'm trying to get xlock to automatically launch whenever my machine
(a laptop) goes into suspend mode.
Slightly longer version:
I've been using a symlink in /etc/apm/suspend.d (to a script in
/etc/apm/scripts.d) to handle the starting and stopping of xlock;
all it really does is check to see if my windowing session is
running, if another xlock is already running, and if everything
is happy, it 'su -'s to my user account and runs xlock. If I run
this script from the console, it seems to run without a hitch.
And the problem:
For some odd reason, it looks like xlock is being run *after* the
system comes out of suspend, rather than before the system drops
into a suspended state. This gives a portion of time where my X
desktop is visable, and a single keystroke at this junction will
cause xlock to give up and not load. Adding a delay after the
line in the script that runs xlock doesn't help much, and I'm
running it backgrounded with 'nohup'.
It does run, however, so I'm wondering what the problem could be...
Additional details:
The laptop is a Dell Latitude C600, running kernel 2.4.20.
I am *not* suspending to disk (too slow).
I use the Bash shell exclusively.
Thanks-in-advance!
--
Don Werve <donw@examen.com> (Unix System Administrator)
Yorn desh born, der ritt de gitt der gue,
Orn desh, dee born desh, de umn bork! bork! bork!
Reply to: