Results 1 to 5 of 5

Thread: How to go to standby from Terminal?

  1. #1
    Join Date
    Jul 2009
    Beans
    75

    How to go to standby from Terminal?

    Hello,

    I'm using Ubuntu 9.10 on my laptop (MD 95500). Standby works fine for me - activated from the gui.

    But I can't activate standby from the terminal.

    When I run
    Code:
    sudo /etc/acpi/sleep.sh
    nothing happens.


    As Standby works really perfect for me, it can't be so tricky to find the right command for that.

    Which command uses the gnome-gui? For exmaple when I close my notebook, it goes to standby....

    I searched around a while, just couldn't find anything.

    Thanks for help

    Bye
    MPW

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to go to standby from Terminal?

    Here's a thread on laptop lid closing events. Perhaps you could run a script that simulates closing the lid:

    http://ubuntuforums.org/showthread.p...ptop+lid+sleep

    There are several ways to put your machine to sleep. The active methods are described in:

    cat /etc/default/acpi-support

    man pm-suspend
    Last edited by tgalati4; March 2nd, 2010 at 09:36 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    Jul 2009
    Beans
    75

    Re: How to go to standby from Terminal?

    Hello,

    thanks for your answer.

    Gonna try pm-suspend...

    Bye
    MPW

  4. #4
    Join Date
    Jul 2009
    Beans
    75

    Re: How to go to standby from Terminal?

    Hello again,

    okay, pm-suspend works great.

    Just one last point: When reawaking the laptop from standby, it doesn't ask for my password.

    When I go to standby by closing the laptop, it asks for the password...

    Any idea?

    Thanks so far

    Bye
    MPW

  5. #5
    Join Date
    Nov 2005
    Beans
    209

    Re: How to go to standby from Terminal?

    Quote Originally Posted by mpw View Post
    Hello again,

    okay, pm-suspend works great.

    Just one last point: When reawaking the laptop from standby, it doesn't ask for my password.

    When I go to standby by closing the laptop, it asks for the password...

    Any idea?

    Thanks so far

    Bye
    MPW
    The following script works fine for me:

    #! /bin/bash
    gnome-screensaver-command --lock
    sleep 5
    dbus-send --system --print-reply --dest=org.freedesktop.Hal \
    /org/freedesktop/Hal/devices/computer \
    org.freedesktop.Hal.Device.SystemPowerManagement.S uspend int32:0

    grtz, Herman

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
  •