Just installed xubuntu 18.04. Lock screen doesn't work: when I click in the locker image on the ower right corner of the menu, nothing happens.

Trying to debug it I found out that apparently there is some environment variable missing:

# light-locker

** (light-locker:5830): ERROR **: 14:42:54.829: Environment variable XDG_SESSION_PATH not set. Is LightDM running?
Trace/breakpoint trap (core dumped)

Some extra info:

$ env | grep -i manager

How do I make the lock screen work?

  • As a normal user, not root, what does env | grep -i manager show? – Justice for Monica Dec 15 '18 at 0:58
  • Included in the main question. – Rsevero Dec 17 '18 at 13:13

After not finding a good answer how to solve the locking issue on Xubuntu 18.04, I stopped using the supplied locking mechanisms in Xubuntu (namely the gnome-screensaver and light-locker) and installed i3lock from the distro's repos.

This locker is very simple and can be used wihout any switches (you can set a background image and a few other options, none of them are critical).

The only downside I see is that I can't seem to make it lock the session on system suspend and that it doesn't show the keyboard layout, but as long as you remember which layout you've used before locking the screen, you're OK. Layout switching keyboard shortcut you use in the session works also in the i3lock, so that's OK, too.

BTW, it seems to be enough to have only the one line invoking i3lock in the /usr/bin/xflock4 file.

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.