PDA

View Full Version : [ubuntu] 9.04 - One-hand (left-handed) access to shutdown PC



potatan
April 16th, 2009, 07:44 PM
Since upgrading to 9.04, I have lost the ability to shutdown my PC using just my left hand. No laughing at the back please.

I used to be able to press ALT-F1 to open the panel menu, press "S" for System, then "S" for the shutdown applet, followed by "Enter" to shutdown the system.

Now I find that the Shutdown option has been removed from the System menu.

So what I would like to know is how I can put it back? Many thanks.

p.s. I know I can shutdown using the User Switcher Applet, but that involves using the mouse. I also know I can press CTRL-ALT-DEL, but that involves using two hands. What I want is a left handed way of doing this.

Alternatively, a way of remapping the "Alt Gr" key so that it generates the same code as the left hand "Alt" key, would enable me to CTRL-ALT-DEL with one hand also.

Cheers

StuartN
April 16th, 2009, 10:03 PM
You could add "sudo halt" or "sudo shutdown -h now" to the menu.

potatan
April 17th, 2009, 08:27 AM
You could add "sudo halt" or "sudo shutdown -h now" to the menu.

Thanks, but that's a little bit too immediate if I hit it by accident. I know I could add a +3 option rather than "now" to shutdown in 3 minutes, but then I'd have to issue a "sudo shutdown -c" to stop it if I click the menu item by mistake.

What I would like is the command to load the GUI applet(?) that gives the options to shutdown, hibernate etc.

I can add this launcher to the panel that brings up the shutdown window I'm talking about, but what is the command line for that, so I can add it to the System menu?

Cheers

StuartN
April 17th, 2009, 12:43 PM
Thanks, but that's a little bit too immediate if I hit it by accident.

You could add a confirmation before the shutdown by putting this in a script, making the script executable and calling the script from the menu. (You could also add $REPLY == "l" to logout, "r" to restart, etc)


read -p "Shutdown (y/n)?"
[ "$REPLY" == "y" ] || sudo shutdown -h now


As for the dialogue that appears under System->Shut Down..., I can't see any process or executable.

Aearenda
April 17th, 2009, 12:53 PM
I think you need to add
gnome-session-save --shutdown-dialogto your menu.