You are not logged in.

#1 2009-01-11 22:18:55

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Disabling Touchpad on boot-up while USB mouse is connected

I have this little issue with trying to disable Synaptics Touchpad on my laptop while my USB mouse is connected. Here's how it goes.
First I've followed the description from this wiki page. Then I restarted my system and found out that my touchpad was still working while my mouse was connected. I had to disable it manually. Now when my OS is up and I unplug my mouse from an USB port the touchpad starts to work. It also stops when I plug-in the mouse. So why is it on juster after I boot-in into my system?


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#2 2009-01-17 17:18:37

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: Disabling Touchpad on boot-up while USB mouse is connected

*bump


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#3 2009-01-31 05:11:25

fulloffur
Member
Registered: 2007-09-24
Posts: 20

Re: Disabling Touchpad on boot-up while USB mouse is connected

My guess would be that udev is loaded before hal/xorg, hence the synclient command does not work as the touchpad is not configured yet. Maybe you can add script to retrigger the mouse after X starts.

udevadm trigger --subsystem-match=input --attr-match=ID-CLASS=mouse

not sure if it would work

Offline

#4 2009-01-31 10:26:53

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: Disabling Touchpad on boot-up while USB mouse is connected

Hello fulloffur smile
Thanks for your effort. Unfortunately I'm not very familiar with scripts so I don't know what to do with the one you provided. Can you tell me where to put it and so on. I would like to give it a try smile


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#5 2009-01-31 10:51:41

fulloffur
Member
Registered: 2007-09-24
Posts: 20

Re: Disabling Touchpad on boot-up while USB mouse is connected

That depends how you start your session. I'm using gnome now. So I just add the command to the session startup. ( System > Preferences > Sessions ), though the touchpad will still be on in gdm.

What are you using?

Offline

#6 2009-01-31 11:01:54

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: Disabling Touchpad on boot-up while USB mouse is connected

I'm on KDE3mod right now to which I log-in using KDM.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#7 2009-01-31 11:26:20

fulloffur
Member
Registered: 2007-09-24
Posts: 20

Re: Disabling Touchpad on boot-up while USB mouse is connected

I'm not really familiar with kde, but I think kde autostarts .desktop files found in ~/.kde/Autostart

So I guess you need to .desktop file, say touchpad.desktop, to ~/.kde/Autostart. Add the following to the file

[Desktop Entry]
Type=Application
Terminal=false
Exec=udevadm trigger --subsystem-match=input --attr-match=ID-CLASS=mouse
Name=Touchpad

this won't affect kdm though.

hope this works for you.

Last edited by fulloffur (2009-01-31 12:42:37)

Offline

#8 2009-01-31 13:41:12

fulloffur
Member
Registered: 2007-09-24
Posts: 20

Re: Disabling Touchpad on boot-up while USB mouse is connected

After trying it myself, the udevadm command doesn't work. So forget what I said. sorry.

Offline

#9 2009-02-01 09:01:31

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: Disabling Touchpad on boot-up while USB mouse is connected

Yea, I got the following prompt on log-in

4bab6294dc1c675dm.png


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#10 2012-10-25 13:38:54

SuperBo
Member
Registered: 2012-02-20
Posts: 45

Re: Disabling Touchpad on boot-up while USB mouse is connected

I have the same issue. But I found a way to solve this.
Firstly, create a script file touchpad.sh

#!/bin/bash

lsusb | grep [Mm]ouse -q
if [ $? -eq 0 ]; then
	synclient TouchpadOff=1
else
	synclient TouchpadOff=0
fi

Put it in directory you like and make it executable. I put it in my home directory.

chmod +x ~/touchpad.sh

Finally, make it run at start-up. I use xinit so i put this line to my .xinitrc

/home/superbo/touchpad.sh

If you use KDE, I think you can add the following file to kde Autostart folder

[Desktop Entry]
Type=Application
Terminal=false
Exec=/home/superbo/touchpad.sh
Name=Touchpad

Last edited by SuperBo (2012-10-26 00:41:13)

Offline

Board footer

Powered by FluxBB