1

How can I run xscreensaver whenever the lid is closed? I'm running Ubuntu 10.10 with the awesome window manager.

3
  • 2
    and, Mr Schroedinger, how will you know if the screensaver runs when the lid is closed?
    – pavium
    Commented Apr 25, 2011 at 0:16
  • its actually running and not running at the same time until observed at which point it is no longer in super position and only in one state
    – Riguez
    Commented Apr 25, 2011 at 0:51
  • @pavium: ps over SSH, duh. (Or, hide behind a corner and watch someone opening the lid and getting the Xscreensaver password prompt.) Commented Apr 25, 2011 at 15:32

1 Answer 1

0

Using ubuntu 10.04, there is a file /etc/acpi/sleep.sh. That file contains, among others, the command pm-suspend, which is the suspend command. I assume that when you change that line, you can invoke the screensaver instead of suspending. Note that the file does some checks and bails out on some conditions which I do not grasp completely.

On your system the file might be named differently.

I did following search:

grep pm-suspend -r /etc/

Alternatively: you could replace the command pm-suspend with a script starting the screensaver. I really really do not recommend this. The package manager will not like this, and any other situations where pm-suspend is expected to work the way it does will break.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .