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

Exit KDE4 session remotely through command line?

Tags: None
(comma "," separated)
User avatar
ant
Registered Member
Posts
39
Karma
0
OS
Hello.

Is there a way to exit a KDE4 session remotely through command line? I would like to know if that is possible through SSH2's text session. I'd like to exit KDE4 to conserve resources like memory and have my box idle (GUI) when not in used.

Thank you in advance. :)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You can do this, assuming you know the DISPLAY that KDE is running under. If this is a normal system, it is probably ":0.0". You can check this by running "echo $DISPLAY" while in KDE (using Konsole).

To do so, switch to the user KDE is running as (if you've logged in as a different user) then run the following:
Code: Select all
export DISPLAY=":0.0"
qdbus org.kde.ksmserver /KSMServer logout 0 0 0


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
ant
Registered Member
Posts
39
Karma
0
OS
bcooksley wrote:You can do this, assuming you know the DISPLAY that KDE is running under. If this is a normal system, it is probably ":0.0". You can check this by running "echo $DISPLAY" while in KDE (using Konsole).

To do so, switch to the user KDE is running as (if you've logged in as a different user) then run the following:
Code: Select all
export DISPLAY=":0.0"
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
Perfect and thanks. :)


Bookmarks



Who is online

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