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...
-
Hi, So far I'm still learning about Drupal. I have a project in mind using this. So I wanted to install a module into this Drupal-o-m...
-
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...
No comments:
Post a Comment