Skip to main content
added a commen
Source Link
cardamom
  • 672
  • 1
  • 8
  • 27
$ 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

"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..

$ 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

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

$ 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

"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..

Source Link
cardamom
  • 672
  • 1
  • 8
  • 27

disabling part of touchpad at startup

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?