Damn Beryl and their data loss :evil:
All the information was on there before, all of the xscreensavers are just standalone apps which are started and killed when (in)activity is detected.
I think gnome-screensaver is a modified xscreensaver so the config will be different, but the principle is the same.
For xscreensaver you need to modify your ~/.xscreensaver file and add these lines below the program: line
- Code: Select all
programs: \
"Xwinwrap screensaver" xww-saver \n\
You must add all the \n\'s or it will not work.
The xww-saver must be in /usr/lib/misc/xscreensaver/ for it to work (your xscreensaver directory may be slightly different)
Now your script called xww-saver will be started when the screensaver starts and it sends it a SIGTERM when it finishes.
The only tricky bit for you is writing a script that loads the screensaver in the background when they login. The screensaver will then only change the state settings when it is started and change them back when it is stopped.
Here is a shell for a python script that acts as a screensaver.
- Code: Select all
#!/bin/env python
import signal
import time
import os
import sys
def stop_effect(sig_number, stack):
# dbus commands to put the screensaver at the bottom
sys.exit(0)
def start_effect():
#dbus commands here to bring the screensaver to the top
# attach start and stop functions to the sigterm
signal.signal(signal.SIGTERM, stop_effect)
# we have just launched the screensaver
start_effect()
while 1:
#do nothing, the screensaver is running we are just listening for the kill signal
time.sleep(60)
Examples of how to create a dbus object and then call methods are in my cairo-clock.py script.
This page is very helpful and also includes some special tips on how to start xscreensaver as the background in gdm. This would be nice to have as well so the login and the desktop have the same screensaver.
http://www.linuxcommand.org/man_pages/xscreensaver1.html