Reply to topic

Exit KDE4 session remotely through command line?

User avatar ant
Registered Member
Posts
34
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
19743
Karma
85
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


System Settings and Device Actions KCM maintainer
Image
User avatar ant
Registered Member
Posts
34
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. :)

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], cylverbak, darktori, davidemme, eranb, Exabot [Bot], Google [Bot], kde-lunarparks, koriun, MSNbot Media, odysseus-art, rv8ter, veqz, vpinon, Yahoo [Bot]