Scripting

Trackpad Setup Using Hal Not Xorg

Since Ubuntu 8.10, the use of xorg.conf to configure the X desktop has been deprecated for the majority of PC setups. This means that enabling SHMConfig? and extra settings for trackpads is also no longer set up there. I found the defaults for the trackpad are not great so you need to be able to alter this.

I had a script that I called from a desktop shortcut to set these things but it was a pain as after an acpi resume they would not re-run automatically. Also, it would seem that the acpi resume scripts would not run the script properly (I'm guessing that this is due to synclient not connecting to the correct display - xhosts?)

However, as it is now part of HAL, it is possible to set this as part of an fdi script.

Simply edit/create the file : /etc/hal/fdi/policy/shmconfig.fdi With the following contents :


<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
 <device>
  <match key="input.x11_driver" string="synaptics">
   <merge key="input.x11_options.SHMConfig" type="string">true</merge>
   <merge key="input.x11_options.RightEdge" typ="string">950</merge>
   <merge key="input.x11_options.VertEdgeScroll" type="string">1</merge>
   <merge key="input.x11_options.AccelFactor" type="string">0.2</merge>
   <merge key="input.x11_options.TapButton2" type="string">2</merge>
   <merge key="input.x11_options.LTCornerButton" type="string">2</merge>
  </match>
 </device>
</deviceinfo>

It is possible to set any of the shm settings in there, however, don't make the mistake I did and set the type of the integer looking values to "integer" not "string" as this doesn't work!

Full list of parameter values :

Parameter settings:                             
    LeftEdge                = 120               
    RightEdge               = 950               
    TopEdge                 = 120               
    BottomEdge              = 650               
    FingerLow               = 14                
    FingerHigh              = 15                
    FingerPress             = 256               
    MaxTapTime              = 180               
    MaxTapMove              = 110               
    MaxDoubleTapTime        = 180               
    SingleTapTimeout        = 180               
    ClickTime               = 100               
    FastTaps                = 0                 
    EmulateMidButtonTime    = 75                
    EmulateTwoFingerMinZ    = 257               
    VertScrollDelta         = 20                
    HorizScrollDelta        = 20                
    VertEdgeScroll          = 1                 
    HorizEdgeScroll         = 0                 
    CornerCoasting          = 0                 
    VertTwoFingerScroll     = 0                 
    HorizTwoFingerScroll    = 0                 
    MinSpeed                = 0.3               
    MaxSpeed                = 0.75              
    AccelFactor             = 0.1               
    TrackstickSpeed         = 40                
    EdgeMotionMinZ          = 30                
    EdgeMotionMaxZ          = 160               
    EdgeMotionMinSpeed      = 1                 
    EdgeMotionMaxSpeed      = 102               
    EdgeMotionUseAlways     = 0                 
    UpDownScrolling         = 1                 
    LeftRightScrolling      = 1                 
    UpDownScrollRepeat      = 1                 
    LeftRightScrollRepeat   = 1                 
    ScrollButtonRepeat      = 100               
    TouchpadOff             = 0                 
    GuestMouseOff           = 0                 
    LockedDrags             = 0                 
    LockedDragTimeout       = 5000              
    RTCornerButton          = 2                 
    RBCornerButton          = 3
    LTCornerButton          = 2
    LBCornerButton          = 0
    TapButton1              = 1
    TapButton2              = 2
    TapButton3              = 3
    ClickFinger1            = 1
    ClickFinger2            = 1
    ClickFinger3            = 1
    CircularScrolling       = 0
    CircScrollDelta         = 0.1
    CircScrollTrigger       = 0
    CircularPad             = 0
    PalmDetect              = 1
    PalmMinWidth            = 10
    PalmMinZ                = 200
    CoastingSpeed           = 0
    PressureMotionMinZ      = 30
    PressureMotionMaxZ      = 160
    PressureMotionMinFactor = 1
    PressureMotionMaxFactor = 1
    GrabEventDevice         = 1