Active Topics

 


Reply
Thread Tools
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#31
Okay. So do you mean this?

restore_value()
{
gconftool-2 --type $1 --set $2 `gconftool-2 --get $2`
}
restore_value int /system/osso/dsm/display/display_blank_timeout
restore_value int /system/osso/dsm/display/display_dim_timeout
restore_value int /apps/osso/applet/osso-applet-display/turn_off_display
restore_value int /apps/osso/applet/osso-applet-display/brightness_period
restore_value bool /system/osso/dsm/locks/touchscreen_keypad_autolock_enabled
restore_value bool /system/osso/dsm/display/display_on_with_charger


No errors on any of this but it's not restoring the Switch off Display setting thingy still.

Thanks again for your patience with me.
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#32
Try switching the order so the two system keys are below the two apps keys. Dunno what else to try if that doesn't work.
 

The Following User Says Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#33
I did change the order like you mentioned.

No such luck though.

So either I need to force it back with a static number, which works, or somehow use a variable setting instead, which I don't know how to do.

It's weird that the blank timeout is the only setting that doesn't take.
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#34
Originally Posted by Addison View Post
So either I need to force it back with a static number, which works, or somehow use a variable setting instead, which I don't know how to do.
So what happens if you set it to some high static value and then restore it using the following code?
Code:
blank=`gconftool-2 -g /system/osso/dsm/display/display_blank_timeout`
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout 300
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout $blank
 

The Following User Says Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#35
So like this?


#! /bin/sh

gconftool-2 --set -t bool /system/osso/af/keyboard-attached true
blank=`gconftool-2 -g /system/osso/dsm/display/display_blank_timeout`
/etc/init.d/mce stop
killall xbindkeys
xbindkeys -f /home/user/.xbindkeysrc_adom
xmodmap ~/.Xmodmap_adom
xkbd -geometry +65536+65992 -k /media/mmc2/N800/Keyboards/Flat2.xkbd & xkbd -geometry +725+360 -k /media/mmc2/N800/Keyboards/Keypad.xkbd & filterm ascii-ascii cp437-utf8 telnet becksbbs.synchro.net
gconftool-2 --set -t bool /system/osso/af/keyboard-attached false
killall xbindkeys
killall xkbd
setxkbmap
sudo /etc/init.d/mce start
/usr/bin/set-backlight `gconftool-2 --get /apps/adv-backlight/brightness`
restore_value()
{
gconftool-2 --type $1 --set $2 `gconftool-2 --get $2`
}
restore_value int /apps/osso/applet/osso-applet-display/turn_off_display
restore_value int /apps/osso/applet/osso-applet-display/brightness_period
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout 300
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout $blank

restore_value int /system/osso/dsm/display/display_dim_timeout
restore_value bool /system/osso/dsm/locks/touchscreen_keypad_autolock_enabled
restore_value bool /system/osso/dsm/display/display_on_with_charger
xbindkeys
killall roxterm



Before this runs:
Brightness period - 30 seconds
Switch off display - 30 seconds

After:
Brightness period - 30 seconds
Switch off display - 5 minutes
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#36
Originally Posted by Addison View Post
blank=`gconftool-2 -g /system/osso/dsm/display/display_blank_timeout`
/etc/init.d/mce stop
...
sudo /etc/init.d/mce start
...
restore_value int /apps/osso/applet/osso-applet-display/turn_off_display
restore_value int /apps/osso/applet/osso-applet-display/brightness_period
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout 300
gconftool-2 -t int -s /system/osso/dsm/display/display_blank_timeout $blank

restore_value int /system/osso/dsm/display/display_dim_timeout

Before this runs:
Brightness period - 30 seconds
Switch off display - 30 seconds

After:
Brightness period - 30 seconds
Switch off display - 5 minutes
Without the new code does control panel show the correct value? And it just blanks at the wrong time or not at all? The line that sets 'blank' can sit right before the line that sets the key using it if control reports correct value but blanks at 2 minutes or something.

It doesn't make sense why the line that sets 300 works but the line after doesn't. Try putting this line in the code after the MCE start line and see what it prints out when you run the script.
Code:
echo `gconftool-2 -g /system/osso/dsm/display/display_blank_timeout`
You can remove the two /apps/osso/applet/osso-applet-display/* keys if they didn't change anything, unless the brightness_period key fixed the dim timeout.

Why do you sudo to start MCE but not to stop?

Last edited by auouymous; 2011-06-06 at 02:21.
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#37
Why do you sudo to start MCE but not to stop?
I'm sure there's a reason but I forgot.

I've been working on this script for 18 months now so it's been awhile. *lol*

In the control panel, the switch off display says one thing (30 seconds) but the timer is something else (5 minutes). It defaults to 2 minutes when MCE restarts without your script thingy.

That's why I used to bring up the display panel and just click Okay since that seemed to restore all the values correctly.
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#38
Last question, is there a way to map the power button when MCE has stopped?

In Xterm:
xbindkeys -k
It's not recognizing anything when I depress that hardware button.

How is advanced-systemui picking up when this key is being pressed?
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#39
Originally Posted by Addison View Post
Last question, is there a way to map the power button when MCE has stopped?
Nope.

HAL sends a signal over dbus when power button is pressed or you can listen to /dev/input/event0(n800) or 1(n810) like ASUI does. It's not a normal key like the others, so no easy way to bind it.
 

The Following User Says Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#40
^ Thank you so much for everything you put into this thread.

I surely appreciate your great efforts to provide answers for me.
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:00.