Why doesn't my screen lock in XFCE?
Do I need to install a screensaver package or something?
Yes, according to the wiki, you need to choose and install a locker. xflock4
will then activate it.
First install light-locker
.
$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command -l"
or if you don't have the variable yet:
$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command -l" --create -t string
Old stuff:
Looks like xflock4
does support external config now. What I did is:
$ xfconf-query -c xfce4-session -p /general/LockCommand -s "dm-tool lock"
Now that command is used for locking. I guess gnome-screen-saver broke on upgrade.
This is for XFCE. If you don't have that property already, you add it by:
$ xfconf-query -c xfce4-session -p /general/LockCommand -s "dm-tool lock" --create -t string
VERY IMPORTANT: you need a screensaver running to securely lock your screen. light-locker
is one choice. At the end make sure switching consoles with ctrl+alt+F1 or some other F# does not let you circumvent the lock screen. See:
- https://bugs.launchpad.net/ubuntu/+source/lxsession/+bug/1205384
- https://bugzilla.redhat.com/show_bug.cgi?id=1300178
Edit /usr/bin/xflock4
and append light-locker-command -l
or dm-tool lock
to the list.
for lock_cmd in \
"xscreensaver-command -lock" \
"gnome-screensaver-command --lock" \
"light-locker-command -l"\
"dm-tool lock"