This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Log users off the desktop remotely

Tags: None
(comma "," separated)
User avatar
bluelupo
Registered Member
Posts
32
Karma
1

Log users off the desktop remotely

Fri Jun 29, 2018 7:04 am
Hi Community,

How can I (as root) log off a user from the KDE desktop when accessing the SSH console remotely? Is there a special command that can be placed on the console?

Ciao
Bluelupo
airdrik
Registered Member
Posts
1854
Karma
5
OS
A quick google search presents this askubuntu question which lists several mostly gnome-specific options, but includes:

qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 0

for logging out of kde (presumably still works with Plasma 5, but test to be sure). Use the --address parameter to qdbus to specify the user's dbus session.

That question also lists sudo pkill -u username, which kills all processes owned by the specified user (you can specify which signal to use to send to their processes just like with the kill command).

This stackexchange question has an additional command which should work on systemd systems using logind, regardless of desktop session used.


airdrik, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]