LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to shutdown Gnome?? (https://www.linuxquestions.org/questions/linux-software-2/how-to-shutdown-gnome-431786/)

Rory in Toronto 04-04-2006 09:28 PM

How to shutdown Gnome??
 
Okay, this is what I'm trying to do:
I'd like to hit the the Logout button in Gnome, for it to pop-up "Reboot" or "Shutdown" and then for it to simply do it, like it does in KDE.

Instead, in Gnome, you hit logout and it takes you to the GDM screen, where you then choose to shutdown or sign-off. Way too many button clicks. Yes, some of you will suggest I just don't turn off my computer, but I pay my electricity bill, not my parents. :)

So, it was suggested to me that I set up a shortcut with the command:
sudo shutdown -h now

No dice. This works in terminal but not as a shortcut on the desktop. So, I tried:
gksudo shutdown -h now

No dice. The issue is the need to type in a password. So, I tried this as the shortcut command:
echo mypassword | sudo shutdown -h now

No dice. I could disable the need for a password to go root in Ubuntu, but that's overkill and I like the security. Just don't need it for logging out.

Can anyone suggest another way to do this so I can do a simple, one-click shutdown in Gnome that will power my computer off?

Thanks,

killomatic 04-04-2006 10:03 PM

I don't know gnome, but here's how you make the command not require a password, and it's how I got shutdown working in fluxbox.

type visudo and add:
username ALL= NOPASSWD: /sbin/shutdown
where username is the user you want to shut down the comp, then add a menu shortcut for sudo shutdown

sailajabhandaru 04-05-2006 12:23 AM

There is a application called kshutdown which appears
on the panel.
this is used to shutdown and many more options in it.......
click it
http://kshutdown.sourceforge.net/

Sailaja Bhandaru


All times are GMT -5. The time now is 04:13 PM.