Thursday, May 13, 2010

Ubuntu 10.04: gnome-screensaver and switch user

Bugs. Why does it always have to be bugs?

Anyway, with the advent of New Hal, my wife and I use the same computer. She doesn't do much more than check email, check Snopes to refute emails from the clueless, and make plane and hotel reservations. Things like that, she's not a heavy computer user. It's not likely that she's going to be running a 16 atom Quantum Espresso simulation in the background, unlike some people I know.

So it's OK for both of us to use the same box for most things. The idea way to do this is with the Switch User option, which works really well once you know each other's passwords and know about Ctrl-Alt-F7/Ctrl-Alt-F8. (Don't try this at home unless you have a really strong marriage.) So we both stay logged on, and use Switch User to get back and forth between our accounts.

Except that when you're both logged on all the time, you don't want the monitor running all the while. It wastes power, and it's annoying to walk in to the room and see the thing lit up in the middle of the night.

The default option is to use gnome-screensaver, which seems to be installed automatically with 10.04 and launches when you boot. Just set the options the way you want it and you're good to go.

Except — of course there's an except, why do you think I'd be writing otherwise — there's a bug. Multiple reported bugs, actually. There's 478253, 555870, 546578, 561538, and, lest we forget, 535467. All of them report more or less the same thing: when you use Switch User, sometimes the screen goes black.

A workaround is to run xgamma -gamma 1.0 when the black screen occurs. This is rather difficult because the screen is, in fact, black, and unless you're very lucky you won't be at the right spot on the screen.

So, following a suggestion in the comments to 561538, I ripped gnome-screensaver off the computer and installed xscreensaver. Set it up on both accounts, then went out to work on the lawn.

When I came back, GDM was cheerfully restarting itself every 2-3 seconds, complete with endless be-bop sound every time. I suspect that this is because the two instances of xscreensaver were competing with each other.

I'm not sure that's the case, but I worked under that assumption and killed the screen saver in my account. That fixed the problem, so I've left things at that. Now I just remember to switch the screen to my wife's account when I'm done on the computer.

0 comments: