[arch-general] Xscreensaver is Active on Resume from Manual Suspend
Hi, I would like to know why I see xscreensaver when I resume from suspend even if I manually suspend. Greetings, -- Bastien
I think this is international so you have to input the password when you are back. To prevent someone else from accessing the computer. I am not absolutely sure though. On Dec 3, 2011 2:07 PM, "Bastien Dejean" <nihilhill@gmail.com> wrote:
Hi,
I would like to know why I see xscreensaver when I resume from suspend even if I manually suspend.
Greetings, -- Bastien
On 03-12-2011 12:06, Bastien Dejean wrote:
Hi,
I would like to know why I see xscreensaver when I resume from suspend even if I manually suspend.
Greetings,
When you resume, how much time has it been since you suspended? How much time does it need to pass until xscreensaver locks your screen if the machine is kept running? -- Mauro Santos
Mauro Santos:
When you resume, how much time has it been since you suspended? How much time does it need to pass until xscreensaver locks your screen if the machine is kept running?
I see what you mean. xscreensaver thinks it musts activate because it wrongly considers the elapsed time as an activity period. Then, I should automatically send: xscreensaver-command -deactivate >&- 2>&- & on resume?
On 03-12-2011 13:45, Bastien Dejean wrote:
Mauro Santos:
When you resume, how much time has it been since you suspended? How much time does it need to pass until xscreensaver locks your screen if the machine is kept running?
I see what you mean. xscreensaver thinks it musts activate because it wrongly considers the elapsed time as an activity period.
Then, I should automatically send:
xscreensaver-command -deactivate >&- 2>&- &
on resume?
It might work or not, I don't know what takes precedence. After you resume i guess it will check the time and realize it has been longer than the defined inactivity period with no activity (it was suspended so there could be no activity) and lock the screen. Here I see the same behavior, I have the timeout set to 10 minutes, if I resume after 10 minutes have passed the screen will be locked, however if I suspend and resume before 10 minutes have passed the screen will stay unlocked. -- Mauro Santos
Mauro Santos:
It might work or not, I don't know what takes precedence. After you resume i guess it will check the time and realize it has been longer than the defined inactivity period with no activity (it was suspended so there could be no activity) and lock the screen.
I've created /etc/pm/sleep.d/49xscreensaver: #! /bin/dash case $1 in resume | thaw) xscreensaver-command -deactivate >&- 2>&- & ;; esac We'll see how it behaves...
Bastien Dejean:
I've created /etc/pm/sleep.d/49xscreensaver:
#! /bin/dash
case $1 in resume | thaw) xscreensaver-command -deactivate >&- 2>&- & ;; esac
We'll see how it behaves...
My script is called a little late in the waking process, so I still briefly see xscreensaver before it deactivates, but I think I can live with that. Of course, I know I could kill xscreensaver on sleep and re-spawn it on resume, but I was hoping for a more elegant solution.
On Sat, 3 Dec 2011 13:06:55 +0100 Bastien Dejean <nihilhill@gmail.com> wrote:
Hi,
I would like to know why I see xscreensaver when I resume from suspend even if I manually suspend.
Greetings,
Xscreensaver does not activate by default on resume unless: 1. The time interval between suspend and resume is longer than xscreensaver timeout. 2. There is an explicit script in /etc/pm/sleep.d which locks thescreen on resume. For example: #!/bin/bash pid=$(pidof -o %PPID /usr/bin/xscreensaver) case $1 in hibernate) ;; suspend) if [ "x$pid" != "x" ]; then x_owner=$(/bin/ps -e u | /bin/grep xscreensaver \ | /bin/grep $pid | \ /bin/awk '{print $1}') /bin/su $x_owner -c \ "/usr/bin/xscreensaver-command -lock &> /dev/null" fi ;; thaw) ;; resume) ;; *) exit 1 ;; esac Personally I always prefer to have such a script to prevent unauthorized access. -- Leonid Isaev GnuPG key ID: 164B5A6D Key fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
participants (4)
-
Bastien Dejean
-
Leonid Isaev
-
Mauro Santos
-
Thanasis Georgiou