If I want to use OpenBox then how can I lock my "monitor" when I leave the PC for a few minutes? Like the gnome-screensaver under GNOME.
Asked
Active
Viewed 2.0k times
9
Gilles 'SO- stop being evil'
- 807,993
- 194
- 1,674
- 2,175
LanceBaynes
- 39,295
- 97
- 250
- 349
-
possible duplicate of [Lock screen w/ slock after a certain time?](http://unix.stackexchange.com/questions/10455/lock-screen-w-slock-after-a-certain-time) – Caleb Jun 08 '11 at 20:20
-
1@Caleb For once I don't think that's a duplicate. There could be other programs than `slock`. – Gilles 'SO- stop being evil' Jun 08 '11 at 22:18
4 Answers
10
The simplest is slock, the suckless screen locker.
You could combine this with xautolock if you wanted to automate it after a period of inactivity.
If you want something more "featurefull" you could install xscreensaver. Of course, gnome-screensaver is an option as well...
jasonwryan
- 71,734
- 34
- 193
- 226
2
I use xlockmore
Install (in fedora):
sudo yum -y install xlockmore xlockmore-gtk
and I have a keybinding (Ctrl+Alt+l) in my rc.xml file that goes like this:
<keybind key="C-A-l">
<action name="Execute">
<execute>xlock -mousemotion +description -mode blank -bg black -fg grey30</execute>
</action>
</keybind>
pedrosaurio
- 756
- 1
- 7
- 16
0
I really like slock, but I can't use it on rhel. I used xlockmore until I found i3lock which is more my style.
To get the automatic screen locking after a timeout, I did have to roll my own xautolock rpm. If someone knows of a xautolock equivalent on rhel let me know.
f3xy
- 111
- 5
-2
If you're using lightdm, dm-tool lock.
nil
- 1
- 1
-
LightDM is not a window manager, it's a display manager. It runs as root, it's what you type your name and password into to log in to the GUI session. Your display manager launches the window manager. That's why you can choose from a selection of window managers, including openbox. Xfce. , etc., at the display manager login prompt. – nil Apr 18 '19 at 09:34
-
You're correct. As someone who does not use X, I should have checked that more carefully. – Kusalananda Apr 18 '19 at 09:37
-
No problem. I use openbox and lightm on debian 9 and Ubuntu 18 and can confirm `dm-tool lock` locks the screen on both. – nil Apr 18 '19 at 09:57
-
Another option for lightdm is the `light-locker-command -l`. It needs light-locker to run, which I started from the openbox autostart file: `light-locker &` (the documentation only mentions that is is started by the session). Not sure which one is better though (dm-tool or light-locker[-command]). – Attila123 Jun 09 '19 at 21:41