3

qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock gives

Service 'org.freedesktop.ScreenSaver' does not exist.

and loginctl lock-session doesn't change anything.

2 Answers 2

3

Executing /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet works.

1
  • 3
    How about a little context here? For a 2.5k user, this answer is bad.
    – Mark Kirby
    Oct 6, 2016 at 11:18
2

It works but you have to install kscreenlocker_greet.

On my (Debian) system there isn't.

[Mon 15May2017]bpxroot@thinkdeb:~$ /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet
bash: /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet: No such file or directory

But I have loginctl, so ...

first get the session's number:

[Mon 15May2017]bpxroot@thinkdeb:~$ /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet
bash: /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet: No such file or directory
[Mon 15May2017]bpxroot@thinkdeb:~$ loginctl 
   SESSION        UID USER             SEAT             TTY             
         4       1000 bpxroot          seat0                            

1 sessions listed.

then lock the session:

loginctl lock-session 4
1
  • Thanks for the info but I needed exactly KDE screen locker. On my system loginctl lock-session # does nothing.
    – int_ua
    May 16, 2017 at 11:27

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.