I am accessing the machine (OpenSuse 11 with KDE) over NX.
I cannot use the Alt-Ctrl-Del shortcuts as it is captured by my system. The regular logoff button just ends the NX session without ending the KDE session. I cant call kdm restart
as I have no root privileges.
Other wild guesses like logout
and exit
do not work either, the first one complaining about not being in a login shell and the second one just closing the console.
My shell-fu is weak, so any help is appreciated.
Best Answer
You can send a logout command via dbus to KDE, which should (if it can) terminate the session.
dbus is a messaging system that lets applications communicate with each other, and the
qdbus
command is a utility for sending dbus messages to applications.Applications register with dbus, and the
ksmserver
part of KDE is the session manager - it looks after who is logged in.So we are sending a message to
ksmserver
to the/KSMServer
interface and telling it to logout. The message we are sending is the exact same message that is sent to KSM when you click on the logout icon on your desktop.The three zeros are parameters and can alter the type of logout we are doing:
First parameter:
Second parameter:
The third parameter is the "when" parameter, but it isn't clear what its impact is.