7

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.

6

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...

1

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>
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.

-2

If you're using lightdm, dm-tool lock.

  • 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 at 9:34
  • You're correct. As someone who does not use X, I should have checked that more carefully. – Kusalananda Apr 18 at 9: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 at 9: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 9 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.