Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: How to permanently disable touchpad in Lubuntu

  1. #11
    Join Date
    Apr 2009
    Location
    Spain
    Beans
    501
    Distro
    Lubuntu

    Re: How to permanently disable touchpad in Lubuntu

    Thanks folks. I decided to go with Sudodus as I'd like to be able to toggle rather than just disable at start up. But the scripts you provided Sudodus don't work for me. They have no effect. I notice that some of the lines are commented out (#). I used the scripts "as is". Should I uncomment them?

    These easy commands are useful, thank you:
    synclient touchpadoff=1
    synclient touchpadoff=0

  2. #12
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to permanently disable touchpad in Lubuntu

    I have used this script many times (in several computers, and in many cases with Lubuntu) so I'm pretty sure it works.

    The comments are 'true comments' and should not be uncommented.

    If you want it to happen automatically, you should autostart a terminal window with a command to turn off the touchpad.

    Please describe how you try to use the script (what you have done so far), and I can tell you what to add or change.

  3. #13
    Join Date
    Apr 2009
    Location
    Spain
    Beans
    501
    Distro
    Lubuntu

    Re: How to permanently disable touchpad in Lubuntu

    Quote Originally Posted by sudodus View Post
    Please describe how you try to use the script (what you have done so far), and I can tell you what to add or change.
    Well, I copied the code from your message above and pasted it to the end of my ~/.bashrc file. I saved the file and rebooted. I checked that the touchpad was working. I opened a terminal and typed:

    Code:
    TT
    I hit the "enter" button.

    My touchpad was still working.

  4. #14
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to permanently disable touchpad in Lubuntu

    You did what you should do, and I think it should work. Did you copy the first line, which defines the alias?

    Code:
    alias TT='touchpad-toggle'
    What happens, when you type the following line?

    Code:
    alias TT

  5. #15
    Join Date
    Apr 2009
    Location
    Spain
    Beans
    501
    Distro
    Lubuntu

    Re: How to permanently disable touchpad in Lubuntu

    I copied all of the following code:

    Code:
    alias TT='touchpad-toggle'
    
    ###
    
    function touchpad-toggle {
    
    # toggle synaptic touchpad on/off
    
    # get current state
    SYNSTATE=$(synclient -l | grep TouchpadOff | awk '{ print $3 }')
    
    # change to other state
    if [ $SYNSTATE = 0 ]; then
        synclient touchpadoff=1
        echo "touchpad OFF"
    elif [ $SYNSTATE = 1 ]; then
        synclient touchpadoff=0
        echo "touchpad ON"
    else
        echo "Couldn't get touchpad status from synclient"
        exit 1
    fi
    }
    
    ####
    
    alias TT
    If I type either TT or alias TT in a terminal (then press enter) nothing happens. My touchpad is still active.

    As an alternative, I wonder, could I make a custom launcher to run the commands synclient touchpadoff=1 and synclient touchpadoff=0 at a click? Even better if a single launcher could show both options. If that is possible, could you tell me how to achieve it?

  6. #16
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to permanently disable touchpad in Lubuntu

    I think that for some reason the alias TT is not defined

    Code:
    alias TT='touchpad-toggle'
    Either your ~/.bashrc file does not contain that line, or never executes it or is not executed at all. Are you running another shell, not bash but for example csh or tcsh?

    What happens if you type the long function name (launch the command with the Enter key)

    Code:
    touchpad-toggle
    -o-

    It is also possible to make a shell-script of touchpad-toggle (instead of a function in .bashrc).

    Code:
    #!/bin/bash
    
    # toggle synaptic touchpad on/off
    
    # get current state
    SYNSTATE=$(synclient -l | grep TouchpadOff | awk '{ print $3 }')
    
    # change to other state
    if [ $SYNSTATE = 0 ]; then
        synclient touchpadoff=1
        echo "touchpad OFF"
    elif [ $SYNSTATE = 1 ]; then
        synclient touchpadoff=0
        echo "touchpad ON"
    else
        echo "Couldn't get touchpad status from synclient"
        exit 1
    fi
    Create an own bin directory

    Code:
    cd
    mkdir bin
    cd bin
    leafpad TT
    Put this toggle code above (starting with #!/bin/bash) into an editor (leafpad) and write it to a file named whatever you prefer, for example TT or touchpad-toggle.

    Make the file executable

    Code:
    chmod ugo+x TT
    (if TT is the name you selected)

    Otherwise you can make two super simple scripts ttoff (touchpad off) and tton (touchpad on)

    Code:
    echo synclient touchpadoff=1 > ttoff
    Code:
    echo synclient touchpadoff=0 > tton
    and keep them in you bin directory.

    Code:
    chmod ugo+x tto*
    And then you can run

    ttoff to turn the touchpad off
    and
    tton to turn the touchpad on.

  7. #17
    Join Date
    Apr 2009
    Location
    Spain
    Beans
    501
    Distro
    Lubuntu

    Re: How to permanently disable touchpad in Lubuntu

    Now a strange thing happened. I typed TT and it did toggle the touchpad. But the next time I did it, the terminal window crashed and there was no change in touchpad behaviour. I rebooted and tried again. On the first and second tries, the terminal crashed, but from try 3 onwards, the command worked.

    I deleted the script from .bashrc, and instead set up your shell script. I rebooted. On tries 1 and 2 it returned:
    "Couldn't get touchpad status from synclient"

    From try 3 onwards, it worked. I'll let you know if this behaviour is stable.

  8. #18
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to permanently disable touchpad in Lubuntu

    I agree, this is strange. It is getting interesting

    Which version are you running? You wrote Lubuntu 14.04 in the opening post. Is it updated/upgraded to 14.04.1 with all current versions of the packages involved? Are there complaints when you run

    Code:
    sudo apt-get update
    sudo apt-get dist-upgrade
    Have you installed some special PPAs or some programs from deb-files, that might have an influence on the touchpad?

    What happens if you uninstall and reinstall synclient?

    Code:
     sudo apt-get install xserver-xorg-input-synaptics

  9. #19
    Join Date
    Apr 2009
    Location
    Spain
    Beans
    501
    Distro
    Lubuntu

    Re: How to permanently disable touchpad in Lubuntu

    Lubuntu 14.04.1 all upgrades current.

    dist-upgrade done with no errors.

    No applications installed from downloaded deb files (that I recall).

    Added software sources:
    ppa.launchpad.net/gencsfm/ppa/ubuntu
    apt.insychq.com/ubuntu

    Uninstalled, reinstalled synclient.

    No change in behaviour. Success of scripts in toggling touchpad is very erratic. The only thing that consistently works is synclient touchpadoff=1 (0). I guess I'll have to stick with that.

    Quote Originally Posted by sudodus View Post
    I agree, this is strange. It is getting interesting

    Which version are you running? You wrote Lubuntu 14.04 in the opening post. Is it updated/upgraded to 14.04.1 with all current versions of the packages involved? Are there complaints when you run

    Code:
    sudo apt-get update
    sudo apt-get dist-upgrade
    Have you installed some special PPAs or some programs from deb-files, that might have an influence on the touchpad?

    What happens if you uninstall and reinstall synclient?

    Code:
     sudo apt-get install xserver-xorg-input-synaptics

  10. #20
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to permanently disable touchpad in Lubuntu

    Quote Originally Posted by rdh61 View Post
    Lubuntu 14.04.1 all upgrades current.

    dist-upgrade done with no errors.

    No applications installed from downloaded deb files (that I recall).

    Added software sources:
    ppa.launchpad.net/gencsfm/ppa/ubuntu
    apt.insychq.com/ubuntu

    Uninstalled, reinstalled synclient.

    No change in behaviour. Success of scripts in toggling touchpad is very erratic. The only thing that consistently works is synclient touchpadoff=1 (0). I guess I'll have to stick with that.
    Your installed system looks healthy Those added software sources seem to manage other things (not related to the touchpad), so they should not create this problem. I don't understand why toggling is erratic, but I guess you can get along with

    Code:
    synclient touchpadoff=1
    synclient touchpadoff=0
    It should work for you to run them as scripts or aliases if you don't want to type them every time.

    Is there someone else who can chip in and help solve this problem?

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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