How do I set up xscreensaver to run in the background on login? Will a simple xscreensaver & do the trick?

3 Answers 3


if I understand it you want to put xscreensaver after starting i3wm ? if you enter into the i3wm config file as the last line exec xscreensaver

  • Yeah, but should I add the '&' as well? Aug 24, 2016 at 20:04
  • 1
    I do not think there is need of & , try anyway Aug 25, 2016 at 8:51

Yes, usually just

xscreensaver &

will do what you want. But it depends on what else you have in your .xinitrc (or .xsession) file. For both of those, you need to leave some program running in the foreground to prevent the script from completing (and stopping X).

If you have a workable script, when adding your command before that final program should work.

Further reading:


Simply adding exec --no-startup-id xscreensaver line to your i3wm config file (default ~/.i3/config) should do.

Appending & is not necessary since i3wm doesn't block on the exec commands.

You must log in to answer this question.

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