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

Which command to automatically log out and shut down ?

Tags: None
(comma "," separated)
ptyxs
Registered Member
Posts
8
Karma
0
Hi,
I am looking for a (single) user command which :

1) logs out properly (from KDE)

2) shuts out computer

3) doesn't ask for confirmation (or perhaps just a non blocking one such as "If you don't do anything, computer will shut down in a minute").

Do you think the following command would be a right and proper answer to the above question :
Code: Select all
/usr/lib/qt4/bin/qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 2 2


(I could not manage to find out an official complete documentation on this command on any official KDE site)

I intend to use such a command in a small Qt4 application I am trying to develop.

Thanks.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The command you have provided is correct.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ptyxs
Registered Member
Posts
8
Karma
0
Thanks.
It is a pity however that documentation on such matters seem to be unavailable on KDE official sites.


Bookmarks



Who is online

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