To add to the frustration, many recommendations just don't work on the Raspbian version of Debian, or (as I found out) Raspbian used different files.
To view your Xsession screen saver setting, use this command (must be used from xterminal)
xset q
In brief, this is what must be done for Raspbian...
UpDate: (Jan 27th, 20115) - I just received an email from "Dirk" saying the file location has changed...Disable text terminals from blanking
change two settings in /etc/kbd/config
BLANK_TIME=0
POWERDOWN_TIME=0
Disable Xsession from blanking
Additional info https://wiki.archlinux.org/index.php/Di ... _Signaling
Add these lines to /etc/xdg/lxsession/LXDE/autostart
@xset s noblank
@xset s off
@xset -dpms
The file changed from /etc/xdg/lxsession/LXDE/autostart -to- /etc/xdg/lxsession/LXDE-pi/autostart
If the file location has changed on the version you are using, the script will need to be edited
Here is a script that will permanently disable Xsession blanking
no_blank.sh
Code: Select all
#!/bin/bash
NOBLANK="
@xset s noblank
@xset s off
@xset -dpms
"
# Pretty ANSI text colors
OFF="\033[0m"
BOLD="\033[1m"
DIM="\033[2m"
RED="\033[1;31m"
GREEN="\033[1;32m"
YELLOW="\033[1;33m"
BLUE="\033[1;34m"
clear
printf "\n\n\t $YELLOW "; date ; printf "$OFF"
printf "\n $GREEN"
printf "\t +------------------------------------------------+\n"
printf "\t | no_blank.sh |\n"
printf "\t | rev Oct 1, 2013 |\n"
printf "\t | |\n"
printf "\t | by: Jan Zumwalt - net-wrench.com |\n"
printf "\t | |\n"
printf "\t | This script permanently disables the xsession |\n"
printf "\t | screen saver for RASPBIAN PI OS. It allows |\n"
printf "\t | the user to abort before any change is made. |\n"
printf "\t +------------------------------------------------+$OFF\n\n"
printf "\t This program will disable your xsession\n"
printf "\t screen saver permanently, is this what \n"
printf "\t you really want to do? $YELLOW<y/n>$OFF"; read -n 1 KEYIN
if [[ $KEYIN == "N" || $KEYIN == "n" ]]; then
printf "\n\n\t OK, I quit and did not do anything.\n\n"
exit 0
fi
printf "\n\n\t I intend to modify your current \n"
printf "\t /etc/xdg/lxsession/LXDE/autostart \n"
printf "\t I will add the$GREEN GREEN$OFF lines to the file...\n\n"
printf "$DIM\n"
pr -t -o 9 /etc/xdg/lxsession/LXDE/autostart
printf "$OFF$GREEN$NOBLANK" | pr -t -o 9
printf "$OFF\n\n"
printf "\t Is this really what you want to do? $YELLOW<y/n>$OFF"; read -n 1 KEYIN
if [[ $KEYIN == "N" || $KEYIN == "n" ]]; then
printf "\n\n\t OK, I quit and did not do anything.\n\n"
exit 0
fi
cat /etc/xdg/lxsession/LXDE/autostart > /etc/xdg/lxsession/LXDE/autostart.`date +%m-%d-%Y_%I:%M:%S`
printf "\n\t Created backup copy of the autostart file...\n"
printf "$NOBLANK" >> /etc/xdg/lxsession/LXDE/autostart
printf "\t Your new file looks like this\n"
printf "$DIM\n"
pr -t -o 9 /etc/xdg/lxsession/LXDE/autostart
printf "$OFF\n\n"
printf "\t$RED Modified file. Screensaver is now disabled.$OFF\n"
# required so xterm will not close
printf "\n\t press any key to exit: "; read -n 1 KEYIN
printf "\t$GREEN Program ended normaly $OFF\n\n"
For completeness here are the other methods that reportedly worked for other OS.
+-------------------------------------+
Stop Screen Blanking
1 & 2 work for the Raspbian
+------------------------------------+
1) Stop text terminals from blanking
change in /etc/kbd/config these two:
BLANK_TIME=0
POWERDOWN_TIME=0
2) Stop Xsession from blanking
Additional info https://wiki.archlinux.org/index.php/Di ... _Signaling
Add these lines to /etc/xdg/lxsession/LXDE/autostart
@xset s noblank
@xset s off
@xset -dpms
------------------------------------
A) Change your ~/.xinitrc or /etc/X11/xinit/xinitrc or /etc/xdg/lxsession/LXDE/autostart
NOTE: attempting to create a ~/.xinitrc and use in Raspbian crashed my Xserver
@xset s noblank
@xset s off
@xset -dpms
B) Change the /etc/lightdm/lightdm.conf and paste under the [SeatDefault]
xserver-command=X -s 0 dpms
"only effective if you boot straight into X using that particular display manager."
C) Use the xdotool to send a benign keyboard input to midori every ten minutes e.g. over crontab
...not a real solution, but it could work for my purpose.
D) Use a Display-Manager such as LXDE and run your browser there. User coolblue2000
had the same issue and finally went the way over a window manager, disabling the panel
(menu bar at the bottom) and setting the background picture to black - so you can't
see the whole LXDE. Here's a description:
http://pikiosk.tumblr.com/post/38721623 ... -static-ip
-- This will use more CPU - if anybody tries this, please leave a comment how much.
I'm really short of CPU, so I don't want to run an unnecessary windowmanager just to
prevent a screensaver...

E) Create a shell script disableblank.sh that runs the xset commands and add an entry
in .config/autostart/ calling that script. That way, everything is started with the
same method and either both work or neither works.