Reply
Thread Tools
Posts: 33 | Thanked: 26 times | Joined on Jul 2008
#1
For some time I've been trying to find a way to blank the screen if I click a button from Personal Launcher. Here's the best solution i have found so far.

blank.sh:
Code:
#!/bin/sh
gconftool -t int -s /system/osso/dsm/display/display_blank_timeout 1
gconftool -t int -s /system/osso/dsm/display/display_dim_timeout 1
sleep 1
gconftool -t int -s /system/osso/dsm/display/display_blank_timeout 60
gconftool -t int -s /system/osso/dsm/display/display_dim_timeout 30
When executed it will blank the screen after 1sec, then it will set the previous values i have.

Anyone knows a better way?
 
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#2
Don't know of a better solution, but an improvement would be:

Code:
#!/bin/sh
blanktime=`gconftool -g /system/osso/dsm/display/display_blank_timeout`
dimtime=`gconftool -g /system/osso/dsm/display/display_dim_timeout`
gconftool -t int -s /system/osso/dsm/display/display_blank_timeout 1
gconftool -t int -s /system/osso/dsm/display/display_dim_timeout 1
sleep 1
gconftool -t int -s /system/osso/dsm/display/display_blank_timeout $blanktime
gconftool -t int -s /system/osso/dsm/display/display_dim_timeout $dimtime
So that if you ever want to change your default dimming options it won't reset the values back.
And now it is more generic.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#3
Originally Posted by Mikma View Post
Anyone knows a better way?
Not sure if it is better but you can run
Code:
chroot /mnt/initfs dsmetest -d 2
as root to turn the display off. Try also
Code:
chroot /mnt/initfs dsmetest
to see other possibilities (-d 0 and 1 may be useful too)
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 

The Following User Says Thank You to fanoush For This Useful Post:
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#4
That's definitely a bit quicker and saves fiddling with dimming values, and very easy to run it as root if you have rootsh installed.
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:24.