Hi,
Got a good tips from OpenBSD.newbies mailing list. How to lock the machine after suspend. Ok, normally, if I didn't xlock my X session and put the machine under suspend mode (eg: close the lid), my session will be restored when the machine wakes. My session is exposed. So here's how to automatically lock the session when the machine goes into suspend mode.
1) Create a suspend file inside /etc/apm.
In my machine, there's no /etc/apm folder. So I need to create it first. Then create a suspend file inside it.
$ doas mkdir /etc/apm
$ doas vi /etc/apm/suspend
----- /etc/apm/suspend starts -----
#!/bin/sh
pkill -USR1 xidle
----- /etc/apm/suspend ends -----
Then I need to make this suspend executable.
$ doas chmod 744 /etc/apm/suspend
2) Get xidle running on start.
I edited my
.xsession file and add this text:
----- ~/.xsession starts -----
xidle &
----- ~/.xsession ends -----
Then I run the xidle program.
$ xidle &
So basically when I close my machine's lid, suspend will trigger xidle to lock the machine. Nice stuff.
Reference:
http://www.mail-archive.com/openbsd-newbies@sfobug.theapt.org/msg00043.html
Subscribe to:
Post Comments (Atom)
6.5 amd64: Modify existing certbot certificates.
Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...
-
Now FreeBSD has version 6.x fer production purpose and 7 fer current. I missed quite a release nowadays. But 1 of the most important news I...
-
Update: My Updated wmiirc Status Bar Script is the recent version, there's a bit of error in the script below so you guys better take a...
-
Ok. I'm still testing to get auto proxy setting script. But in the mean time, you can copy and use this simple script to dial/disconnect...
No comments:
Post a Comment