0

For years I have been manually disabling the 'stick' part of the touchpad on a Toshiba Z30 at startup of Mint. This model has a hardware problem where the mouse moves around by itself.

Have now tried several times to get this command to run automatically at startup (for all users) but it won't work.

A script was created with execution rights:

ls -la /etc/init.d/disable-stick.sh
-rwxr-xr-x 1 root root 84 Feb 28 07:21 /etc/init.d/disable-stick.sh

it's contents are:

$ cat /etc/init.d/disable-stick.sh

xinput disable 'AlpsPS/2 ALPS DualPoint Stick'
echo "Just ran disable stick script"

That gets called here:

$ ls -la /etc/rc.local

-rwxr-xr-x 1 root root 345 Feb 28 07:16 /etc/rc.local

which has the following contents:

$ cat /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/etc/init.d/disable-stick.sh || exit 1
exit 0

I really think this should work, have looked at many sources. It almost works in that something gets run, can see in the startup log:

$ tail -n 100 /var/log/boot.log

[  OK  ] Started MySQL Community Server.
[FAILED] Failed to start Load/Save RF Kill Switch Status.
See 'systemctl status systemd-rfkill.service' for details.
[  OK  ] Started Network Manager Wait Online.
[  OK  ] Reached target Network is Online.
         Starting Docker Application Container Engine...
         Starting /etc/rc.local Compatibility...
         Starting TeamViewer remote control daemon...
         Starting LSB: disk temperature monitoring daemon...
         Starting LSB: Start NTP daemon...
         Starting LSB: VirtualBox Linux kernel module...
         Starting LSB: Starts and daemonize Glances server...
[  OK  ] Started LSB: disk temperature monitoring daemon.
[  OK  ] Started LSB: Starts and daemonize Glances server.
[   40.068428] rc.local[1373]: Unable to connect to X server
[   40.068683] rc.local[1373]: Just ran disable stick script
[  OK  ] Started /etc/rc.local Compatibility.
         Starting Hold until boot process finishes up...
         Starting Terminate Plymouth Boot Screen...
[  OK  ] Started LSB: Start NTP daemon.

"unable to connect to X server" - something not quite right. Any idea how to get this working?

update:

The small script /etc/init.d/disable-stick.sh definitely works, I tested it in my terminal after login and the mouse stops moving around. Just not sure it is firing at the right point in the startup..

3

1 Answer 1

0

I have solved it, the solution does not kick in till I log in my user, the mouse is still misbehaving till it is logged in, but then thankfully the command runs upon login. It is a similar feeling of relief as when a car alarm switches off. Also relief not to always have to type that command into the terminal.

Using the gui in linux mint, I added an item to the start programs like this: add item to linux mint start programs

That line which you can't quite see with the command (Befehl) is:

xinput disable 'AlpsPS/2 ALPS DualPoint Stick'

After adding, it appears in the list:

linux mint start program menu with new item

Doing this has added a file inside the autostart folder

$ ls ~/.config/autostart/
blueman.desktop        hplip-systray.desktop            mintupload.desktop
Brightness.desktop     mint-ctrl-alt-backspace.desktop  mintwelcome.desktop
disable stick.desktop  mintupdate.desktop               shutter.desktop

The contents of the created disable\ stick.desktop file are:

[Desktop Entry]
Type=Application
Exec=xinput disable 'AlpsPS/2 ALPS DualPoint Stick'
X-GNOME-Autostart-enabled=true
NoDisplay=false
Hidden=false
Name[de_DE]=disable stick
Comment[de_DE]=switches off the trackpad at start
X-GNOME-Autostart-Delay=0

So now we can see what was needed programatically to achieve this. Am happy with this solution for now, but I wonder if it could be run before the login screen itself, and whether it runs for other users who log in (am guessing not).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.