Results 1 to 2 of 2

Thread: Laptop power-down question

  1. #1

    Laptop power-down question

    Is there a way in Ubuntu 7.1 to set up a laptop where if it detects it's running on the battery, that it automatically shuts down? (meaning I ONLY want it to be running on its power supply).

    Thanks to any replies!

  2. #2
    I'd say make a script that checks a file in /proc/acpi for the power state of the laptop and then shutdown if it detects the laptop isn't plugged in. Then take that script and make it rc.d aware (I don't use ubuntu, so I don't know the specifics of start up scripts, but it looks like sticking something in /etc/rc.d/rc.local is what you want)
    63,000 bugs in the code, 63,000 bugs,
    ya get 1 whacked with a service pack,
    now there's 63,005 bugs in the code!!

Similar Threads

  1. Laptop AC Adapter | Notebook AC Adapter | Notebook Power Adapters | Buy Laptop Access
    By luthartyne in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 11-25-2012, 01:35 PM
  2. Replies: 1
    Last Post: 07-14-2004, 02:56 AM
  3. Anyone wanna buy a laptop.....not just ANY laptop ....
    By boblucci in forum General Chat
    Replies: 5
    Last Post: 10-11-2002, 10:53 PM
  4. IP over Power
    By gorn in forum Linux - Hardware, Networking & Security
    Replies: 5
    Last Post: 05-09-2002, 12:22 PM
  5. I want more power!!
    By in forum Linux - Hardware, Networking & Security
    Replies: 19
    Last Post: 04-08-2002, 06:39 AM


Posting Permissions

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