Problem with udev rule to disable touchpad when USB mouse connects
Hi, I've been running Arch on this laptop, but I can't get this udev rule to work properly.
What I want to happen is: when I plug in my usb mouse, the laptop touchpad is disabled, and the left and right buttons are reversed (I'm left handed)
After following several tutorials, both from the arch wiki and other sites, I've come up with this udev rule:
ACTION=="add", SUBSYSTEM=="input", RUN+="/usr/local/bin/USBMouse.sh"
ACTION=="remove", SUBSYSTEM=="input", RUN+="/usr/local/bin/USBMouse.sh"
And here's the script it links to (USBMouse.sh):
#!/bin/bash
export DISPLAY=:0.0
synclient TouchPadOff=$(/usr/bin/lsusb | grep "Microsoft Corp.\
Nano Transceiver v1.0 for Bluetooth" | wc -l)
if [[ $(/usr/bin/lsusb | grep "Microsoft Corp.\
Nano Transceiver v1.0 for Bluetooth" | wc -l) == 1 ]]
then
xmodmap -e 'pointer = 3 2 1'
fi
if [[ $(/usr/bin/lsusb | grep "Microsoft Corp.\
Nano Transceiver v1.0 for Bluetooth" | wc -l) == 0 ]]
then
xmodmap -e 'pointer = 1 2 3'
fi
Running the script from a terminal returns no errors and works as expected. The problem is when I plug/unplug the mouse from the usb port, nothing happens.
I appreciate any insight you might have about how to fix this, and thank you in advance
This has already been done. And another relevant thread.
Similar Messages
-
Udev rule to disable touchpad when usbmouse is used [solved]
Hello guys,
I tried the udev-rule from the wiki to disable/enable touchpad when my usbmouse is plugged/unplugged.
Here is the rule:
#/etc/udev/rules.d/01-touchpad.rules
ACTION=="add", SUBSYSTEM=="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION=="remove", SUBSYSTEM=="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
The problem is that the status of my touchpad won't change when I plug/unplug my mouse. It has to be a problem with the rule because manually the synclient command works without any problem.
Here is the relevant output of lsusb:
Bus 007 Device 012: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
Thank you.
Last edited by orschiro (2010-03-18 15:15:10)Hello Coacher,
I did what you said but have no idea what to do with that logfile. I'll better post it here. Perhaps you could help me again.
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[1268568009.445312] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/mouse2 (input)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/mouse2
SUBSYSTEM=input
DEVNAME=input/mouse2
SEQNUM=48167
MAJOR=13
MINOR=34
KERNEL[1268568009.461185] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/event14 (input)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/event14
SUBSYSTEM=input
DEVNAME=input/event14
SEQNUM=48168
MAJOR=13
MINOR=78
KERNEL[1268568009.471273] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14 (input)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14
SUBSYSTEM=input
PRODUCT=3/46d/c00c/110
NAME="Logitech USB Mouse"
PHYS="usb-0000:00:1d.1-2/input0"
UNIQ=""
EV==17
KEY==70000 0 0 0 0
REL==103
MSC==10
MODALIAS=input:b0003v046DpC00Ce0110-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw
SEQNUM=48169
KERNEL[1268568009.471331] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001/hidraw/hidraw0 (hidraw)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001/hidraw/hidraw0
SUBSYSTEM=hidraw
DEVNAME=hidraw0
SEQNUM=48170
MAJOR=251
MINOR=0
KERNEL[1268568009.472063] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001 (hid)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001
SUBSYSTEM=hid
HID_ID=0003:0000046D:0000C00C
HID_NAME=Logitech USB Mouse
HID_PHYS=usb-0000:00:1d.1-2/input0
MODALIAS=hid:b0003v0000046Dp0000C00C
SEQNUM=48171
KERNEL[1268568009.472116] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0 (usb)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0
SUBSYSTEM=usb
DEVTYPE=usb_interface
DEVICE=/proc/bus/usb/007/002
PRODUCT=46d/c00c/610
TYPE=0/0/0
INTERFACE=3/1/2
MODALIAS=usb:v046DpC00Cd0610dc00dsc00dp00ic03isc01ip02
SEQNUM=48172
KERNEL[1268568009.473105] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2 (usb)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2
SUBSYSTEM=usb
DEVNAME=bus/usb/007/002
DEVTYPE=usb_device
DEVICE=/proc/bus/usb/007/002
PRODUCT=46d/c00c/610
TYPE=0/0/0
BUSNUM=007
DEVNUM=002
SEQNUM=48173
MAJOR=189
MINOR=769
UDEV [1268568009.596460] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/event14 (input)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/event14
SUBSYSTEM=input
DEVNAME=/dev/input/event14
SEQNUM=48168
ID_INPUT=1
ID_INPUT_MOUSE=1
ID_VENDOR=Logitech
ID_VENDOR_ENC=Logitech
ID_VENDOR_ID=046d
ID_MODEL=USB_Mouse
ID_MODEL_ENC=USB\x20Mouse
ID_MODEL_ID=c00c
ID_REVISION=0610
ID_SERIAL=Logitech_USB_Mouse
ID_TYPE=hid
ID_BUS=usb
ID_USB_INTERFACES=:030102:
ID_USB_INTERFACE_NUM=00
ID_USB_DRIVER=usbhid
ID_PATH=pci-0000:00:1d.1-usb-0:2:1.0
MAJOR=13
MINOR=78
DEVLINKS=/dev/char/13:78 /dev/input/by-id/usb-Logitech_USB_Mouse-event-mouse /dev/input/by-path/pci-0000:00:1d.1-usb-0:2:1.0-event-mouse
UDEV [1268568009.605422] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001/hidraw/hidraw0 (hidraw)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001/hidraw/hidraw0
SUBSYSTEM=hidraw
DEVNAME=/dev/hidraw0
SEQNUM=48170
MAJOR=251
MINOR=0
DEVLINKS=/dev/char/251:0
UDEV [1268568009.606695] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/mouse2 (input)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/mouse2
SUBSYSTEM=input
DEVNAME=/dev/input/mouse2
SEQNUM=48167
ID_INPUT=1
ID_INPUT_MOUSE=1
ID_VENDOR=Logitech
ID_VENDOR_ENC=Logitech
ID_VENDOR_ID=046d
ID_MODEL=USB_Mouse
ID_MODEL_ENC=USB\x20Mouse
ID_MODEL_ID=c00c
ID_REVISION=0610
ID_SERIAL=Logitech_USB_Mouse
ID_TYPE=hid
ID_BUS=usb
ID_USB_INTERFACES=:030102:
ID_USB_INTERFACE_NUM=00
ID_USB_DRIVER=usbhid
ID_PATH=pci-0000:00:1d.1-usb-0:2:1.0
MAJOR=13
MINOR=34
DEVLINKS=/dev/char/13:34 /dev/input/by-id/usb-Logitech_USB_Mouse-mouse /dev/input/by-path/pci-0000:00:1d.1-usb-0:2:1.0-mouse
UDEV [1268568009.608264] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001 (hid)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001
SUBSYSTEM=hid
HID_ID=0003:0000046D:0000C00C
HID_NAME=Logitech USB Mouse
HID_PHYS=usb-0000:00:1d.1-2/input0
MODALIAS=hid:b0003v0000046Dp0000C00C
SEQNUM=48171
UDEV [1268568009.609657] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14 (input)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14
SUBSYSTEM=input
PRODUCT=3/46d/c00c/110
NAME="Logitech USB Mouse"
PHYS="usb-0000:00:1d.1-2/input0"
UNIQ=""
EV==17
KEY==70000 0 0 0 0
REL==103
MSC==10
MODALIAS=input:b0003v046DpC00Ce0110-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw
SEQNUM=48169
UDEV [1268568009.611650] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0 (usb)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0
SUBSYSTEM=usb
DEVTYPE=usb_interface
DEVICE=/proc/bus/usb/007/002
PRODUCT=46d/c00c/610
TYPE=0/0/0
INTERFACE=3/1/2
MODALIAS=usb:v046DpC00Cd0610dc00dsc00dp00ic03isc01ip02
SEQNUM=48172
UDEV [1268568009.614119] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2 (usb)
UDEV_LOG=0
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2
SUBSYSTEM=usb
DEVNAME=/dev/bus/usb/007/002
DEVTYPE=usb_device
DEVICE=/proc/bus/usb/007/002
PRODUCT=46d/c00c/610
TYPE=0/0/0
BUSNUM=007
DEVNUM=002
SEQNUM=48173
ID_VENDOR=Logitech
ID_VENDOR_ENC=Logitech
ID_VENDOR_ID=046d
ID_MODEL=USB_Mouse
ID_MODEL_ENC=USB\x20Mouse
ID_MODEL_ID=c00c
ID_REVISION=0610
ID_SERIAL=Logitech_USB_Mouse
ID_BUS=usb
ID_USB_INTERFACES=:030102:
MAJOR=189
MINOR=769
DEVLINKS=/dev/char/189:769
KERNEL[1268568012.396622] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2 (usb)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2
SUBSYSTEM=usb
DEVNAME=bus/usb/007/003
DEVTYPE=usb_device
DEVICE=/proc/bus/usb/007/003
PRODUCT=46d/c00c/610
TYPE=0/0/0
BUSNUM=007
DEVNUM=003
SEQNUM=48174
MAJOR=189
MINOR=770
KERNEL[1268568012.399460] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0 (usb)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0
SUBSYSTEM=usb
DEVTYPE=usb_interface
DEVICE=/proc/bus/usb/007/003
PRODUCT=46d/c00c/610
TYPE=0/0/0
INTERFACE=3/1/2
MODALIAS=usb:v046DpC00Cd0610dc00dsc00dp00ic03isc01ip02
SEQNUM=48175
KERNEL[1268568012.399649] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002 (hid)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002
SUBSYSTEM=hid
HID_ID=0003:0000046D:0000C00C
HID_NAME=Logitech USB Mouse
HID_PHYS=usb-0000:00:1d.1-2/input0
DRIVER=generic-usb
MODALIAS=hid:b0003v0000046Dp0000C00C
SEQNUM=48176
KERNEL[1268568012.415310] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16 (input)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16
SUBSYSTEM=input
PRODUCT=3/46d/c00c/110
NAME="Logitech USB Mouse"
PHYS="usb-0000:00:1d.1-2/input0"
UNIQ=""
EV==17
KEY==70000 0 0 0 0
REL==103
MSC==10
MODALIAS=input:b0003v046DpC00Ce0110-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw
SEQNUM=48177
KERNEL[1268568012.415530] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/mouse2 (input)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/mouse2
SUBSYSTEM=input
DEVNAME=input/mouse2
SEQNUM=48178
MAJOR=13
MINOR=34
KERNEL[1268568012.415645] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/event14 (input)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/event14
SUBSYSTEM=input
DEVNAME=input/event14
SEQNUM=48179
MAJOR=13
MINOR=78
KERNEL[1268568012.415763] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002/hidraw/hidraw0 (hidraw)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002/hidraw/hidraw0
SUBSYSTEM=hidraw
DEVNAME=hidraw0
SEQNUM=48180
MAJOR=251
MINOR=0
UDEV [1268568012.419223] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2 (usb)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2
SUBSYSTEM=usb
DEVNAME=/dev/bus/usb/007/003
DEVTYPE=usb_device
DEVICE=/proc/bus/usb/007/003
PRODUCT=46d/c00c/610
TYPE=0/0/0
BUSNUM=007
DEVNUM=003
SEQNUM=48174
ID_VENDOR=Logitech
ID_VENDOR_ENC=Logitech
ID_VENDOR_ID=046d
ID_MODEL=USB_Mouse
ID_MODEL_ENC=USB\x20Mouse
ID_MODEL_ID=c00c
ID_REVISION=0610
ID_SERIAL=Logitech_USB_Mouse
ID_BUS=usb
ID_USB_INTERFACES=:030102:
MAJOR=189
MINOR=770
DEVLINKS=/dev/char/189:770
UDEV [1268568012.420120] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0 (usb)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0
SUBSYSTEM=usb
DEVTYPE=usb_interface
DEVICE=/proc/bus/usb/007/003
PRODUCT=46d/c00c/610
TYPE=0/0/0
INTERFACE=3/1/2
MODALIAS=usb:v046DpC00Cd0610dc00dsc00dp00ic03isc01ip02
SEQNUM=48175
UDEV [1268568012.420621] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002 (hid)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002
SUBSYSTEM=hid
HID_ID=0003:0000046D:0000C00C
HID_NAME=Logitech USB Mouse
HID_PHYS=usb-0000:00:1d.1-2/input0
DRIVER=generic-usb
MODALIAS=hid:b0003v0000046Dp0000C00C
SEQNUM=48176
UDEV [1268568012.421369] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002/hidraw/hidraw0 (hidraw)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002/hidraw/hidraw0
SUBSYSTEM=hidraw
DEVNAME=/dev/hidraw0
SEQNUM=48180
MAJOR=251
MINOR=0
DEVLINKS=/dev/char/251:0
UDEV [1268568012.453075] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16 (input)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16
SUBSYSTEM=input
PRODUCT=3/46d/c00c/110
NAME="Logitech USB Mouse"
PHYS="usb-0000:00:1d.1-2/input0"
UNIQ=""
EV==17
KEY==70000 0 0 0 0
REL==103
MSC==10
MODALIAS=input:b0003v046DpC00Ce0110-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw
SEQNUM=48177
UDEV [1268568012.457340] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/mouse2 (input)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/mouse2
SUBSYSTEM=input
DEVNAME=/dev/input/mouse2
SEQNUM=48178
ID_INPUT=1
ID_INPUT_MOUSE=1
ID_VENDOR=Logitech
ID_VENDOR_ENC=Logitech
ID_VENDOR_ID=046d
ID_MODEL=USB_Mouse
ID_MODEL_ENC=USB\x20Mouse
ID_MODEL_ID=c00c
ID_REVISION=0610
ID_SERIAL=Logitech_USB_Mouse
ID_TYPE=hid
ID_BUS=usb
ID_USB_INTERFACES=:030102:
ID_USB_INTERFACE_NUM=00
ID_USB_DRIVER=usbhid
ID_PATH=pci-0000:00:1d.1-usb-0:2:1.0
MAJOR=13
MINOR=34
DEVLINKS=/dev/char/13:34 /dev/input/by-id/usb-Logitech_USB_Mouse-mouse /dev/input/by-path/pci-0000:00:1d.1-usb-0:2:1.0-mouse
UDEV [1268568012.457383] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/event14 (input)
UDEV_LOG=0
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/event14
SUBSYSTEM=input
DEVNAME=/dev/input/event14
SEQNUM=48179
ID_INPUT=1
ID_INPUT_MOUSE=1
ID_VENDOR=Logitech
ID_VENDOR_ENC=Logitech
ID_VENDOR_ID=046d
ID_MODEL=USB_Mouse
ID_MODEL_ENC=USB\x20Mouse
ID_MODEL_ID=c00c
ID_REVISION=0610
ID_SERIAL=Logitech_USB_Mouse
ID_TYPE=hid
ID_BUS=usb
ID_USB_INTERFACES=:030102:
ID_USB_INTERFACE_NUM=00
ID_USB_DRIVER=usbhid
ID_PATH=pci-0000:00:1d.1-usb-0:2:1.0
MAJOR=13
MINOR=78
DEVLINKS=/dev/char/13:78 /dev/input/by-id/usb-Logitech_USB_Mouse-event-mouse /dev/input/by-path/pci-0000:00:1d.1-usb-0:2:1.0-event-mouse
Thank you. -
How to disable touchpad when usb mouse in on HP ENVY dv7-7259nr Notebook PC using Windows 7
I would like to have my touch pad disabled when using my USB mouse or otherwise be able to manually disable it. It is a pain to use when typing with the touch pad enabled but I would like to use the touch pad on occasions such as when I am traveling or if my mouse goes out. Not to mention, I would need to re-enable the touh pad if for some reason I have no mouse (keyboard shortcut?)
I am using windows 7 on my HP ENVY dv7-7259nr Notebook PCThis is what it looks like.
You should consider returning you notebook to the Windows 8 OS. There are many new features that it has that Windows 7 never did. Download use the free open source software called classic shell to give yourself a start button in Windows 8 that even has more features than Windows 7 start buton does. Once you use Windows 8 for a while you will enjoy it, especially the refresh feature and lower memory use.
I wouldn't hold my breath waiting for Windows 7 drivers.
regards,
erico
****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
2015 Microsoft MVP - Windows Experience Consumer -
Can't disable touchpad when external mouse connected
Hey guys,
OS: Win7 64Bit
Product : b0p18pa#ab4
Model: dv6-7007tx
The only way i've figured out a way to disable the touchpad is to uninstall the PS/2 compatible mouse in device manager. (which requires a restart) to come into effect and is reinstalled after the next restart afterwards.
the touchpad is SO sensitive it makes it extremely aggrivating to type as i keep tapping the pad with my palms.
any insight would be fantastic.
cheers guys.Hi,
Please try:
Control panel > Mouse > ClickPad Settings
Tick Disable internal pointing device when .....
Click Apply
Regards.
BH
**Click the KUDOS thumb up on the left to say 'Thanks'**
Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem. -
Better solution to disabling touchpad on external mouse connection??
Hi all,
I've been playing around with a "clean" solution to disabling the Synaptics touchpad on my laptop - when I connected a USB external mouse OR when the USB mouse is already connected at boot...
I have a very hacked together solution... First for info the stock "mouse" devices on laptop...
lrwxrwxrwx 1 root root 0 26.09.2013 12:38 mouse0 -> ../../devices/virtual/input/input6/mouse0/
lrwxrwxrwx 1 root root 0 26.09.2013 12:38 mouse1 -> ../../devices/platform/i8042/serio4/input/input14/mouse1/
FYI MCE IR Keyboard/Mouse (ite-cir) and Synaptics touchpad respectively.
So I have a simple script...
#! /bin/bash
username=$(users | gawk '{print $1}')
export DISPLAY=":0"
export XAUTHORITY="/home/${username}/.Xauthority"
if $(lsusb -v | grep -q Mouse); then
synclient TouchpadOff=1
else
synclient TouchpadOff=0
fi
exit 0
that is called by a udev (/etc/udev/rules.d/01-touchpad.rules ) rule...
ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ENV{ID_CLASS}="mouse", PROGRAM="/root/Scripts/mouse_detect.sh"
ACTION=="remove", SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ENV{ID_CLASS}="mouse", PROGRAM="/root/Scripts/mouse_detect.sh"
Problem is that solution does not fire when I logout and login again, or boot from cold, into KDM/KDE... My hack to solve this problem was the following (awful!!) systemd unit...
[Unit]
Description=Mouse Detect (on Desktop Environment startup)
After=display-manager.service
Requires=display-manager.service
[Service]
Type=oneshot
RestartSec=20
Restart=always
ExecStart=/root/Scripts/mouse_detect.sh
[Install]
WantedBy=graphical.target
It's stored as mouse-detect.service in /etc/systemd/system ... It fires too early, probably when KDM is active (hence why it auto-restarts every 20 seconds).... Not even sure if it's possible to get the mouse_detect.sh script to work during the KDM Session (as I'm not sure where the Xauthority information is stored for KDM and so on)...
If I make it the service unit stop on a successful run of synclient (e.g. Restart=onfailure) - it won't every refire - if say I logout and log back into my KDE session!!
Any thoughts on how to do this more cleanly??
Given that the current solution works - I was just looking to learn some more - by implementing a less hacked version!!
Thanks
Bob
Last edited by bobwya (2013-09-26 14:25:52)Zamajalo wrote:What about using one simple udev rule? Manual can be found here
The udev rule falls down when you boot with a USB mouse already attached to the laptop - on boot (as I clearly stated). The rule only detects change of state (mouse attached or detached). Also what if you have 2 USB mice attached?? :-) The udev idea of what a "mouse" is - is also rather generic (e.g. touchpad, infrared remote control are definitely not USB mice!!)
The script is overkill for running from a udev rule (- although it does have the benefit of not have a hard-coded username). However the script is necessary to test for a mouse being attached - when a KDE session starts. That was basically what my question was about... How to run this script at the start of the KDE session - my use of lsusb is annoying - because it means the script must run as root (due to the verbose flag)... There must be a way to do this as a normal desktop user (and then the script should run OK in a normal autostart desktop script).
Thanks
Bob -
How to disable UltrNav when external mouse connected
Is there a way to have the UltraNav turned off automatically when an external mouse is connected?
When typing it’s too easy to inadvertently touch the UltrNav and if you’re not watching find you’re typing in a different location, so we like to turn it off. But when I need to quickly access the laptop I would like to use the UltrNav and not have to find and connect the mouse.
I can turn it off/on through the control panel/system tray, however it’s near impossible to turn on without a mouse.
Our users have gotten use to this feature in other laptop brands but according to the Lenovo help desk it’s not available.Hi, GDodman
Unfortunately, I don't think this option is currently supported on Lenovo Think brands. I did some research on the topic and attempted to change the settings of UltraNav, but was not able to find this function. If you find that UltraNav is too easy to inadvertantly tap while typing, then I would recommend changing the sensitvity to a lower setting to reduce future misclicks and random movements.
Best of luck,
Adam
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution!" This will help the rest of the community with similar issues identify the verified solution and benefit from it. -
HT3529 i have a problem with mms in my iPhone 5s when m trying to send MMS
i have a problem with mms in my iPhone 5s when m trying to send MMS then a message appears on the screen 'cannot send messageMMS Messaging needs to be enabled to send this message' but in settings there is no setting available to inable MMS in message settings
Had the same problem. Have you checked your Cellular Data Network MMS fields? You should write there your MMS settings (APN, username, password, mmsc, mms proxy and mms max message size). You can get the data from your carrier. After that you could need to restart iPhone. Worked for me.
-
I have an iPhone 4S and never had a problem with syncing it. But suddenly, when I connected my phone to my mac, it says that its in recovery mode, and I need to restore it in order to sync. I've updated both my phone and my itunes, and it didnt work.Help?
fighter19lisa wrote:
that only makes it say its synced, when its not.
No, it does not. It transfers purchases from the iDevice to the computer. The computer must be authorized for the Apple ID that the content was acquired with.
fighter19lisa wrote:
my playlists wont show up on the phone.
Are they selected to sync? Is Manually Manage content on the device selected?
fighter19lisa wrote:
i had to change my password for my aol account again and i still cannot get my email on my phone to even work
What does that have to do with syncing content to the device? FYI, nothing. -
Hi there. I have a problem with sound on my 4s. When you move the volume slider up, it sounds well. But when I move the volume slider down I will hear barely and unclear sound in my headphone.I tried different headphones but result is same as old one.Help
Try A and B
(A) Restart iPad
1. Hold down the Sleep/Wake button until the red slider appears.
2. Drag the slider to turn off iPad.
3. Turn iPad back on, hold down the Sleep/Wake until the Apple logo appears
(B) Reset iPad
Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
Note: Data will not be affected. -
Problem with Arabic font: In certain contexts, when writing Arabic with vowel signs (fatha, damma, kasra, sukun) a sequence of sukun + fatha/damma etc. would reverse automatically. Is this a known bug?
Example: عَيْنٌ
would automatically convert to عَيُنْ
Funnily, it doesn't seem to happen here, but it does when entering text in a web interface (using Firefox, font Bayan) and when using Text Edit.
Seems to be a problem of a specific font, as e.g. Arial MS Unicode works fine. Any hints?
Thank you!Musaafir wrote:
I've no idea how i can even start using arabic vowels on Microsoft Word for Apple
You can't do Arabic on MS Word for Mac. This app has never supported RTL scripts, so you need to use something else. Mellel is best, but Pages 5, TextEdit, Nisus Writer, Open/LibreOffice should work OK.
You switch between languages by using the "flag" menu at the top right of the screen or by using the keyboard shortcuts apple/command plus space. Go to system prefs/keyboard/shortcuts to make sure that is activated.
To see which key does what, you use Keyboard Viewer.
http://support.apple.com/kb/PH13746
You place vowels on letters by typing the key for the vowel after the key for the letter. The vowels are on the option/alt keys, option/alt + a gives you َ -
I have a problem with iPad 1 16 GB begins when a message comes Altaatpet Phil Altaatpet sync itunes
gianlucastr,
an EXC_BAD_ACCESS exception type with a KERN_PROTECTION_FAILURE exception code typically has one of two causes — either a programming error, or faulty RAM. If this was due to a programming error, then you can check to see if there’s an applicable patch to your version of Outlook, or wait for the next Mavericks update from Apple, to see if either of these would fix this problem. If it’s due to faulty RAM, then you can try running your MacBook Pro’s Apple Hardware Test to see if it can detect any RAM problems. (It’s not able to detect all possible RAM problems, so no error detected by the AHT is not a guarantee of non-defective RAM.) -
having problem with my iphone camera,doesnt work when i click the camera app,but when i double click when my phone is locked it works.
The Basic Troubleshooting Steps are:
Restart.. Reset.. Restore...
Reset your phone:
Press the sleep/wake button & home button at the same time, keep pressing until you see the Apple logo, then release the buttons...
Restart / Reset
http://support.apple.com/kb/ht1430
Backing up, Updating and Restoring
http://support.apple.com/kb/HT1414 -
I am having problems with the month of October. When I have the full month view, the synced items from google calendars won't show. But they do for all the other months. There is definitely a glitch somewhere because if I am on day view and try to click on day 15 of October, it will not let me. It totally is acting weird.
Free fonts, fonts from a reliable foundry?
Have you tried removing them temporarily?
Do you still have problems if you create a new Windows user account and log in with that? How about if you start in Safe Mode?
And I would run a memory checker and see Troubleshoot font problems | Windows -
Hello plz i need yours help i have problem with my i cloud back up when i restore old back up t
hello >> plz i need yours help i have problem with my i cloud back up when i restore old back up my problem exact with contact cause it disappears from contact list
iPhone: Transferring information from your current iPhone to a new iPhone
-
i have problem with my iphone4s in the icloud ; when i wont too make a ID apple free dis messege apear: Accont Limit Reached This device is no longer eligible for creating a free icloud acoont.What i cant 2 doo???.
were i have too pay for additional storage?
Maybe you are looking for
-
How can I get the image data from Clipboard with LV
Anybody knows How can get the image data after pressd "print screen button" with LV? I want to program a software which can save a image as a bmp or jpeg etc, and the image data is from pressed print screen button. How to get it out from clipboard.
-
Upgrade my macbook pro over the weekend to Snow Leopard and then Lion. I lost all my the majority of my iCal events. Went to Apple store and they said that was rare and not sure how to restore my last back up from Time Machine on an external driv
-
Posting the account doc for the movement type 311
Hi Experts, Can you please brief me about the Accounting doc while using the 311 movement type. if there is involve the split valutation in internal purpose or external purpose. Regards
-
Is there a way to determine if a user is using a Blackberry, Nokia, etc. inside the code? Since different handheld devices use different display methods, it would be nice to hide items if the user is on a blackberry, but show it if using PC or Mobil
-
CEF Load Sharing Recursive Lookup
Hi, i have this scenario: | ----P1----P2---| PE1----| |----PE2 | ----P3----P4---| IP Loop PE1: 5.5.5.5 There are 2 Gigabitethernet betweenn the router PE and the router P. PE1 advertise 1.1.1.1/32 to PE2: PE2#sh ip route 1.1.1.1 Routing entry for 1.1