View Full Version : keyboard shutdown
wombil
11-17-2010, 08:27 PM
Hello All,Just a quick one.I know there is a sticky on linux commands but I am looking for a keyboard command to shut down ubuntu.There seems to be keyboard commands for just about everything but just a simple shutdown.If there is one,what is it please?
Thankyou.
Paul Komski
11-17-2010, 08:36 PM
If you mean something typed into a console you could enter (maybe sometimes prefixed by sudo):
poweroff (http://onlamp.com/linux/cmd/cmd.csp?path=p/poweroff) or reboot (http://onlamp.com/linux/cmd/cmd.csp?path=r/reboot)
... or shutdown (http://onlamp.com/linux/cmd/cmd.csp?path=s/shutdown)with the appropriate switch.
wombil
11-17-2010, 09:53 PM
Thanks Paul,but what I am looking for is a way to shutdown using the keyboard only,ctrl+s or something like that as can be done in windows for example.I cannot access the console,terminal or any thing and can only shutdown with the power on/off button,and repeatedly doing this would/has wrecked the system more.
Thanks for the reply.
Paul Komski
11-18-2010, 08:58 AM
When I press (and immediately release) the power button I get presented with the log-out window from which ALT+U will then power-off the PC. Pressing CTRL+ALT+DEL also presents me with the same log-out window, etc, etc.
If that's not good enough it should be possible to configure a script to do this and later assign a custom keyboard shortcut to suit. The problem I have had so far when trying to do this is that, so far anyway, I must use gksudo and will then get presented with a prompt for a password.
If you want to see what I mean press ALT+F2 and this should open the run box into which you then enter:
gksudo poweroff
To make a script to do the same thing open a console window and enter:-
gedit turnoff.sh
Replace the blank text with the two lines:-
#!/bin/sh
gksudo poweroff
and save the file (I usually use CTRL+S)
At the command prompt then enter:-
chmod 777 turnoff.sh
And finally execute the script with:-
./turnoff.sh
I'm sure there must be a way to avoid being prompted for the password and also to assign a keyboard combination to execute that script (http://www.codejacked.com/create-custom-keyboard-shortcuts-in-linux/); but I haven't got that far yet.
wombil
11-18-2010, 06:16 PM
Thanks Mate, seems like there is no simple 2 or 3 key combinations for shutdown. Will give this a go but not really conversant with codes etc.
If I just load ubuntu 10.04.1 over this os could I transfer my data at the same time.
I transfer stuff from drive to drive to drive with pudd ,I think ,in puppy linux.
Paul Komski
11-18-2010, 08:47 PM
I was wrong about ALT+U which is for suspend; Shut Down is ALT+S
But its pretty straightforward to hold down CTRL+ALT with Left hand and hit DEL with Right Hand then lift the finger off CTRL and hit S with the Right Hand.
wombil
11-18-2010, 09:19 PM
Here We are again, Some explanation may be necessary.
The original cause of all this is that I was fiddling with the resolution settings and apparently set it too low.600 or something.The PC would not start,got a black screen with message,"Mode not supported",so I think I'll just go back to 1400x900 ?.Not so,All I can get is the black screen and message.I have got to a stage where I get a black screen with a lot of messages,one says,"An error occurred while loading or saving configuration information for update notifier.Some of your configuration settings may not work properly." and all of my desktop icons ,My computer etc are showing but no top or bottom tool or task bar showing therefore I cannot access any commands to change the resolution back.
after many restarts with the power button I was looking for a simple keyboard shutdown.
Now back to where we were before.I have found via the sticky on shortcut keys that pressing Ctrl+Alt+Backspace gets me out of my black screen to the gnome startup screen with the options in the bottom left corner where I can just select shutdown or access a terminal with my password and type,"gksudo poweroff",Both methods shutdown ok.
Next move is to load ubuntu 10.04.1 on to a new HDD and slave the old 8.04.4 to it and try to move all mt data to the new HDD with Puppy,pudd.
Been a long story but thanks for putting up with Me.
wombil.
Paul Komski
11-18-2010, 09:52 PM
You probably need to try VGA=771
Change Boot Options (https://help.ubuntu.com/community/BootOptions#Change%20Boot%20Options%20Temporarily% 20For%20An%20Existing%20Installation)
VGA Boot Modes (http://www.pendrivelinux.com/vga-boot-modes-to-set-screen-resolution/)
wombil
11-29-2010, 07:10 PM
Thanks for all the help Guys,
I 've been away for a while so a bit lax getting back to this.
Problem is solved.The main issue was the resolution and not having any toolbar/taskbar toalter anything and get the desktop back to normal.A nephew called in yesterday and after fiddling for 20 minutes or so,
Opened failsafe startup from options,[bottom left hand corner before entering name/password.]
Opened terminal and entered,"gnome-panel",which revealed the taskbar/toolbar.
Reset the resolution to 1280x768.
Restarted and all is well again.
Thanks again.
vBulletin v3.6.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.