Page 1 of 2 12 LastLast
Results 1 to 10 of 23

Thread: Touchpad Control

Hybrid View

  1. #1
    Senior Member
    Join Date
    Jan 2011
    Posts
    242

    Touchpad Control

    There are two drawbacks to using a laptop: the touchpad and the touchpad.

    First, you are typing something and the touchpad decides you've tapped in the secret code for "destroy, destroy, frustration is irrelevant" and whatever it was you were doing is gone.

    Second, this still happens even though you've plugged in an external mouse and aren't using the touchpad at all.

    The route to solving the first problem is through syndaemon and the route to solving the second is through synclient. Both are command line apps already installed in Knoppix (6.4.4. at least).

    To get the right settings automatically when Knoppix start-ups you need an additional script in /etc/X11/Xsession.d and to get the settings to change automagically when you plug-in or unplug a USB mouse, you need to add an extra pair of rules to /etc/udev/rules.d.

    There are examples of how to do this out there but they usually start with someone complaining what used to work has stopped and could they crib a new solution from someone who has already done all the hard work.

    Seems Knoppix is no exception and none of the solutions out there work. Seems xhost + is missing somewhere for sentimental reasons or perhaps Knoppix is just using a very new X server with new and improved security (the kind that got Windows Vista such a bad name).

    Here's my take on this:

    Code:
    # /etc/udev/rules.d/75-touchpad.rules
    # Disable touchpad when USB mouse is plugged in and reenable when USB mouse is removed
    
    ACTION=="add",    SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", RUN+="/etc/X11/Xsession.d/50touchpad 1"
    ACTION=="remove", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", RUN+="/etc/X11/Xsession.d/50touchpad 0"
    
    # EOF
    and

    Code:
    #!/bin/sh
    # /etc/X11/Xsession.d/50touchpad
    
    if pidof X >/dev/null; then
    
      # Turn touchpad off when a USB mouse is present
    
      pidfile=/var/run/syndaemon.pid;
    
      if [ -n "${XAUTHORITY}" ]; then
        # Xsession initialisation
    
        if lsusb -v 2>/dev/null | grep -qF Mouse; then
          synclient TouchpadOff=1;
        else
          syndaemon -d -t -k -p $pidfile;
        fi
      else
        # udev hotplug event
    
        DISPLAY=":0";
        USER=$(who | awk "/ $DISPLAY /"'{print $1}');
        XAUTHORITY=/home/$USER/.Xauthority;
        export DISPLAY XAUTHORITY;
    
        synclient TouchpadOff=$1;
    
        if [ "$1" -eq 1 ]; then
          [ -f $pidfile ] && kill $(cat $pidfile);
          [ -f $pidfile ] && sync;
        else
          [ ! -f $pidfile ] && syndaemon -d -t -k -p $pidfile;
          [ ! -f $pidfile ] && sync;
        fi
      fi
    
    fi
    
    # EOF
    The second must be executable as it is called by the rules in the first.

    Enjoy.
    Last edited by Forester; 03-17-2011 at 11:30 PM.

  2. #2
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    I was wondering if your 6.4.4 DVD version of gconf-editor was like my CD version.
    The CD version does NOT having a nice touchpad_enable choice to finagle.
    Ubuntu 10.10 does.

    Your solution is nice. Could it play an appropriate Irish tune, do you suppose.

  3. #3
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    @ Forester

    I was surprised to find how much built-in (meaning man synaptics)
    control and info exists for the synaptics touchpad.
    In so doing I ran across the following interesting tidbits:

    controls GuestMouseOff(Boolean) and SynapticsOff(Values 0,1,2).

    Perhaps you are already aware of these; if not maybe they offer some
    refinements for your keypad/mouse amendments. The ff gives even more
    details than the man pages.

    http://www.x.org/archive/X11R7.5/doc...naptics.4.html

  4. #4
    Senior Member
    Join Date
    Jan 2011
    Posts
    242
    Quote Originally Posted by utu View Post
    @ Forester

    I was surprised to find how much built-in (meaning man synaptics)
    control and info exists for the synaptics touchpad.
    I'm not. I've just never used a laptop consistently enough to have had an interest in studying what I could do with the touchpad. Handy for scrolling in long documents both in and out of a browser. Best discovery yet is a gentle tap with two fingers is equivalent of clicking the middle button on a mouse.


    Quote Originally Posted by utu View Post
    controls GuestMouseOff(Boolean) and SynapticsOff(Values 0,1,2).

    Perhaps you are already aware of these.
    I believe (read the man page again) SynapticsOff is equivalent to TouchpadOff you are already using. I believe in the current X server the default has been changed from 0 to 2 but I'm none the wiser.

    Remember IBM ThinkPads ? I think they had Guest Mice. We called them nipples.

    Quote Originally Posted by utu View Post
    The ff gives even more details than the man pages.

    http://www.x.org/archive/X11R7.5/doc...naptics.4.html
    This is just an html representation of what you get when you type

    Code:
    man 4 synaptics
    under Knoppix. No surprise there.

  5. #5
    Junior Member
    Join Date
    Mar 2012
    Location
    Brisbane, Australia
    Posts
    16
    I actually want to enable the touchpad. How do you do it?

    I have given up trying to modify xorg.conf. Yeah, I delete the line that says it has to be deleted to save changes, but what do I do next?

    Perhaps someone out there can write a guide for dummies to enable touchpads.

    I have written a script that contains the required synclient options. At the moment I click it after booting and it enables the touchpad.
    This is a clumsy solution. So how, keep it simple guys, can I make the script boot automatically, like the batch files of old.

    So this post asks two separate questions. Any takers?

    Peter Perros, Brisbane Australia.

  6. #6
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    As an alternative...

    Quote Originally Posted by wspc View Post
    I have written a script that contains the required synclient options. At the moment I click it after booting and it enables the touchpad.
    This is a clumsy solution. So how, keep it simple guys, can I make the script boot automatically, like the batch files of old.
    Another approach would be to take your script and add it to /etc/rc.local.
    This file should also be root:root AND executable.

    But I am surprised the Xsession.d approach doesn't work for you.

    Let us know how it goes in any event.

  7. #7
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    As an alternative...

    Quote Originally Posted by wspc View Post
    I have written a script that contains the required synclient options. At the moment I click it after booting and it enables the touchpad.
    This is a clumsy solution. So how, keep it simple guys, can I make the script boot automatically, like the batch files of old.
    Another approach might be to take your script and add it to /etc/rc.local.
    This file should also be root:root AND executable. We really should see your script
    before you do this.

    But I am surprised the Xsession.d approach doesn't work for you.

    Let us know how it goes in any event.

  8. #8
    Senior Member registered user
    Join Date
    Feb 2010
    Posts
    512
    Did you read the thread "How do I enable touchpad-tapping?"?

  9. #9
    Junior Member
    Join Date
    Mar 2012
    Location
    Brisbane, Australia
    Posts
    16
    Hello Klaus2008.
    Yes I have read the thread countless times. I have written a simple script file with the synclient options I need (eg., HorizonalEdgeScroll) but this script file only works if I click on it with the mouse using button1.
    I understand how to edit the xorg.conf file by logging on as root in terminal, and I know vi from my unix days in the 70's, but to date have been unable to work out what lines/code to add to xorg.conf to get the touchpad working automatically from boot.
    Is it as simple as copying code from a ubuntu distro xorg.conf file?
    I would be happy just to have my script file executed at boot up. Any tips appreciated.
    Peter Perros, Brisbane Australia.

  10. #10
    Senior Member registered user
    Join Date
    Feb 2010
    Posts
    512
    Hello Peter Perros.

    I think that you should create the configuration file /etc/X11/Xsession.d/15x11-synaptics using your favourite text editor. The content of that file could be
    Code:
    #
    synclient TapButton1=1 TapButton2=3 TapButton3=2 HorizEdgeScroll=1
    The file should end with a single blank line.

    I hope that helps.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS picture

Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS

