![]() |
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: Code:
ca:12345:ctrlaltdel:/sbin/shutdown -r now Code:
ca:12345:ctrlaltend:/sbin/shutdown -h now 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. Thanks. |
Maybe you could use some third part programs for key grabbing as Xbindkeys and associate the keys you want with shutdown -h now command ;)
|
I have Xbindkeys installed. I use it in X, though. And the keybinds don't carry over to vterms.
|
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. |
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 Code:
kb:12345:kbrequest:/sbin/shutdown -t1 -h now 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: Code:
keycode 110 = Insert 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 |
All times are GMT -5. The time now is 04:27 PM. |