# How to use xscreensaver



## royeo (Jul 9, 2006)

I have FC-5 and use KDE.

As I said before my built in screen saver program doesn't work so I'm trying to use "xscreensaver". To set the times you run a program called "xscreensaver-demo". That brings up a dialog box that allows you to set parameters. It has a place that says "Blank After" This controls how long the computer is idle before the selected screen saver kicks in. Another place called "Cycle After" does just what it says. Another place called "Lock Screen After" lets you elect to lock the screen and the amount of time this locking function starts after the screen saver kicks in.

When I run "xscreensaver-demo" in a terminal a little screen comes up "WARNING" me that:

"The XScreenSaver daemon doesn't seem to be running on display ":0.0". Launch it now?"

and then below that you can hit "OK" or "Cancel". When I hit "Cancel" "Xscreensaver" doesn't work but when I hit "OK" it works fine.

I put the command "xscreensaver" (without the quotes) in the file "rc.local" so it would be run automatically every time I went into FC-5. Now I get the message:

"xscreensaver: warning: $DISPLAY daemon is not set defaulting to ":0.0"'

xscreensaver doesn't work in this configuration. I think I need to do more stuff but what? I think I need to start the xscreensaver daemon but how? I think I need to set the display but how? If someone can help me please do.

Thanks,

royeo


----------



## drgoodtrips (Nov 11, 2006)

royeo said:


> I have FC-5 and use KDE.
> 
> As I said before my built in screen saver program doesn't work so I'm trying to use "xscreensaver". To set the times you run a program called "xscreensaver-demo". That brings up a dialog box that allows you to set parameters. It has a place that says "Blank After" This controls how long the computer is idle before the selected screen saver kicks in. Another place called "Cycle After" does just what it says. Another place called "Lock Screen After" lets you elect to lock the screen and the amount of time this locking function starts after the screen saver kicks in.
> 
> ...


Is your DISPLAY environment variable set? If you're not familiar with how to check, try opening a command shell and typing "env | grep DISPLAY". In most setups, you should see something like "DISPLAY=0.0". If it's set to something else, or you get a blank screen, then you aren't setting that variable on startup. You could set it in your rc.local file, right before running the xscreensaver app. Alternatively, you could look at the xscreensaver documentation to see if you need to supply some kind of command line argument to it.


----------



## royeo (Jul 9, 2006)

Thanks for telling me that stuff. I wish I had a more private way to communicate with you but this site doesn't provide that info. I'm not even sure you'll read this. I don't know much about Linux.

How do you set an environment variable? Specifically the $DISPLAY variable. Also, I don't know anything about daemons. If I had an error message that said the "xscreensaver" daemon wasn't running, how would I launch it? Right now I just have the command "xscreensaver" on a line in rc.local.

Thanks,

royeo


----------



## fenderfreek (Mar 14, 2006)

If you need to set an environment variable, like DISPLAY, just do

```
DISPLAY=0:0
```
 As far as daemons, there's a specific way to run every one. It's simply a program that does something while running in the background, so for xscreensaver, simply running the command should be enough to load it.

(And yes, there is a PM system on this site, but for this kind of thing, keep it in here. You may not be the only one that needs this question answered!)

Best of luck to you!


----------



## phornax (Aug 20, 2007)

What actually works. even as root, use of KDE, whatever...You need to type "xscreensaver-demo &" in rc.local AND add "xscreensaver &" in .bashrc in your home directory.


----------

