Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
2  
and, Mr Schroedinger, how will you know if the screensaver runs when the lid is closed? – pavium Apr 25 '11 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 – Arctor Apr 25 '11 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.) – grawity Apr 25 '11 at 15:32

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.

share|improve this answer

You must log in to answer this question.

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