Sunday, May 16, 2010

Adjust Synaptics Touchpad in Lucid Lynx

Until Lucid Lynx, HAL was used to control certain settings. For example, to adjust the Synaptics Touchpad on a laptop, settings could be put into /etc/hal/fdi/policy/11-x11-synaptics.fdi (see my previous post). However, HAL was removed in Lucid. How, then, does one make these adjustments to a Synaptics Touchpad? ... by using xinput.

I created a folder named .synaptics in my home directory (/home/myuser/). Then I made a text file named touchpad_adjustments.sh (filename doesn't really matter) which contained the following (the xinput lines beginning with # are adjustments I left in that I may want to easily enable later): (SEE UPDATE AT END OF THIS POST TO VIEW MOST RECENT ADJUSTMENT FILE I USE.)

#!/bin/bash
#
# list of synaptics device properties http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html#sect4
# list current synaptics device properties: xinput list-props '"SynPS/2 Synaptics TouchPad"'
#
sleep 5 #added delay...
# xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 1
# xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4
# xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 9 # Below width 1 finger touch, above width simulate 2 finger touch. - value=pad-pixels
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Area" 0, 0, 0, 4800 # set sensitive area of touchpad - value=left, top, right, bottom
xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 1 0 0 # vertical, horizontal, corner - values: 0=disable 1=enable
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 300 # stabilize 2 finger actions - value=pad-pixels
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 0 0 0 0 1 2 3 # pad corners rt rb lt lb tap fingers 1 2 3 (can't simulate more then 2 tap fingers AFAIK) - values: 0=disable 1=left 2=middle 3=right etc. (in FF 8=back 9=forward)
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 0 # vertical scrolling, horizontal scrolling - values: 0=disable 1=enable
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling" 1
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling Trigger" 3

exit


Then I made sure it had execute permissions by running:

chmod ug+x /home/myuser/.synaptics/touchpad_adjustments.sh

After that, to make sure it ran every time I started a session, I went to System > Preferences > Startup Applications and chose "Add," then gave it this filename for the command.

Update: The most current version of touchpad adjustment file I use is:

#!/bin/bash
#
# list of synaptics device properties http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html#sect4
# list current synaptics device properties: xinput list-props "SynPS/2 Synaptics TouchPad"
# To get list of devices and IDs, do xinput list
#
sleep 5 #added delay...
# xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 1
# xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4
# xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 9 # Below width 1 finger touch, above width simulate 2 finger touch. - value=pad-pixels
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Area" 0, 0, 0, 4800 # set sensitive area of touchpad - value=left, top, right, bottom
xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 1 0 0 # vertical, horizontal, corner - values: 0=disable 1=enable
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 300 # stabilize 2 finger actions - value=pad-pixels
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 0 0 0 0 1 2 3 # pad corners rt rb lt lb tap fingers 1 2 3 (can't simulate more then 2 tap fingers AFAIK) - values: 0=disable 1=left 2=middle 3=right etc. (in FF 8=back 9=forward)
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 0 # vertical scrolling, horizontal scrolling - values: 0=disable 1=enable
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling" 1
# xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Circular Scrolling Trigger" 3

exit

Thursday, May 13, 2010

Remove Unwanted Kernels From Grub Menu

To remove unwanted kernel choices from the Grub menu simply go to System > Administration > Synaptic Package Manager. In search box type the kernel version you want to remove (i.e. 2.6.32). Mark for removal the installed ones that you want to remove. Then apply changes.

Grub 2 Splash Image

To add a background image to the Grub 2 boot menu and increase resolution...

From terminal:

sudo nano -w /etc/default/grub

To uncomment a line, remove the #. So uncomment the GRUB_GFXMODE line and you can change the graphics modes as follows if you like:

GRUB_GFXMODE=1280x720,1024x768,800x600

CTRL-X to exit, answer Y, then enter.

sudo nano -w /etc/grub.d/05_debian_theme

Change value after WALLPAPER to name of background image you want to use. Be sure to get the image and put in this directory. Mine shows:

WALLPAPER="/usr/share/images/desktop-base/BlueGlowTux_1280x720.png"

If you want to change the color of the menu text, change the first color in either of the color pairs:

COLOR_NORMAL="blue/black"
COLOR_HIGHLIGHT="yellow/black"

CTRL-X to exit, answer Y, then enter.

Now in terminal type

sudo update-grub

...and you're done.

Wednesday, May 12, 2010

Change Position of Window Controls in Lucid Lynx Ubuntu 10.04

The default position of window controls changed in Lucid Lynx. Many people, like me, do not like the new default. To change back to the way things were is easy.

Alt-F2
gconf-editor
apps > metacity > general
change button_layout value to:
"menu:minimize,maximize,close"

Install Adobe Flash in Lucid Lynx Ubuntu 10.04

For some reason I couldn't get Adobe Flash installed in a fresh install of Lucid Lynx the way I have in Karmic and Jaunty. I found the following tip from EllyBilateralCl on the Ubuntu Forums:

sudo add-apt-repository ppa:sevenmachines/flash && sudo apt-get update && sudo apt-get install flashplugin64-installer


It worked.