FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 12-03-2011, 12:45 PM
Bastien Dejean
 
Default Xscreensaver is Active on Resume from Manual Suspend

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?
 
Old 12-03-2011, 01:45 PM
Bastien Dejean
 
Default Xscreensaver is Active on Resume from Manual Suspend

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...
 
Old 12-03-2011, 05:27 PM
Leonid Isaev
 
Default Xscreensaver is Active on Resume from Manual Suspend

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
 
Old 12-04-2011, 09:20 AM
Bastien Dejean
 
Default Xscreensaver is Active on Resume from Manual Suspend

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.
 

Thread Tools




All times are GMT. The time now is 06:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org