Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just installed xscreensaver instead of gnome-screensaver in Ubuntu 12.04 in gnome-session-fallback (Gnome Classic) mode. It works fine, but I have a problem: I put "xscreensaver -no-splash" command to the startup applications list.

But it doesn't start automatically, I have to run this command manually. I think that the problem is that it tries to start before I log in. So how can I start it automatically after login?

share|improve this question
Try this: It worked for after I had tried two different 'Solutions'. – user278737 May 6 '14 at 19:55
screensaver -no-splash is completely wrong. – Eofla May 28 at 6:07

Tested and used in Ubuntu 13.04

As no answer has been marked as correct yet; this could be this issue with running xscreensaver on startup

as @peterx14 says here, many of the tutorials for setting up xscreensaver provide incorrect information.

They tell you to set up a screensaver.desktop file with the following command:

sudo gedit /etc/xdg/autostart/screensaver.desktop

and then place inside it the following information:

[Desktop Entry]
Exec=xscreensaver -nosplash

However, for some reason, in many of these tutorials, the above command is incorrect. 'Application' has been misspelt as 'Applicaton'. This causes the startup command to not work.

Therefore, if you have already entered the command

"xscreensaver -no-splash" 

into your startup list, it would not work as xscreensaver is not set up with the type application.

To find out if this is the issue: first run locate screensaver.desktop. This should, somewhere in the list, tell you where screensaver.desktop is. On my computer it's in /etc/xdg/autostart/screensaver.desktop, then open it in an editor (terminal 'nano' may be best as you will need sudo commands to open it) and change 'Applicaton' to 'Application'.

Also, different tutorials (such as liberiangeek and Radu's response) suggest using:

"xscreensaver -nosplash"

as the fix above uses. This depends which value you have within your screensaver.desktop file on line 4: Exec=xscreensaver -nosplash.

share|improve this answer
I did all of this, but it didn't help - I didn't understand your last paragraph that using 'xscreensaver -nosplash' depends on what you have in the desktop file. I have it in worked until 13.10 but now in 14.04 it no longer works – Kibi Apr 29 '14 at 10:05
I'm unsure about a fix for 14.04, the fix above was for 13.04, I'll add that into the answer now... In regards to 14.04 I've already had problems just trying to change the desktop background (I have to restart my laptop to get the changes to take affect) so the issues you're having could be due to something completely different... – planty182 Apr 29 '14 at 10:35
Got it working now, see my answer below – Kibi Apr 29 '14 at 10:41
@planty182 Thank's a bunch, this got me going. – somethingSomething Feb 15 '15 at 15:39
I would also add to locate xscreensaver.desktop or just look for in the list when you use locate screensaver.desktop. Mine was in ~/.Desktop – Sablefoste Jul 27 '15 at 2:39

One possible way is to introduce a short delay of (for example) 10 seconds before running the command. This should allow all the logon processes to complete before running the xscreensaver command.

Use a startup application command line of:

sh -c "sleep 10 && xscreensaver -no-splash &"
share|improve this answer
Nope this doesn't work for me either in ubuntu 14.04. I had it working fine (without this trick) in idea what went wrong – Kibi Apr 29 '14 at 10:11
Doesn't work even after I fix the typo "-no-splash" to "-nosplash" – Kibi Apr 29 '14 at 10:26
if we cannot precisely time it up, this may be handy bash -c 'while true;do if ! pgrep xscreensaver;then xscreensaver -nosplash;fi; sleep 1;done' – Aquarius Power May 29 '14 at 22:45

I had it working then I updated to 14.04 and it stopped working.

The solution is to go into Synaptic and completely remove the Gnome screen saver. Ubuntu sneakily reinstalls it on "upgrade".

When you reboot it should work now with the original xscreensaver -nosplash startup.

share|improve this answer
Hey Kibi. This was probably deleted because you posted an exact duplicate answer over on this question. Pasting answers in multiple places is generally frowned upon. On Q/A sites like Ask Ubuntu we don't like to duplicate information. Generally, if you find that the answer to a question is the same as the answer on another question you should flag it as a duplicate so that all the important information is left in one place. I've undeleted this for now. – Seth Apr 30 '14 at 16:30
Thanks @Seth, I deleted my other answer and marked that question as a duplicate – Kibi May 1 '14 at 7:23

I think, it has something to do with output redirection. The following line worked for me in Lubuntu 13.10:

xscreensaver -nosplash -log /dev/null
share|improve this answer
This one does NOT work for me on Ubuntu 14.04 – Kibi Apr 29 '14 at 10:02

I spent several hours with the same problem but then I finally found the answer that I was looking for.

Go to follow the directions changing only two things.

The first is the line that reads:

gedit ~/.config/autostart/xcreensaver.desktop

Needs to be entered as:

sudo gedit ~/.config/autostart/xcreensaver.desktop

And the second is that to perform this it must be done from the user account it is be applied to, and to do this the user must be an Administrator.

So if the user is a standard user their account type must be change to Administrator it done for them from their account and then the account changed back to a Standard user.

Hope it corrects your problem as well.

share|improve this answer

I'm new to Ubuntu, was running Mandrake/Mandriva for over 10yrs. From what I just found the simple solution if you want it to start after a logout/login or boot is to go to 'show applications > Startup Applications > Add > then add xscreensaver as the command. If I misread the question I apologize.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.