Results 1 to 4 of 4

Thread: [SOLVED] Can I do a safe shutdown with the power button?

  1. #1
    Join Date
    Apr 2006
    Location
    Ireland
    Beans
    213

    [SOLVED] Can I do a safe shutdown with the power button?

    I'm wondering about setting Ubuntu Server to shutdown safely from the power button on the case.
    I had a linux based server package installed before and the following commands installed and set it up for me, will this do the same on Ubuntu Server? (with the sudo prefix of course)

    Code:
    apt-get install acpid
    service acpid start
    This would be great, the noisey server is in an empty bedroom but people stay from time to time and I'm not always there to shut it down and rather than having to give other people the password etc.
    Clarkconnect Server (Red Hat)
    Dell Latitude D610 (Windows XP/Ubuntu 8.10)
    Gaming PC (Windows XP)

  2. #2
    Join Date
    Jan 2006
    Location
    Granada, Spain
    Beans
    224
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Can I do a safe shutdown with the power button?

    AFAIK this comes by default with Ubuntu Server, my Ubuntu server does this. When I press the power button it beeps shortly and then shuts down safely.

    However, if you're logged in in a Gnome session, it will prevent it from shutting down and show the log out dialog instead (I have no GUI on the server), though there might be a way to do it.

    Hope this helps.

    Cheers,
    Benedikt Bär - www.relamp.tk
    WARNING: Some commands can be harmful when executed, especially the ones starting with "rm". If you are in doubt what a certain command will do, please ask other members first before executing!

  3. #3
    Join Date
    May 2005
    Location
    Essex, S.E.England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Can I do a safe shutdown with the power button?

    Quote Originally Posted by grs View Post
    I'm wondering about setting Ubuntu Server to shutdown safely from the power button on the case.
    I had a linux based server package installed before and the following commands installed and set it up for me, will this do the same on Ubuntu Server? (with the sudo prefix of course)

    Code:
    apt-get install acpid
    service acpid start
    This would be great, the noisey server is in an empty bedroom but people stay from time to time and I'm not always there to shut it down and rather than having to give other people the password etc.
    Hi

    I hope I haven't misunderstood what you are trying to do but to shutdown you can type (In either term or another terminal (CTRL-ALT-F3 say))

    sudo shutdown -h now (This shuts down the machine)
    sudo shutdown -r now (This restarts the machine)

    You will of course be prompted for your password

    Kind regards john
    Pax et bonum (Peace and all good) john
    Ubuntu user #18889

  4. #4
    Join Date
    Apr 2006
    Location
    Ireland
    Beans
    213

    Re: Can I do a safe shutdown with the power button?

    You have misunderstood me as I said above:-

    This would be great, the noisey server is in an empty bedroom but people stay from time to time and I'm not always there to shut it down and rather than having to give other people the password etc.

    I know how to shutdown with commands.
    My Ubuntu Server must not have acpid running as standard. I now have it installed and running fine. Thanks
    Last edited by grs; September 8th, 2008 at 04:06 PM.
    Clarkconnect Server (Red Hat)
    Dell Latitude D610 (Windows XP/Ubuntu 8.10)
    Gaming PC (Windows XP)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •