8

I should start off by saying I am fairly new to Linux. I want my pi to scroll through pictures in Image Viewer and never sleep. I've followed these instructions from another question to try to fix the sleeping problem.

apt-get install x11-xserver-utils 

 Now open up your ~/.xinitrc file
(if you don't have one then create it) and enter this:

xset s off         # don't activate screensaver 
xset -dpms         # disable DPMS (Energy Star) features. 
xset s noblank     # don't blank the video device

exec /etc/alternatives/x-session-manager      # start lxde

I didn't have the .xinitrc file in my home directory so I created one. It hasn't seemed to make a difference. I also have a .Xauthority file in /home/pi and have tried renaming it but it creates a new .Xauthority file.

  • Sure the file is located at ~/.xinitrc and you have xset installed? – Jivings Oct 17 '12 at 15:40
  • x11-xserver-utils is already the newest version. and .xinitrc is in the /home/pi directory – Brad Morris Oct 17 '12 at 15:49
  • I am having the same problem. Did you find what directory the .xinitrc file should be created in to stop the screen saver from activating? – TfromNYC Oct 18 '12 at 15:50
  • How are you starting X? .Xauthority is autogenerated and not relevant here, I think. You could also try calling your session script ~/.xsession. I believe xinit is a relic and so is its .xinitrc. It is used by startx, though. Login managers might or might not ignore it. I think I've also seen .xclients and don't ask me about CDE. Either way, .xsession and .xsession-errors are my preference. You can grep -r for mention of those files in scripts in /etc/X11. Also, startx is probably a script that you can read to see exactly what it does. – XTL Oct 19 '12 at 11:52
  • Have you tested the xset commands in an already running X and do they make a difference? It's not altogether impossible that bare X blanking is broken in your server version. – XTL Oct 19 '12 at 11:55
9

Edit /etc/lightdm/lightdm.conf and use the following xserver-command:

[SeatDefaults]
xserver-command=X -s 0 -dpms

This worked for me at least.

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.