LinuxQuestions.org
Visit Jeremy's Blog.
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 08-24-2008, 04:09 PM   #1
E71
LQ Newbie
 
Registered: Oct 2007
Distribution: CentOS 5.3
Posts: 20

Rep: Reputation: 0
Question Computer power button not functioning until you login.


Hi all,

Is there any way I can get Fedora 8 to respond to my computer's power button being pressed even when no-one has logged in?

It only appears to work after you log in...

Thanks,
E71
 
Old 08-25-2008, 01:12 PM   #2
bapigoo9
Member
 
Registered: Aug 2008
Posts: 107

Rep: Reputation: 16
An alternative is to use the Shutdown option at the login screen. I have used Fedora 9, and I would use the Shutdown option...next time I can try to power down with the button...keep in mind that Linux likes to shutdown nicely, so that it can do all of its clean-up. You should use the Shutdown command. Any reason not to upgrade to Fedora 9?

If you power-down without letting Linux shutdown nicely, you may lose some data or have to give Linux the chance to clean-up on reboot.

Is that problem universal for Fedora 8?
 
Old 08-25-2008, 04:20 PM   #3
E71
LQ Newbie
 
Registered: Oct 2007
Distribution: CentOS 5.3
Posts: 20

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by bapigoo9 View Post
An alternative is to use the Shutdown option at the login screen. I have used Fedora 9, and I would use the Shutdown option...next time I can try to power down with the button...keep in mind that Linux likes to shutdown nicely, so that it can do all of its clean-up. You should use the Shutdown command. Any reason not to upgrade to Fedora 9?

If you power-down without letting Linux shutdown nicely, you may lose some data or have to give Linux the chance to clean-up on reboot.

Is that problem universal for Fedora 8?
Thanks for the reply, however to clarify my situation:

My FC8 box has no keyboard/mouse/screen connected and is controlled purely via SSH over the network. To shutdown, I normally issue the shutdown -h now command.

Normally, when I switch it on, it always remains on the login screen but I'd like for it to shutdown as normal (clean shutdown) by pressing (without holding) the power button (just like how you would in Windows or Linux after logging in).

Any suggestions?

Thanks,
E71
 
Old 08-25-2008, 06:35 PM   #4
bapigoo9
Member
 
Registered: Aug 2008
Posts: 107

Rep: Reputation: 16
E71, I think that I get your question after you explained it a bit more. There is something called Power Management, and while I can not point to the specific place in FC8 to find it (since I am not using the FC9 that I have right now...) you would need to change the settings so that it would allow you to power down ("shutdown") nicely from the login screen. If you look for it, you should find it. Someone else who has FC8 or 9 handy should be able to give the exact answer to your question.

Another option that I would like, that is better than just attaching a keyboard to it and to know what to do to get it to shutdown, is to make it into a touch-screen system. Then you just touch the shutdown option, and you are done. Too fancy for you?
 
Old 08-25-2008, 07:21 PM   #5
E71
LQ Newbie
 
Registered: Oct 2007
Distribution: CentOS 5.3
Posts: 20

Original Poster
Rep: Reputation: 0
Hehe. Not too fancy, just too expensive. Still, thanks for the suggestions, I'll check it out.
 
Old 08-26-2008, 12:27 AM   #6
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 452

Rep: Reputation: Disabled
Have a look at the file /etc/acpi/acpi_handler.sh

That's its location on Slackware - on RH it may have a different location.

You will need something like the following in it:

Code:
#!/bin/sh
# Default acpi script that takes an entry for all actions

IFS=${IFS}/
set $@

case "$1" in
  button)
    case "$2" in
      power) /sbin/init 0
         ;;
      *) logger "ACPI action $2 is not defined"
         ;;
    esac
    ;;
  *)
    logger "ACPI group $1 / action $2 is not defined"
    ;;
esac
The line in red is the crucial line. You might like to change it to one of the shutdown commands or poweroff.

If you want it to do something more complex, then have it call your own script in that line and put the commands you want it to execute in that script.

Place your script in the same directory as that of acpi_handler.sh.

Last edited by harryhaller; 08-26-2008 at 12:33 AM.
 
Old 08-26-2008, 03:48 PM   #7
E71
LQ Newbie
 
Registered: Oct 2007
Distribution: CentOS 5.3
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for the suggestion. I'm having some trouble finding the Redhat counterpart but I'm sure it's there somewhere. Thanks again.
 
Old 01-11-2009, 06:51 PM   #8
bapigoo9
Member
 
Registered: Aug 2008
Posts: 107

Rep: Reputation: 16
Did you find the counterpart in RH? Post your solution if it works now.
 
Old 01-11-2009, 06:57 PM   #9
E71
LQ Newbie
 
Registered: Oct 2007
Distribution: CentOS 5.3
Posts: 20

Original Poster
Rep: Reputation: 0
Unhappy

I'm afraid I couldn't find it.

It would be nice to know how because it would make my fileserver/nas a little more like an appliance.
 
Old 01-11-2009, 07:02 PM   #10
bapigoo9
Member
 
Registered: Aug 2008
Posts: 107

Rep: Reputation: 16
This is not a direct answer to your question, but should help you get started in the right direction.
 
Old 01-12-2009, 06:45 AM   #11
E71
LQ Newbie
 
Registered: Oct 2007
Distribution: CentOS 5.3
Posts: 20

Original Poster
Rep: Reputation: 0
Thumbs up

Thank you. I'll check it out.
 
  


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
Is there any way to turn off the computer power without pushing the button? Necronomicom Slackware 11 02-27-2006 04:50 AM
Press power button can't turn down the computer shadkong Linux - Hardware 2 05-04-2005 10:50 PM
Power button shuts down computer? kaega2 Linux - Software 0 01-08-2004 07:32 PM
power button turns computer off kaega2 Linux - Hardware 8 12-15-2003 09:59 AM
how to get mandrake 9.0 shut down the computer without pushing the power button? sirpelidor Mandriva 8 11-25-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:52 AM.

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