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.
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
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).
That DBus call goes to SDDM, not to kscreenlocker. Lock is not implemented there and probably won't be.