LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-14-2003, 11:34 PM   #1
Laptop2250
Member
 
Registered: Oct 2003
Posts: 131

Rep: Reputation: 15
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
 
Old 11-14-2003, 11:49 PM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
/sbin/halt -h now

or

/sbin/shutdown -h now

or

/sbin/poweroff -p

Last edited by megaspaz; 11-14-2003 at 11:50 PM.
 
Old 11-15-2003, 12:21 AM   #3
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
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.

Last edited by hazza; 11-15-2003 at 12:48 AM.
 
Old 11-16-2003, 10:44 AM   #4
teval
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Gentoo
Posts: 720

Rep: Reputation: 30
CTRL+ALT+F2
log on and type init 0

or
CTRL+ALT+BACKSPACE
type init 0

init 0
means halt
init 6
means reboot
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
'd' key causes shutdown Krishna100 Linux - General 12 05-16-2006 04:05 AM
'd' key causes shutdown Krishna100 Linux - Hardware 1 08-30-2005 02:14 AM
Please help on how to save services shutdown or shutdown from the terminal. wambuzz Linux - General 2 03-11-2005 07:38 AM
Linux full shutdown vs. manual shutdown? LQtoto Linux - General 9 01-26-2005 06:21 PM
Bind Power Down Keyboard Key to Shutdown... jpsrm Linux - General 1 01-07-2003 12:05 AM


All times are GMT -5. The time now is 03:52 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