Trying to use xss-lock + xsecurelock


Hi, I’m trying to use xss-lock and xsecurelock to provide a lock screen with LXQt/OpenBox+SDDM. However, even though I’m using the version of xss-lock that allows you to specify the session, XDG_SESSION_ID doesn’t seem to be set in the systemd unit files. I’ve also tried placing a custom script in /etc/X11/xinit/xinit.rc.d but this hasn’t worked either, and I can’t figure out where the logs for this go (or if it’s even being run).

If I manually run xss-lock xsecurelock from a terminal after I’ve signed in, it does work, but this is obviously undesirable compared to starting it up in the background.

Can anyone help? Thanks.

(palinek) #2

So you are trying to run a daemon, but you’re missing particular env variable, right? I see to options:

  1. create a .desktop starting your daemon and place it in /etc/xdg/autostart (for LXQt you can use the X-LXQt-Module=true, then lxqt-session will also restart the daemon in case of its crash)
  2. if you need it to be run a systemd unit, a quick google-fu found this one (but I would suggest to just use the ...import-environment XDG_SESSION_ID of particular variable and not import all existing variables)

For me the 1. is the preferred way to go as the 2. is more-or-less a workaround and not a proper solution.

(Stefano) #3

I don’t know xss-lock, but I’using without issues slock in debian buster.

cat /etc/systemd/system/slock@.service 

Description=Lock X session using slock for user %i

ExecStartPre=/usr/bin/xset dpms force suspend



$ ls -l /usr/bin/xscreensaver
lrwxrwxrwx 1 root root 14 dic  7 10:12 /usr/bin/xscreensaver -> /usr/bin/slock

(Shrinivas Kumbhar) #4

i am using

kscreenlocker as screenlocker/screensaver instead of xscreensaver

with lxqt-kwin




font="Noto Sans,10,-1,5,50,0,0,0,0,0"