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

[Solved] Shutdown and logout don't work

Tags: None
(comma "," separated)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
That is expected. I am guessing you are running this command on the system which will not logout from Kickoff?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
liochan
Registered Member
Posts
14
Karma
0
I am not sure to understand very well. I have a laptop where the issue was and a desktop computer. On laptop I wasn't able to shutdown, but after two or more updates of dbus and kdebase the system runs well as I said in this post
In my desktop I did an update, dbus and kdebase were updated to the same version which runs well on my laptop as I said in this post.

So now everything is okay on both laptop and desktop. I can't test on a system which not logout on kickoff.

I hope I understand and explain right.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Ah, my apologies - I thought you were still experiencing the issue on your laptop.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
liochan
Registered Member
Posts
14
Karma
0
I'm sorry and my apologies you waste your time. Thank you for your help. Now I know that the right command to try is :
Code: Select all
qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 0


Because on google I found the same command to try but I think not well written.

Thank you.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Both commands are valid - they just ask KSMServer to do different things.

The arguments to KSMServerInterface.logout match the arguments passed to the following function: http://api.kde.org/4.4-api/kdebase-work ... 4b8f2d7c03

In this case:
- The first zero maps to KWorkSpace::ShutdownConfirm, with Default = -1, No = 0 and Yes = 1
- The second zero maps to KWorkSpace::ShutdownType, with Default = -1, None = 0, Reboot = 1 and Halt = 2.
- The third zero maps to KWorkSpace::ShutdownMode, which is similar to the two above (Default = -1, and so forth).

So the command I gave asks KSMServer to log the user out, without prompting and to schedule it to happen as soon as possible (which in the case of logout is always immediately, but would be delayed in the event of a shutdown/reboot if another user was logged in).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
liochan
Registered Member
Posts
14
Karma
0
As the noob I am, I try command which I said badly written without change parameters that you detailed and guess what, it works like a charm 8)

Thank you to explain the command I really appreciate. I'm still not sure, but I think issue is coming from dbus/kdebase. Next time I have to remerber to provide kernel version, dbus version and kdebase version, it could help the community.


Bookmarks



Who is online

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