LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-07-2006, 10:30 AM   #1
frankkky
Member
 
Registered: Sep 2006
Posts: 52

Rep: Reputation: 15
PC shut down with a single key??


i've seen on tv's people shuting down PC's just by hitting a single key in the keyboard, which key is that, how do i do such?
 
Old 12-07-2006, 11:08 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
normally the power button, either on the keyboard or on the front of the case.
 
Old 12-07-2006, 11:28 AM   #3
Hitboxx
Senior Member
 
Registered: Mar 2006
Location: India
Distribution: Fedora
Posts: 1,562
Blog Entries: 3

Rep: Reputation: 61
Yes it can be absolutely done. Remember i'm doing this on FC6 using Gnome. You need to use Gnome Configuration Editor(gconf-editor). If you don't have it, install it by 'yum install gconf-editor'.

Step:1) Run 'gconf-editor' in terminal or from the link in some menu.

Step:2) Navigate to apps>metacity>global_keybindings.

Step:3) In the right pane, edit the value for any of the 'run_command_#' entries. Give it a value like F12,F10,<Control><Alt>e etc.

Step:4) Now navigate to global_keybindings in the same apps>metacity. Edit the value for the corresponding 'command_#' and type in 'halt -p'.

Don't get confused, for eg., if you gave F12 in run_command_1, enter 'halt -p' in command_1.

Now, when you hit F12 as in eg, the system will completely poweroff.

Some points worth noting:
* Entries can be edited by right-clicking on them and click 'edit key'.
* 'halt -p' is the command to completely poweroff the system. 'halt' will just shutdown without turning off power.
* Preferably don't edit any of the already assigned keys. Do a new one.
* Be very cautious while using the key(F12), no confirmation will be given and no open works will be saved.

NOTE: This will only work in Gnome using Metacity. Won't if you use compiz/XGL or AIGLX instead of metacity.

Hope this helps
Cheers
 
  


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
How to read a single key? kornerr Programming 5 11-01-2005 12:07 PM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
shut down won't shut system down taoweijia Linux - General 3 03-03-2004 07:05 PM
Single command to shut X down...? yarnar Linux - Software 6 12-11-2003 04:15 AM
CD encryption bypassed by a single key... acid_kewpie General 4 10-09-2003 11:50 PM


All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration