konsole shutdown possible? or key combo = shutdown possible?
is there a way to shut down my redhat 9.0 system by typing something in the konsole or can i press a+b+c to shut it down? like ctrl+alt+backspace to kill X system, can I do that to shutdown/restart?
thx in advance |
/sbin/halt -h now
or /sbin/shutdown -h now or /sbin/poweroff -p |
You can make init respond to the KeyboardSignal that is generated by pressing a particular key combination. On my RH9 system the KeyboardSignal is generated by pressing Alt+Up by default. It's a good idea to disable this key combination from generating the KeyboardSignal because it is possible to press Alt+Up accidentally when you mean to press Alt+Right or Alt+Left to swich to the next or previous console.
To change the key combination used for to generate the KeyboardSignal I edited the file /lib/kbd/keymaps/i386/include/linux-keys-bare.inc to disassociate Alt+Up from the KeyboardSignal. I found the line: alt keycode 103 = KeyboardSignal I changed it to: #alt keycode 103 = KeyboardSignal I decided to assign Ctrl+AltGr+End to KeyboardSignal. To do this I added the following lines to the file /lib/kbd/keymaps/i386/include/linux-with-alt-and-altgr.inc: # Assign Ctrl+AltGr+End to KeyboardSignal control altgr keycode 107 = KeyboardSignal You may find out what keycode is associated with a key by using the showkey command. To get init to perform a command when you generate the KeyboardSignal I added the following line to /etc/inittab: kb::kbrequest:/sbin/shutdown -t3 -h now Now it is just a matter of running # service keytable restart # telinit q I found that after running those two commands that the KeyboardSignal is associated with both Alt+Up and Ctrl+AltGr+End. This will change next time you reboot. Just try to avoid pressing Alt+Up in a console accidentally until then. EDIT: I have actually found now that after running "service keytable restart" that Alt+Up actually is disassociated with the KeyboardSignal. |
CTRL+ALT+F2
log on and type init 0 or CTRL+ALT+BACKSPACE type init 0 init 0 means halt init 6 means reboot |
All times are GMT -5. The time now is 05:07 AM. |