Wednesday, August 11, 2010

Helping with Big Fonts

I have a couple of coworkers who wear reading glasses when sitting at the computer. More than once, they have come over to my work area and had to run back to get their glasses. To help them (and tease them), I created a Grandpa Mode macro that increases the screen font size-just for them. Permanently
setting up the ability to use Grandpa Mode requires four commands. The first two define custom commands that change the dpi value. The second two bind the commands to key sequences.

gconftool-2 -t str-set /apps/metacity/keybinding_commands/command_7 \
'gconftool-2 -t float-set /desktop/gnome/font_rendering/dpi 200’
gconftool-2 -t str-set /apps/metacity/keybinding_commands/command_8 \
'gconftool-2 -t float-set /desktop/gnome/font_rendering/dpi 96’
gconftool-2 -t str-set /apps/metacity/global_keybindings/run_command_7 \
gconftool-2 -t str-set /apps/metacity/global_keybindings/run_command_8 \

Now pressing Ctrl+F7 changes the resolution to 200 dpi and makes the fonts appear large (and coworkers can read it without glasses). Ctrl+F8 returns the
screen to the system default of 96 dpi.

If you want to remove Grandpa Mode, you can use the gconftool-2-unset option:

# reset default dpi
gconftool-2 -t float-set /desktop/gnome/font_rendering/dpi 96
# unset key mappings
gconftool-2-unset /apps/metacity/keybinding_commands/command_7
gconftool-2-unset /apps/metacity/keybinding_commands/command_8
gconftool-2-unset /apps/metacity/global_keybindings/run_command_7
gconftool-2-unset /apps/metacity/global_keybindings/run_command_8

Source of Information : Wiley Ubuntu Powerful Hacks And Customizations

No comments: