maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   MCE stop and start (https://talk.maemo.org/showthread.php?t=72220)

Addison 2011-05-31 22:58

Re: MCE stop and start
 
^ Thanks but that didn't work even though it didn't give me any errors.

Addison 2011-05-31 23:17

Re: MCE stop and start
 
I have the blank timeout set at 30 seconds.

After restarting mce and running this...
gconftool -s /system/osso/dsm/display/display_blank_timeout \ `gconftool -g /system/osso/dsm/display/display_blank_timeout` -t int

It doesn't reset. It blanks after 2 minutes now.

Should there be quotes or something in that command line?

auouymous 2011-06-01 01:18

Re: MCE stop and start
 
Quote:

Originally Posted by Addison (Post 1019768)
The correct argument though is
/usr/bin/set-backlight `gconftool-2 --get /apps/adv-backlight/brightness`

You shouldn't place user programs in system directories. Use /root/bin or /home/user/bin instead. Also makes it easier to backup scripts and binaries you've written or downloaded and might be hard to find again.

Quote:

Originally Posted by Addison (Post 1019768)
I'm still unsure how to use these with variables.

gconftool-2 -s "/system/osso/dsm/display/display_brightness_level_step" 1 -t INT

Anything instead `` is executed and passed to the command as an argument, so you just `gconftool-2 -g /path/to/a/key` would be used in place of the static value.

If you scroll back to my second post you will see that I wrote a nice little function that automates this for you. You just have to pass it the key and type and it handles getting and setting.

@ jonww, that key is for the default brightness, he is using adv-backlight which has its own key.

Addison 2011-06-01 03:24

Re: MCE stop and start
 
I wasn't trying to be a punk. *lol*

I was simply pointing out that
/usr/bin/set-backlight `gconftool-2 --get /apps/adv-backlight/brightness`
and not
/FULL/PATH/set-brightness `gconftool-2 --get /apps/adv-backlight/brightness`
the way you wrote it was correct. :)

Anyway, I'll look over your post one more time and see if I can't get your other junk to work as well.

Cheers buddy. :)

Addison 2011-06-01 21:29

Re: MCE stop and start
 
Sorry.

What am I doing wrong here?



#! /bin/sh

gconftool-2 --set -t bool /system/osso/af/keyboard-attached true
/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 /system/osso/dsm/display/display_blank_timeout
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

auouymous 2011-06-02 11:46

Re: MCE stop and start
 
Quote:

Originally Posted by Addison (Post 1020472)
What am I doing wrong here?

Does it produce an error? Does it not restore the settings?

Addison 2011-06-03 20:29

Re: MCE stop and start
 
It appears that there is no error to anything you wrote.

Everything seems to go back to their original settings (brightness, brightness period).

The one that doesn't restore is the switch off display timer.

Other than that, it looks like I'm all good. :)

auouymous 2011-06-03 21:28

Re: MCE stop and start
 
Look at turn_off_display and brightness_period in /apps/osso/applet/osso-applet-display.

Addison 2011-06-03 22:09

Re: MCE stop and start
 
Are you referring to
/usr/share/osso-applet-display/RX-34.schemas ?

That's all I'm really finding that's close to what you wrote.

auouymous 2011-06-03 22:40

Re: MCE stop and start
 
The gconf keys /apps/osso/applet/osso-applet-display/turn_off_display and /apps/osso/applet/osso-applet-display/brightness_period, add restore_value lines for them and see if that works.


All times are GMT. The time now is 20:13.

vBulletin® Version 3.8.8