View Single Post
gnuite's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#1
Tired of the screen blanking while you're using your bluetooth keyboard? The new bluetooth keyboard plugin includes code that helps, but there is another solution, less obvious to those not familiar with gnome. The solution uses gconf, which is analogous in many ways to the Windows Registry.

Code:
gconftool-2 --type "list" --list-type "int" --set "/system/osso/dsm/display/possible_display_dim_timeouts" "[10,30,60,120,300,3600]"
gconftool-2 --type "list" --list-type "int" --set "/system/osso/dsm/display/possible_display_blank_timeouts" "[10,30,60,120,300,3600]"
Executing these two commands (you don't have to be root) will give you new options to choose from in the display control panel. Both the "Brightness period" and "Switch off display" combo boxes will have the following options: 10 seconds, 30 seconds, 1 minute, 2 minutes, 5 minutes, 60 minutes. Technically, it modifies the "possible_display_dim_timeouts" and "possible_display_blank_timeouts" keys to add more values.

So now you can select longer timeout periods, if you want more time with your keyboard. If you connect your keyboard via an xterm (e.g. with kbdd), you may want to consider creating a shell script to both connect your keyboard and, using gconftool-2, automatically modify the brightness and/or blank timeouts:

Code:
gconftool-2 --type "int" --set "/system/osso/dsm/display/display_dim_timeout" 600
gconftool-2 --type "int" --set "/system/osso/dsm/display/display_blank_timeout" 600
This will give you 600 seconds (10 minutes) of dim/blank time. You can use whatever values you like, and you can use the same command with a different value to restore to non-bt-keyboard values when you're done with your keyboard. For bonus points, use "gconftool-2 --get" to get the previous value before you change it, then revert to that value when you're done with the keyboard. The value "0" is a little finicky, though. Setting the dim timeout to 0 disabled dimming, which is what I hoped for, but it also disabled blanking, which I did not expect. It's best to avoid "0" in favor of a really high value.

The screen timeout example is only halfway useful, but it does demonstrate some of the gconf capabilities that are available to users, capabilities that are not given a graphical interface in hildon. For all the possible gconf keys and values, check out the /etc/gconf/gconf.xml.defaults directory, which is a hierarchy of the default gconf values (including defaults for the display dim and blank keys above). Your current gconf values are stored in /var/lib/gconf, but don't try editing them directly - use gconftool-2.
 

The Following 5 Users Say Thank You to gnuite For This Useful Post: