Created
May 7, 2020 13:21
-
-
Save itarozzi/ada2b37c99099f77dcb2733d45109a58 to your computer and use it in GitHub Desktop.
udev rules for xp-pen tablet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tested on Manjaro Linux | |
========================== | |
$ cat /etc/udev/rules.d/98-xppen.rules | |
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="28bd/904/0", RUN+="/bin/su root -c '/opt/Linux_Pentablet/Pentablet_Driver.sh'" | |
$ cat /opt/Linux_Pentablet/Pentablet_Driver.sh | |
#!/bin/sh | |
HOME=/home/ivan | |
appname=`basename $0 | sed s,\.sh$,,` | |
dirname=`dirname $0` | |
tmp="${dirname#?}" | |
if [ "${dirname%$tmp}" != "/" ]; then | |
dirname=$PWD/$dirname | |
fi | |
LD_LIBRARY_PATH=$dirname/lib | |
export LD_LIBRARY_PATH | |
DISPLAY=:0 $dirname/$appname "$@" | |
--------------------------------------------------- | |
Notes: in the Pentablet_Driver.sh script you need to add HOME and DISPLAY vars. | |
To reload udev rules without reboot use: sudo udevadm control --reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment