Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Getting more options with gconf

    Reply
    Page 1 of 2 | 1   2   | Next
    gnuite | # 1 | 2006-01-20, 20:19 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 5 Users Say Thank You to gnuite For This Useful Post:
    eachna, figaro, scaler, videolink, Wikiwide

     
    Hedgecore | # 2 | 2006-01-20, 21:33 | Report

    Excellent! Nobody's commented on this yet? Bah!

    Is there a single config file that all of these settings are contained in? What else can be modified?

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Hedgecore For This Useful Post:
    Wikiwide

     
    Mike Cane | # 3 | 2006-01-20, 21:43 | Report

    Originally Posted by gnuite
    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.
    LVTT;

    Hedgecore:

    Although it seems like a very useful post, just hitting the above made me shout, "HOW?!!?" You wzds presume waaaay too much knowledge.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to Mike Cane For This Useful Post:
    Wikiwide

     
    fpp | # 4 | 2006-01-20, 22:00 | Report

    If this is truly like the dreaded Windows registry, then it's an endless source of opportunities to brick our 770s... Much fun, thanks a lot :-)

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to fpp For This Useful Post:
    Wikiwide

     
    gnuite | # 5 | 2006-01-21, 00:19 | Report

    Originally Posted by Mike Cane
    LVTT;

    Hedgecore:

    Although it seems like a very useful post, just hitting the above made me shout, "HOW?!!?" You wzds presume waaaay too much knowledge.
    Yeah, sorry, I guess I should have mentioned that, in order to "check out" that directory, you'll probably need remedial knowledge of xterm, plus a relative mastery of the "cd" and "cat" commands. Oh, and familiarity with "more" and "grep" will be useful.

    If my words are Greek to you, then you should not, repeat not, attempt to touch gconf. Better stay away from the gainroot command, too...

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to gnuite For This Useful Post:
    Wikiwide

     
    putkowski | # 6 | 2006-01-21, 01:42 | Report

    Do you know if the opera zoom levels are in gconf?

    grep - a "filter" for example:

    ps -a | grep -i user

    (list all process status' and send the output (| is a "pipe". windows uses them also) to grep which is told to ignore case differences (-i) and only show output lines that contain "user"

    cat = type

    like:

    type c:\autoexec.bat

    (list the file on the screen)

    cd = cd

    change current directory (whatd'ya know, windows stole the command from unix !!!) if you want to go "up" a directory, you will have to put a space between cd and the ..

    cd ..

    more = more

    (see cd... windows stole the command from linux)

    ls -a | more

    list all files in the current directory and pipe the output to more so you will get one screen at a time.

    BTW: ls = dir

    EXCEPT you usually want to ls -a so you can see files and directories that are "hidden" (which is usually the ones that start with a . (dot))

    try:

    ls -a | sort

    just like dir | sort, this will show the contents of the current directory alphabetically (except dir | sort shows the date and time first, so you get you dir in date order.... not really usefull..)

    ls -a | sort | more

    sort the output before showing you a page at a time...

    so what's the current directory?

    pwd

    will tell you.

    just remember big and little (or as New Yorkers have them: upper and lower case) ALWAYS make a difference in linux.

    Perhaps the biggest omission on the 770 is built-in-help is not included for commands: in a "normal" linux command-box (shell) you can type

    man cat

    to get a concise explanation of the command: page-up/down to see it all and then press q to quit...

    and if you forget how to use man, you can type

    man man

    P

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by putkowski; 2006-01-21 at 01:53.
    The Following User Says Thank You to putkowski For This Useful Post:
    Wikiwide

     
    gnuite | # 7 | 2006-01-21, 04:45 | Report

    Yeah, I think the man pages would have used a signifiant chunk of the flash, hence the omission. In typical Nokia 770 fashion, though, you can usually google for "man <command>" and easily find an online version of the man page.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    putkowski | # 8 | 2006-01-21, 16:48 | Report

    Originally Posted by gnuite
    Yeah, I think the man pages would have used a signifiant chunk of the flash, hence the omission. In typical Nokia 770 fashion, though, you can usually google for "man <command>" and easily find an online version of the man page.
    even better:

    http://www.google.com/linux

    allows you to seach for linux specific definitions/questions...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    adl99 | # 9 | 2006-03-29, 21:30 | Report

    This is a little old, but the display timeout is in /etc/gconf/gconf.xml.defaults/system/osso/dsm/display/%gconf.xml (there's a whole world of fun in that /etc/gconf directory - I copied it all to my mmc to browse on my comp.)

    Also, if you set one of the options to 0 (zero) the display never times out. I only set my dimming value to 0 and it still doesn't go off. It DOES, however, switch the screen off when the cover is put over the screen.

    PS. I think you can get gconf editors for all sorts of platforms. Google and see!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    CrossBow | # 10 | 2006-03-30, 13:20 | Report

    Thanks gnuite. Works fine.

    I can now set my timeouts to 60 Min when using my USB keyboard.

    Now I am thinking about how to detect me connecting my USB keyboard and changing the settings automatically.

    I can grep in /proc/bus/usb/devices to check if the keyboard is there, but with no cron, I can't do this periodically. That seems kinda awkward anyway.

    hotplug may be able to help, but we don't have that either.

    Any ideas?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 1 of 2 | 1   2   | Next
vBulletin® Version 3.8.8
Normal Logout