Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 10:44
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
[SOLVED]Can't turn off screen blanking: bug in /.xinitrc
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
linuph


Joined: 03 Jun 2012
Posts: 128
Location: Philippines

PostPosted: Mon 23 Jul 2012, 23:09    Post subject:  [SOLVED]Can't turn off screen blanking: bug in /.xinitrc
Subject description: Dpup Exprimo 5.X.3.4.2.8
 

I've been struggling with screen blanking: every 10 minutes screen blanking kicks in when there is no keyboard- of mouse activity during that time. However, I need the screen to be on all the time. I found that xset sets a.o. screen blanking or not. I tried setting xset in a script in /Startup but that didn't work. It only worked from the commandline which is not handy.
Learning along the way I found that when starting a X-session /.xinitrc is called. There I found a bug (I'm pretty new to Puppy and Linux so I guess it's a bug). See 'NOTE':


/root/.xinitrc:

if [ -f /root/.xset.sh ];then
#this is created by /usr/bin/pupx...
eval "/root/.xset.sh"

NOTE: /root/.xset.sh is NOT created by /usr/bin/pupx
but /tmp/pupx_screen is. Wrong call.

else
##Xorg has it's own fontpath settings in /etc/X11/xorg.conf...
#if [ "`readlink /usr/bin/X`" != "Xorg" ];then
# #xset fp+ /usr/lib/X11/fonts/Type1/
# #xset fp+ /usr/lib/X11/fonts/TTF/
# xset fp+ /usr/share/fonts/default/Type1/
# xset fp+ /usr/share/fonts/default/TTF/
#fi
xset s 600 600 s blank

NOTE: since /root/.xset.sh does not exist, screen blanking
is always activated.

fi

/usr/bin/pupx (menu: pupx: set properties of X):

#v426 add '-dpms' when turn off screensaver...
#/tmp/pupx_screen.sh \$SCREENSAVERFLAG \$SCREENSAVERDELAY
\$SCREENSAVERCYCLE \$SCREENSAVERBLANKING
\$SCREENSAVEREXPOSURES
echo '#!/bin/sh
SCREENSAVERFLAG=$1
SCREENSAVERDELAY=$2
SCREENSAVERCYCLE=$3
SCREENSAVERBLANKING=$4
SCREENSAVEREXPOSURES=$5
SCREENSAVERDELAY=`echo -n $SCREENSAVERDELAY | cut -f 1 -d '.'`
SCREENSAVERCYCLE=`echo -n $SCREENSAVERCYCLE | cut -f 1 -d '.'`
if [ "$SCREENSAVERFLAG" = "false" ];then
SCREENSAVERPARAMS="s off -dpms"

NOTE: we want the above 's off -dpms' but it is not evaluated by /root/.initric

else
[ "$SCREENSAVERBLANKING" = "false" ] &&
SCREENSAVERBLANKING=noblank
[ "$SCREENSAVERBLANKING" = "true" ] &&
SCREENSAVERBLANKING=blank
[ "$SCREENSAVEREXPOSURES" = "false" ] &&
SCREENSAVEREXPOSURES=noexpose
[ "$SCREENSAVEREXPOSURES" = "true" ] &&
SCREENSAVEREXPOSURES=expose
SCREENSAVERPARAMS="s $SCREENSAVERDELAY $SCREENSAVERCYCLE
s $SCREENSAVERBLANKING s $SCREENSAVEREXPOSURES"
fi
xset $SCREENSAVERPARAMS
echo -n " $SCREENSAVERPARAMS" >> /tmp/pupx_finalparams
[ $6 ] && exit
Xdialog --title "Screensaver settings" --msgbox "Screensaver parameters
set to:\n${SCREENSAVERDELAY} ${SCREENSAVERCYCLE}
{SCREENSAVERBLANKING} ${SCREENSAVEREXPOSURES}\n(for this
session only)" 0 0
' > /tmp/pupx_screen.sh
chmod 777 /tmp/pupx_screen.sh

I have not changed anything here but have created .xset.sh in root as a workaround:

/root/.xset.sh:

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

and made it executable. It works.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0425s ][ Queries: 11 (0.0036s) ][ GZIP on ]