I am running Kubuntu 13.10 x64 with no special settings. Now I want to unlock the machine by ssh (the kde screen lock).

I tried this: http://thebigbyte.blogspot.de/2010/05/how-to-lock-unlock-kde4-screensaver.html

But just nothing happens...

Thanks for help!


I appears that they've removed the capability, perhaps because of security reasons. But you can do this:

First get the current dbus session

export DBUS_SESSION_BUS_ADDRESS=`cat /proc/$(pidof kded4)/environ | tr '\0' '\n' | grep DBUS_SESSION_BUS_ADDRESS | cut -d '=' -f2-`

Then call quit to kscreenlock:

qdbus | grep kscreenlocker | sed 's/org.kde.//' | xargs kquitapp
  • Did you try this? On 12.04 it only shows me the help for kquitapp... – davidbaumann Feb 6 '14 at 7:34
  • Yes, it works on my Kubuntu 13.10. The command also worked on my 12.04 (under vnc). You did run the fist command right? The d-bus command will fail otherwise and you get the help. It'll also fail if something else than kcreenlocker is in use to lock the screen, e.g. xscreensaver. Do you use something else than bash? – Tatu Lahtela Feb 6 '14 at 8:06

Just minor clarification on Tatu's answer as I didn't manage to use the solution because there were more than one X server started and $(pidof kded4) gives more than 1 pid.

Instead one can use:

( eval $(grep -z '^DBUS_SESSION_BUS_ADDRESS' /proc/$(pgrep -u $USER plasma-overlay)/environ); export DBUS_SESSION_BUS_ADDRESS; kquitapp plasma-overlay )

Solution stolen from: http://www.commandlinefu.com/commands/view/2264/unlock-your-kde4-session-remotely-for-boxes-locked-by-kde-lock-utility

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.