2

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?

2 Answers2

1

I found a solution from this post:

https://bbs.archlinux.org/viewtopic.php?id=104338

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.

Yan King Yin
  • 384
  • 2
  • 11
0

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.

amanthethy
  • 1,251
  • 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 00:26
  • It's also worth looking into adding this directly to your .xinitrc instead of creating a startup aplication. – amanthethy Sep 22 '14 at 00:27