Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-24-2004, 10:31 PM   #1
Registered: Nov 2003
Distribution: xubuntu
Posts: 217

Rep: Reputation: 30
Special Keybind CTRL+ALT+END

I'm wondering how I can associate CTRL+ALT+END with a system halt.

I've noticed that in /etc/inittab there's an entry:

ca:12345:ctrlaltdel:/sbin/shutdown -r now
The above allows me to reboot with CTRL+ALT+DEL (only works on VTERMs though). I tried the following:

ca:12345:ctrlaltend:/sbin/shutdown -h now
Didn't work though.

What would I need to do? I'm tired of switching to a vterm, logging in as root, and typing the whole command out. When I reboot, I don't need to log in, or log in as root. I just CTRL+ALT+DEL. I'm looking to do CTRL+ALT+END for halting.

Old 05-24-2004, 10:33 PM   #2
Mega Man X
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Maybe you could use some third part programs for key grabbing as Xbindkeys and associate the keys you want with shutdown -h now command
Old 05-24-2004, 10:36 PM   #3
Registered: Nov 2003
Distribution: xubuntu
Posts: 217

Original Poster
Rep: Reputation: 30
I have Xbindkeys installed. I use it in X, though. And the keybinds don't carry over to vterms.
Old 05-25-2004, 12:07 AM   #4
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Pull up a terminal and do "man inittab"

On my system, there is an "action" field (corresponding to the ctrlaltdel field), and it has an available value of kbrequest. Reading the short description of it, it sounds like what you're looking for. However, I know nothing about the keymaps file or where to locate the documentation you need in the kbd package. It's a start though.
Old 05-25-2004, 01:08 AM   #5
Registered: Nov 2003
Distribution: xubuntu
Posts: 217

Original Poster
Rep: Reputation: 30
Thanks! That was exactly what I needed. I got it working, though, with CTRL+ALT+INSERT. INSERT seems more fitting for the command than END, so, I'm not going to bother setting it up for END.

Anyway, this is what I did

1) First you need to put this line in your /etc/inittab
kb:12345:kbrequest:/sbin/shutdown -t1 -h now
2) Then, you need to find the location of the DEFAULT keymap. It's called on my system. For me, it's located in /usr/share/kbd/keymaps.

3) Even though this file has a .gz extension, it isn't gzipped. Open it with your favorite text editor.

4) Proceed all the way down to the bottom of the file, and paste in the following:
keycode 110 = Insert
        altgr   control keycode 110 = KeyboardSignal
        control alt     keycode 110 = KeyboardSignal
You'll need to restart the system after making these changes. If your system does not call loadkeys -d at boot, you'll need to call it yourself otherwise the changes wont be present.

Then, just CTRL+ALT+F{1,2,3,4,5,6} into a VTERM and test it out! CTRL+ALT+INSERT.

Make sure you close/save your data in X or where ever. Wouldn't want to lose it now would we?

the above has been tested on my system and i make no guarantees that it will work on yours

Last edited by fr0zen; 05-25-2004 at 01:09 AM.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get Right-Alt key to be just Alt and not generate special characters? (KDE) KWTm Linux - General 2 06-25-2005 10:26 PM
No alt-ctrl-F7/F8 spotslayer SUSE / openSUSE 3 04-26-2005 08:50 PM
dark screen when pressing Ctrl + Alt + Backspace or Ctrl + Alt F1-F6 in Gnome or KDE trinoo Slackware 5 01-28-2005 09:13 AM
Switching window focus (like alt+tab in windows) and Ctrl+Alt+F1 X windows problem... DiZASTiX Linux - Software 3 01-20-2005 05:56 PM
Ctrl-Alt-F* Fiskarn Mandriva 2 10-15-2003 03:44 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration