Discussion:
suspend xscreensaver auto-lock
Add Reply
Marco Moock
2025-02-28 16:41:22 UTC
Reply
Permalink
Hello!

Is there a way to automatically lock the screen when the system goes
into suspend when using xscreensaver?
--
kind regards
Marco

Send spam to ***@stinkedores.dorfdsl.de
John McCue
2025-02-28 23:45:59 UTC
Reply
Permalink
Post by Marco Moock
Hello!
Is there a way to automatically lock the screen when the system goes
into suspend when using xscreensaver?
Yes, see below. This is a paired down script I use:

SCRIPT START-----------------------------------------------
#!/bin/bash
#
# This is File
# /lib64/elogind/system-sleep/10_sleep.sh
# on 64 bit systems, 32 bit, maybe /lib/ ?
# do a chmod 755 on it
#
# Edit /etc/elogind/logind.conf (slackware 15.0)
# You may need to add this:
# HandleLidSwitch=suspend

g_user_01=YOUR-USER-ID

case $1/$2 in
pre/*)
logger "INFO ELOGIN: processing $1/$2 SLEEP"
su $g_user_01 -c "(xscreensaver-command -lock)"
# expirement with this setting
sleep 2
;;
post/*)
logger "INFO ELOGIN: $1/$2 RESUME"
;;
esac
SCRIPT END -----------------------------------------------

HTH
--
[t]csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars
Gamgee
2025-03-01 00:14:57 UTC
Reply
Permalink
To: John McCue
-=> John McCue wrote to alt.os.linux.slackware <=-

JM> From Newsgroup: alt.os.linux.slackware
Post by Marco Moock
Hello!
Is there a way to automatically lock the screen when the system goes
into suspend when using xscreensaver?
JM> Yes, see below. This is a paired down script I use:

<SNIP>

Paired down? What's it paired with?




... All the easy problems have been solved.
--- MultiMail/Linux v0.52
--- Synchronet 3.20c-Linux NewsLink 1.2
Palantir BBS - telnet://palantirbbs.ddns.net
John McCue
2025-03-01 23:14:52 UTC
Reply
Permalink
Gamgee <***@palantirbbs.ddns.net.remove-s21-this> wrote:
<snip>
Post by Gamgee
Paired down? What's it paired with?
I to not know what you are asking.

On my system I have a few custom processes running, so when
it goes into sleep, I cancel them to prevent issues should
resume fail. I removed that logic before posting.
--
[t]csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars
Marco Moock
2025-03-01 13:54:58 UTC
Reply
Permalink
How is this script named? Where do I need to cause it to be executed?
--
kind regards
Marco

Send spam to ***@stinkedores.dorfdsl.de
John McCue
2025-03-01 22:59:12 UTC
Reply
Permalink
Post by Marco Moock
How is this script named? Where do I need to cause it to be executed?
Instructions are in the comments, the name is
/lib64/elogind/system-sleep/10_sleep.sh

It is for slackware 15.0
--
[t]csh(1) - "An elegant shell, for a more... civilized age."
- Paraphrasing Star Wars
Marco Moock
2025-03-02 14:19:30 UTC
Reply
Permalink
Post by John McCue
Instructions are in the comments, the name is
/lib64/elogind/system-sleep/10_sleep.sh
It is for slackware 15.0
Thanks, so it is directly being called by elogind.
--
kind regards
Marco

Send spam to ***@stinkedores.dorfdsl.de
Chris Elvidge
2025-03-01 14:42:00 UTC
Reply
Permalink
Post by Marco Moock
Hello!
Is there a way to automatically lock the screen when the system goes
into suspend when using xscreensaver?
Have you looked at /usr/bin/xscreensaver-settings?
--
Chris Elvidge, England
I WILL NOT DRAW NAKED LADIES IN CLASS
Marco Moock
2025-03-01 18:31:13 UTC
Reply
Permalink
Post by Chris Elvidge
Post by Marco Moock
Hello!
Is there a way to automatically lock the screen when the system goes
into suspend when using xscreensaver?
Have you looked at /usr/bin/xscreensaver-settings?
Yes, there is an option, but it doesn't work like the other suspend
settings too there.

See this thread:
Message-ID: <vdespj$2bbnt$***@dont-email.me>
--
kind regards
Marco

Send spam to ***@stinkedores.dorfdsl.de
Loading...