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 Tue 21 Oct 2014, 11:30
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 Posts_count_1  
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
Sub_title: 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:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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