LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
LinkBack Search this Thread
Old 08-01-2013, 07:31 PM   #16
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 2,735
Blog Entries: 3

Rep: Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629

Dan:

I found this
Code:
Shutdown
dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown

Restart
dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Reboot

Suspend
dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0

Hibernate
dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate
These action "buttons" may actually be a front-end for the above?

Documented at http://dbus.freedesktop.org/doc/dbus-send.1.html

It may not be the "answer" but I hope it helps.
 
1 members found this post helpful.
Old 08-02-2013, 10:42 PM   #17
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-15 with Cinnamon & KDE
Posts: 1,272
Blog Entries: 3

Original Poster
Rep: Reputation: 86
Quote:
Originally Posted by Habitual View Post
I found this
...
These action "buttons" may actually be a front-end for the above?
Documented at http://dbus.freedesktop.org/doc/dbus-send.1.html

It may not be the "answer" but I hope it helps.
WOW! Which rock did you turn over to find this detail. I've spent hours running 'grep' and found zilch.

Follow-Up:
... a place holder for details once I check this out ...
I'll be back shortly.
Cheers,
~~~ 8d;-Dan
 
Old 08-03-2013, 08:42 AM   #18
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 2,735
Blog Entries: 3

Rep: Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629
Dan:

I found it while surfing ubuntuforums.org for "nuggets" that I find interesting as I like to "look under the hood" of Linux.
Such as How to kill a program without the kill command

I enjoy collecting "nuggets" like this and my DorkBlog is full of such stuff.

I caught my eye because I remembered your post here and saw the post there and I hoped it was correct information.
Sorry to those who contributed, I knew that is wasn't a terminal command that you were after.

Quote:
Originally Posted by SaintDanBert View Post
Does the dialog launch programs or scripts in response to each button?
...
Are we really required to read the code for our Desktop Environment -- in my case Cinnamon -- to get answers to these questions?
I have not found any documentation anywhere.
I am afraid so, if you are like me, and it sounds like you are, we like to know what's going on "under the hood"

Somewhere in my head, I remember some "tricks" that dbus does but since I don't "program" in C or develop either, I couldn't remember the name of the mechanism that performed these actions. But I knew deep down it was no freaking front-end to a /bin/binary!

Quote:
If so, which programs and where do I find them?
You'll have to dig some more and I hope this provides light to your search for the answer.

And if I did know, where's the fun in that? Linux would be boring if you didn't look under the hood on your own.

You are an inspiration and a breath of fresh air.
Keep on "Looking under the hood" my friend.

Apparently: this doesn't work on my slackware64 system using "run" or the terminal. Bummer.
See:
http://lizards.opensuse.org/2008/07/...eboot-as-user/
https://bugzilla.gnome.org/show_bug.cgi?id=118091
and I'm sure countlless other caveats exist, depending on OS/Desktop...


Edit1: Sat Aug 03, 2013 - 10:29:51 AM EDT
This worked immediately for my slackwa14_64 host:
Code:
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

Last edited by Habitual; 08-03-2013 at 09:34 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
remove "Suspend" and "Hibernate" from the "Shut Down" applet cccc Debian 2 05-02-2011 10:05 AM
upon shutdown, pressed "suspend", now desktop completely dead, no response to anytrys cernutowoe11@gmail.com Linux - General 1 12-07-2010 02:35 PM
How to remove "Suspend Computer" button in KDE? killy9999 Suse/Novell 4 09-28-2008 12:29 PM
How do i remove/disable the "suspend" button?? adija Linux - General 3 01-25-2007 12:12 AM


All times are GMT -5. The time now is 08:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration