How can I do a remote logout from KDE?

Use the incredible dcop client!

Use the incredible dcop client!

To get an overview what is going on at the specific machine, type

dcop --all-users --list-sessions

This will show all sessions by all users.

If you have the appropriate permissions you can picka specific user and session by typing

dcop --user <username> --session <sessionid>

This will provide you with a list of all dcop-aware programms running in this session.

So let’s get to the logout. This is under controll of the KDE SessionManagemnet server.

dcop --user <username> --session <sessionid> ksmserver default

provides a list of all available dcop commands to the specific programm. Among the list of ksmserver we will find logout (int,int,int)

The three integers have the following meanings:

These flags are documented at http://developer.kde.org/documentation/library/cvs-api/kdecore/html/classKApplication.html

Thus, a logout could be initiated by

dcop --user <username> --session <sessionid> ksmserver default logout 0,0,-1

More info of dcop at http://developer.kde.org/documentation/library/kdeqt/dcop.html for the protocol and http://www.volny.cz/bwian/dcop.html for the client program.

salvaged from Wayback Machine at 2025-12-05, original timestamp 2005-11-23 15:15