I have Ubuntu 14.04 with XFCE as my desktop environment. After disabling screen blanking and screensaver from settings, my screen still went blank after 10 minutes no matter what I've tried. So I found out that I had to disable DPMS and I can do that by running xset -dpms from terminal and it works great, but I have to run it each time I restart my computer. So I decided to add that to my startup applications list and created a startup application with this code xset s off && xset -dpms. But after I restart, I see that my DPMS is still not disabled and screen goes black after 10 minutes again. What can I do to fix this? Why isn't the code that I set up running on startup?

  • Here is a useful link on How do I start applications automatically on login?. If it doesn't help, try improve your question with description on what you did to add your application to list and to create startup application. – Lety Sep 21 '14 at 21:58
  • @Letizia I am doing those steps correctly but my script isn't being executed – Mertcan Ekiz Sep 21 '14 at 22:02
  • Did you try to add those command in your .profile? – Lety Sep 21 '14 at 22:29
  • Just tried it and it still doesn't work. I've noticed something though, in the .profile file, it says that this file is executed if ~/.bash_profile or ~/.bash_login exists, but I don't have either of those. – Mertcan Ekiz Sep 21 '14 at 22:56
  • I don't think so, according to this manual, .bash_profile and .bash_login is used for shell login while .profile for both shell and desktop session. – Lety Sep 21 '14 at 23:10

I found a solution from this post:


The problem seems to be caused by "timing", and the solution is:

(sleep 15s && xset [your settings...]) &

The solution is very inelegant, but it works for now. I hope someone can find out the exact cause and a better solution.


Try making it into a script.

#!/bin/sh xset s off xset -dpms

Give it an appropriate name and make it executable and then add it to your startup items. You can make it executable by right clicking the file, selecting properties and checking the "Allow to run as application" box.

  • Ok so I created a bash file with those commands and did chmod +x to make it executable, and added it to my startup applications. I rebooted again to see if it worked but it didn't... So I added touch ~/test.txt to the end of the script and rebooted again, then checked to see if test.txt was there but it was not. So the script doesn't get executed at all I guess but I don't know what I'm doing wrong – Mertcan Ekiz Sep 21 '14 at 14:12
  • Not necessarily. It could just be that the first two commands aren't completing properly. The script as it is will wait at the end of each line until the command completes and then move on to the next line. If any of those are failing, it won't reach the end of the file. Which means it won't see that you added the touch command. Have you tried changing to #!/bin/bash ? – amanthethy Sep 22 '14 at 0:26
  • It's also worth looking into adding this directly to your .xinitrc instead of creating a startup aplication. – amanthethy Sep 22 '14 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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