Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1209  / 3 Years ago, wed, september 29, 2021, 6:32:23

I know there is already a similar question about this topic. But that question was only about how to get the shutdown dialog in general. I need to get back the countdown of the old shutdown dialog (Ubuntu <= 12.10) which shutdown the system after 60sec.



geobuntu suggested this dbus call in his answer:



dbus-send --print-reply --dest="org.gnome.Shell" /org/gnome/SessionManager/EndSessionDialog org.gnome.SessionManager.EndSessionDialog.Open uint32:2 uint32:0 uint32:60 array:objpath:/org/gnome/SessionManager/EndSessionDialog


qdbus indicate that third argument is max_wait which should (in my opinion) set and start the countdown:



~$ qdbus org.gnome.Shell /org/gnome/SessionManager/EndSessionDialog
[...]
method void org.gnome.SessionManager.EndSessionDialog.Open(uint type, uint arg_1, uint max_wait, QList<QDBusObjectPath> inhibitors)


But it doesn't. I already tried various values for type and arg_1 without luck.






EDIT: Actually the countdown is more 'nice to have'. What I really need is that the system WILL shutdown without any extra user action. It should work without sudo (including any no-password sudoers).



I would prefer dbus calls cause I already have a nice list of dbus calls which will shutdown all DE's except Unity >= 13.04






EDIT2: I had a look into Unity source. I don't know C++ but for me it looks like arg1 and timeout_length are not handled in source (can someone with C++ knowledge please confirm this?). Maybe this will be added in later releases.






EDIT3: I reported this as bug #1256703 on Launchpad.


More From » unity

 Answers
2

There was a great answer from Majal Mirasol about this. He suggested to use



/usr/bin/dbus-send --system --print-reply 
--dest="org.freedesktop.ConsoleKit"
/org/freedesktop/ConsoleKit/Manager
org.freedesktop.ConsoleKit.Manager.Stop


This will work perfectly for me.



If you like this solution please send kudos to Majal's answer and not this one.


[#28256] Friday, October 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
motivengry

Total Points: 459
Total Questions: 112
Total Answers: 108

Location: Bonaire
Member since Sat, May 1, 2021
3 Years ago
motivengry questions
Tue, Oct 4, 22, 10:02, 2 Years ago
Wed, May 31, 23, 14:33, 12 Months ago
;