$721.06



CSE-118 Supermicro 1U GPU Server 2.6Ghz 28-C 128GB 2x Nvidia K40 GPU 2x1600W PSU picture

CSE-118 Supermicro 1U GPU Server 2.6Ghz 28-C 128GB 2x Nvidia K40 GPU 2x1600W PSU

$580.03



Supermicro 4U 4x Nvidia GPU AI Server 2.1Ghz 16-Core 192GB 2x10G SFP+ 2x2200W picture

Supermicro 4U 4x Nvidia GPU AI Server 2.1Ghz 16-Core 192GB 2x10G SFP+ 2x2200W

$1250.00



CSE-118 Supermicro 1U 3x GPU Server  2.1Ghz 16-C 128GB CX353A 2x1600W PSU Rails picture

CSE-118 Supermicro 1U 3x GPU Server 2.1Ghz 16-C 128GB CX353A 2x1600W PSU Rails

$450.03



Intel Xeon E5-2680 v4 2.4GHz 35MB 14-Core 120W LGA2011-3 SR2N7 picture

Intel Xeon E5-2680 v4 2.4GHz 35MB 14-Core 120W LGA2011-3 SR2N7

$17.99



Intel Xeon Gold 6140 SR3AX 2.3GHz 18-Core Processor CPU picture

Intel Xeon Gold 6140 SR3AX 2.3GHz 18-Core Processor CPU

$44.99



INTEL XEON GOLD 6148 20 Core SR3B6 2.4GHZ 27.5MB Processor    @24 picture

INTEL XEON GOLD 6148 20 Core SR3B6 2.4GHZ 27.5MB Processor @24

$99.99



Intel Xeon Gold 6138 2.0GHz 27.5MB 20-Core 125W LGA3647 SR3B5 picture

Intel Xeon Gold 6138 2.0GHz 27.5MB 20-Core 125W LGA3647 SR3B5

$46.00



Lenovo ThinkStation P920 1.5TB SSD OS Intel Xeon Silver, 2.40 GHz 16GB Desktop picture

Lenovo ThinkStation P920 1.5TB SSD OS Intel Xeon Silver, 2.40 GHz 16GB Desktop

$680.00



HP Z440 Workstation 18 Core E5-2699 V3 128GB RAM 512GB SSD 2TB WiFi WIN10 DVD picture

HP Z440 Workstation 18 Core E5-2699 V3 128GB RAM 512GB SSD 2TB WiFi WIN10 DVD

$348.99