Well, for some reason removing gnome-screensaver didn't seem to work for me after thorough testing. The whole 'gnome-screensaver-command -i' thing DID seem to work, which is weird.
I got sufficiently pissed off about this problem today that I wrote a python script that is much more elegant than the whole run 'xset dpms force off' in an infinite loop thing, then somehow try to break the loop. For this script to work you need python and the python-xlib package installed. Paste the following into a file, chmod +x it, and then run it to finally turn off the screen once and for all.
Code:
#!/usr/bin/python
import time
import subprocess
from Xlib import X
from Xlib.display import Display
display = Display(':0')
root = display.screen().root
root.grab_pointer(True,
X.ButtonPressMask | X.ButtonReleaseMask | X.PointerMotionMask,
X.GrabModeAsync, X.GrabModeAsync, 0, 0, X.CurrentTime)
root.grab_keyboard(True,
X.GrabModeAsync, X.GrabModeAsync, X.CurrentTime)
subprocess.call('xset dpms force off'.split())
p = subprocess.Popen('gnome-screensaver-command -i'.split())
time.sleep(1)
while True:
print display.next_event()
p.terminate()
break
This is just my first shot at this, so it might not work perfectly. Basically what it does is it calls 'xset dpms force off', forks a process to inhibit gnome-screensaver, waits one second, then sits waiting for any user input to the X server. If the user moves the mouse, hits a mouse button, or presses a key, the script terminates the gnome-screensaver inhibit command and exits.
Hopefully this will work. I'll post back if I ever notice the backlight turning back on. Then we'll have to go back to the drawing board...
If you wanted this to lock the screensaver as well you could probably put in a "subprocess.Popen('gnome-screensaver-command -l'.split())" call after the "p.termintate()" call (but I suspect the timing might be a little off).
Bookmarks