How to deep-sleep via command line?

Ask a Question related to Mac Applications & Software, Design and Development.

  1. #1

    Default Re: How to deep-sleep via command line?

    In article <b133d89.0307210900.1bd7cae5@posting.google.com> ,
    [email]steven@kan.org[/email] (Steven Kan) wrote:
    > My G4/450DP running 10.2.6 will deep-sleep if I press the power button
    > or if I select Sleep from the Apple menu, but if I just let it sit
    > there for 30-60 minutes, it only goes into light sleep (e.g. screen
    > goes dark and drives spin down, but the fans stay on).
    >
    > Aside from fixing the specific problem, how do I tell my Mac to deep
    > sleep via the command line? (e.g. when SSH'ed in from a remote
    > location). Thanks!
    sudo osascript -e 'tell application \"Finder\" to sleep'

    Unfortunately, this only works if the Finder is running (i.e. someone is logged
    in).

    --
    Sandman[.net]
    Sandman Guest

  2. Similar Questions and Discussions

    1. #40715 [NEW]: level too deep - recursive dependency? in Unknown on line 0
      From: shoichi at cf7 dot so-net dot ne dot jp Operating system: CentOS4.4 PHP version: 5.2.1 PHP Bug Type: Scripting Engine...
    2. RUN/execute a Command-Line command from an ASP page
      Hi, I need to RUN/execute a Command-Line command from an ASP page. This is the command: sse45.exe -i k:\o\2.wmv -o k:\o\2.shh -w 128 -df 0 -m 2...
    3. RUN/execute a Command-Line command from an ASP page.
      Hi, I need to RUN/execute a Command-Line command from an ASP page. This is the command: sse45.exe -i k:\o\2.wmv -o k:\o\2.shh -w 128 -df 0 -m 2...
    4. sleep command in iterators (silly n00b toy question)
      So, still busy just getting introduced to this ruby business. For riduculous reasons entirely my own, I decide it would neat-o to have a programm...
    5. G4 will deep sleep, but not automatically
      My G4/450DP running 10.2.6 will deep-sleep if I press the power button or if I select Sleep from the Apple menu, but if I just let it sit there for...
  3. #2

    Default Re: How to deep-sleep via command line?

    Sandman <mr@sandman.net> wrote:
    > In article <b133d89.0307210900.1bd7cae5@posting.google.com> ,
    > [email]steven@kan.org[/email] (Steven Kan) wrote:
    >
    >> My G4/450DP running 10.2.6 will deep-sleep if I press the power button
    >> or if I select Sleep from the Apple menu, but if I just let it sit
    >> there for 30-60 minutes, it only goes into light sleep (e.g. screen
    >> goes dark and drives spin down, but the fans stay on).
    >>
    >> Aside from fixing the specific problem, how do I tell my Mac to deep
    >> sleep via the command line? (e.g. when SSH'ed in from a remote
    >> location). Thanks!
    Typically, sleep kills network connections, so you shall have hung
    yourself, as it were. Nevertheless:

    man -k power

    leads to:

    man pmset
    >
    > sudo osascript -e 'tell application \"Finder\" to sleep'
    >
    > Unfortunately, this only works if the Finder is running (i.e. someone is logged
    > in).
    >
    Steve Lidie Guest

  4. #3

    Default Re: How to deep-sleep via command line?

    In article <bfhmlm$qho@fidoii.CC.Lehigh.EDU>,
    Steve Lidie <lusol@cube0.CC.Lehigh.EDU> wrote:
    > Sandman <mr@sandman.net> wrote:
    > > In article <b133d89.0307210900.1bd7cae5@posting.google.com> ,
    > > [email]steven@kan.org[/email] (Steven Kan) wrote:
    > >
    > >> My G4/450DP running 10.2.6 will deep-sleep if I press the power button
    > >> or if I select Sleep from the Apple menu, but if I just let it sit
    > >> there for 30-60 minutes, it only goes into light sleep (e.g. screen
    > >> goes dark and drives spin down, but the fans stay on).
    > >>
    > >> Aside from fixing the specific problem, how do I tell my Mac to deep
    > >> sleep via the command line? (e.g. when SSH'ed in from a remote
    > >> location). Thanks!
    >
    > Typically, sleep kills network connections, so you shall have hung
    > yourself, as it were. Nevertheless:
    >
    > man -k power
    >
    > leads to:
    >
    > man pmset
    Which won't do what the OP wants.
    >
    > >
    > > sudo osascript -e 'tell application \"Finder\" to sleep'
    > >
    > > Unfortunately, this only works if the Finder is running (i.e. someone is
    > > logged
    > > in).
    > >
    --
    Tom Stiller

    PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
    7BDA 71ED 6496 99C0 C7CF
    Tom Stiller Guest

  5. #4

    Default Re: How to deep-sleep via command line?

    In article <bfhmlm$qho@fidoii.CC.Lehigh.EDU>,
    Steve Lidie <lusol@cube0.CC.Lehigh.EDU> wrote:
    > Sandman <mr@sandman.net> wrote:
    > > In article <b133d89.0307210900.1bd7cae5@posting.google.com> ,
    > > [email]steven@kan.org[/email] (Steven Kan) wrote:
    > >
    > >> My G4/450DP running 10.2.6 will deep-sleep if I press the power button
    > >> or if I select Sleep from the Apple menu, but if I just let it sit
    > >> there for 30-60 minutes, it only goes into light sleep (e.g. screen
    > >> goes dark and drives spin down, but the fans stay on).
    > >>
    > >> Aside from fixing the specific problem, how do I tell my Mac to deep
    > >> sleep via the command line? (e.g. when SSH'ed in from a remote
    > >> location). Thanks!
    >
    > Typically, sleep kills network connections, so you shall have hung
    > yourself, as it were. Nevertheless:
    Your SSH connection dies, yes, but that's not a problem.
    > man -k power
    >
    > leads to:
    >
    > man pmset
    Which is a command line utility for setting power management settings. It's
    identical to the energy saver preference pane in functionality. And you can't
    use it to tell the machine to sleep.

    --
    Sandman[.net]
    Sandman Guest

  6. #5

    Default Re: How to deep-sleep via command line?

    [email]steven@kan.org[/email] (Steven Kan) wrote in message news:<b133d89.0307210900.1bd7cae5@posting.google.c om>...
    > My G4/450DP running 10.2.6 will deep-sleep if I press the power button
    > or if I select Sleep from the Apple menu, but if I just let it sit
    > there for 30-60 minutes, it only goes into light sleep (e.g. screen
    > goes dark and drives spin down, but the fans stay on).
    >
    [snip]
    Also, any tips on how to fix the sleeping problem? The Energy Saver
    prefs are set with Separate Sleep for display un-checked and Spin Down
    HDs unchecked.

    Thanks!
    Steven Kan Guest

  7. #6

    Default Re: How to deep-sleep via command line?

    Sandman <mr@sandman.net> wrote in message news:<mr-32FF50.21241521072003@news.fu-berlin.de>...
    > In article <b133d89.0307210900.1bd7cae5@posting.google.com> ,
    > [email]steven@kan.org[/email] (Steven Kan) wrote:
    >
    > > My G4/450DP running 10.2.6 will deep-sleep if I press the power button
    > > or if I select Sleep from the Apple menu, but if I just let it sit
    > > there for 30-60 minutes, it only goes into light sleep (e.g. screen
    > > goes dark and drives spin down, but the fans stay on).
    > >
    > > Aside from fixing the specific problem, how do I tell my Mac to deep
    > > sleep via the command line? (e.g. when SSH'ed in from a remote
    > > location). Thanks!
    >
    > sudo osascript -e 'tell application \"Finder\" to sleep'
    >
    > this only works if the Finder is running (i.e. someone is logged in).
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^

    Does this mean logged in graphically, or would my SSH login qualify?
    Is there any way I can trigger a graphical login from my SSH session
    and _then_ tell it to go to sleep?
    Steven Kan Guest

  8. #7

    Default Re: How to deep-sleep via command line?

    In article <b133d89.0307221621.3fdc7968@posting.google.com> ,
    [email]steven@kan.org[/email] (Steven Kan) wrote:
    > > sudo osascript -e 'tell application \"Finder\" to sleep'
    > >
    > > this only works if the Finder is running (i.e. someone is logged in).
    > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
    >
    > Does this mean logged in graphically, or would my SSH login qualify?
    No, the Finder needs to be running, which it doesn't if no one is logged in
    'grapichally'
    > Is there any way I can trigger a graphical login from my SSH session
    > and _then_ tell it to go to sleep?
    I don't think so no.

    --
    Sandman[.net]
    Sandman Guest

  9. #8

    Default Re: How to deep-sleep via command line?

    On Wed, 23 Jul 2003, Sandman wrote:
    > In article <b133d89.0307221621.3fdc7968@posting.google.com> ,
    > [email]steven@kan.org[/email] (Steven Kan) wrote:
    >
    > > > sudo osascript -e 'tell application \"Finder\" to sleep'
    > > >
    > > > this only works if the Finder is running (i.e. someone is logged in).
    > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
    > >
    > > Does this mean logged in graphically, or would my SSH login qualify?
    >
    > No, the Finder needs to be running, which it doesn't if no one is logged in
    > 'grapichally'
    >
    > > Is there any way I can trigger a graphical login from my SSH session
    > > and _then_ tell it to go to sleep?
    >
    > I don't think so no.
    you can send a sleep appleevent to the loginwindow process but you can't
    talk to it via applescript, so writing a small program that does that
    might work. However i seem to recall that sending applevents from a
    process not run by a graphically logged in user is kinda icky.

    Fred

    Frederick Cheung Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139