Bug 363041

Summary: DBUS system DisplayManager Lock does not work
Product: [Plasma] kscreenlocker Reporter: Daniel <kde>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: bhush94, kde, mgraesslin
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel 2016-05-13 18:29:33 UTC
qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.Lock

This doesn't work in Kubuntu 16.04 as it does in 14.04. It just does nothing. Not manually triggered nor using QtDbus in C++/Qt-Programs.

I know, the display can be locked with Screensaver-DBUS-Commands, but if DisplayManager-Lock is not supported, it should just tell it.

Reproducible: Always

Steps to Reproduce:
1. Open terminal
2. enter "qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.Lock"
3. look sadly :)

Actual Results:  
nothing

Expected Results:  
Expected to lock screen.

I'm using sddm as it is in Kubuntu as default.
Comment 1 Martin Flöser 2016-05-17 05:42:44 UTC
I don't know how that was supposed to work in the previous version, but there was no direct integration with the Display Manager.

You can use the loginctl api to lock the session:
qdbus --system org.freedesktop.login1 /org/freedesktop/login1/session/self org.freedesktop.login1.Session.Lock
Comment 2 Daniel 2016-05-18 19:04:09 UTC
Hi Martin and thank you for the alternative approach!

I used this command in Kubuntu 14.04 so it was working in the last LTE, but I cannot remember if it was working in the latest version (in case of Kubuntu 15.10).
Comment 3 David Edmundson 2017-09-04 14:34:54 UTC
That DBus call goes to SDDM, not to kscreenlocker.
Lock is not implemented there and probably won't be.