{"id":1111,"date":"2013-07-15T10:00:04","date_gmt":"2013-07-15T15:00:04","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=1111"},"modified":"2013-07-23T12:50:49","modified_gmt":"2013-07-23T17:50:49","slug":"raspberry-pi-disable-screensaver","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2013\/07\/raspberry-pi-disable-screensaver\/","title":{"rendered":"Raspberry Pi Disable Screensaver"},"content":{"rendered":"<p>Had a raspberry pi setup as a terminal to display statistics on a television &#8211; needed it to not go into sleep mode etc.<\/p>\n<p>SSH or login to your RPi as root<br \/>\nI added the following script<\/p>\n<blockquote><p># needs apt-get install x11-xserver-utils first<br \/>\n# if something errors, stop the script<br \/>\nset -e<\/p>\n<p># set the screensaver to off, no power savings, and no blank screen<br \/>\nxset s off<br \/>\nxset -dpms<br \/>\nxset s noblank<\/p>\n<p># exec the session manager so you have a toolbar still<br \/>\nexec \/etc\/alternatives\/x-session-manager<\/p><\/blockquote>\n<p><strong>I then added a path to rc.local<\/strong><br \/>\n<code>chmod +x YOURSCRIPTNAME.SH<\/code><br \/>\n<code>chmod 777 YOURSCRIPTNAME.SH<\/code><\/p>\n<p><code>nano \/etc\/rc.local<\/code><br \/>\nAdd &#8220;\/path\/to\/your\/script.sh&#8221;<\/p>\n<p>***EDIT***<br \/>\nApparently that does not work &#8211; you end up getting a &#8220;cannot change display &#8220;&#8221;&#8221; type of argument.<\/p>\n<p>So, change the LXDE autostart function script:<br \/>\nnano \/etc\/xdg\/lxsession\/LXDE\/autostart<\/p>\n<p>xset s off<br \/>\nxset -dpms<br \/>\nxset s noblank<br \/>\nreboot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Had a raspberry pi setup as a terminal to display statistics on a television &#8211; needed it to not go into sleep mode etc. SSH or login to your RPi as root I added the following script # needs apt-get install x11-xserver-utils first # if something errors, stop the script set -e # set the &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2013\/07\/raspberry-pi-disable-screensaver\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Raspberry Pi Disable Screensaver<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1111","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=1111"}],"version-history":[{"count":3,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1111\/revisions"}],"predecessor-version":[{"id":1121,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1111\/revisions\/1121"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=1111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=1111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=1111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}