Reply
Thread Tools
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:
Hedgecore's Avatar
Posts: 1,361 | Thanked: 115 times | Joined on Oct 2005 @ Toronto, Ontario, Canada
#2
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?
 

The Following User Says Thank You to Hedgecore For This Useful Post:
Posts: 949 | Thanked: 14 times | Joined on Jul 2005
#3
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.
 

The Following User Says Thank You to Mike Cane For This Useful Post:
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#4
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 :-)
 

The Following User Says Thank You to fpp For This Useful Post:
gnuite's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#5
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...
 

The Following User Says Thank You to gnuite For This Useful Post:
Posts: 155 | Thanked: 10 times | Joined on Nov 2005 @ central georgia, usa
#6
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

Last edited by putkowski; 2006-01-21 at 01:53.
 

The Following User Says Thank You to putkowski For This Useful Post:
gnuite's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#7
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.
 
Posts: 155 | Thanked: 10 times | Joined on Nov 2005 @ central georgia, usa
#8
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...
 
Posts: 20 | Thanked: 1 time | Joined on Feb 2006
#9
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!
__________________
--
Alex
 
CrossBow's Avatar
Posts: 58 | Thanked: 5 times | Joined on Dec 2005
#10
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?
__________________
--- CrossBow

Mobile Linux? Got That.
Pepper Pad 3, Nokia 770, GP2X, Motorola A780

Please visit http://linuxslate.com/ New! Discussion boards just started.
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:01.