0

I'm new to Linux. I have been trying to install drivers for my XP Pen G640, because the tablet doesn't work correctly with my current system (Ubuntu 16.04.05).

Now, they have provided a Beta version of their Linux driver that is said to be supported by Ubuntu (Heres the link). I have tried to install it using this method, but the terminal always returns with this, Terminal Log

I have tried their instructions on how to install it from their site for Ubuntu 18.10 but that returns with "sudo: command not found".

Now, I am really confused. How can I get the driver working?

Here's the terminal output in text format - https://pastebin.com/p7pceZam

tasnim_tamim@tasnim-circles:~/Downloads$ cd Linux_Pentablet_V1.2.3/
tasnim_tamim@tasnim-circles:~/Downloads/Linux_Pentablet_V1.2.3$ sudo ./Pentablet_Driver.sh
[sudo] password for tasnim_tamim: 
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 1: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: �7: not found
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 1: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: ���-: not found
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 1: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: ��: not found
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 1: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: ELF: not found
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 2: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: Syntax error: ")" unexpected
tasnim_tamim@tasnim-circles:~/Downloads/Linux_Pentablet_V1.2.3$
6
  • Welcome to Ask Ubuntu. You've provided a picture of your terminal (a picture of text), which is difficult to read & impossible to cut/paste to look up info, and use in a response to you. You should copy the text from your terminal, and paste it into your question. Your picture looks like LXDE so are you using Lubuntu 16.04? (official flavors are supported here) There instructions told you to execute with elevated privileges (sudo) which you didn't appear to do, and provide full path - so did you check it wasn't required by script? (as you didn't provide it)
    – guiverc
    Dec 6, 2018 at 7:40
  • @guiverc Sorry for that.. here's the text of the output - pastebin.com/p7pceZam . I am using Ubuntu 16.04 with LXDE Desktop Enviroment. Unity was too heavy for my PC and it always froze, so I am using that instead Dec 6, 2018 at 7:53
  • It looks to me like it's not a shell script? If you file-type it (file ./Pentablet_Driver.sh) is it a bash script? The download link you provided was for a tarball, so did you expand it? Usually when you expand tarballs (a tarball is a compressed image like a zip - the .tar.gz means tarball compressed with gzip), there is a README type file with instructions that you follow (the name can vary being up to the packager or person who created it; some opt for instructions also on web sites).
    – guiverc
    Dec 6, 2018 at 8:11
  • @guiverc Here's the output of the command - ./Pentablet_Driver.sh: POSIX shell script, ASCII text executable. I have extracted the .tar.gz file using Gnome Archive Manager, but just to be safe I have also used Terminal method, but there was no README file or any other documentation. Just the .sh file, config.xml, a executable file and some lib files and platform folder. Here are all the file contents - i.imgur.com/8bpmXwW.png Dec 6, 2018 at 8:22
  • A suggestion for you to try. Edit the .sh script; change the "export LD_LIBRARY_PATH=$dirname/lib" to "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/$dirname/lib" - ie. the script only passes the (list.of.dirs) lib path to the program, the change will pass the existing value + the path they untidily calculated. The binary it calls at the end maybe opens a shell & generates the lines you see - I'd look in logs (dmesg, journalctl) just in blind.hope (I'm at a loss there)
    – guiverc
    Dec 6, 2018 at 11:57

4 Answers 4

2

This answer was originally posted by the author of this question, tasnim_tamim, as an edit to their question:

I FIXED THE ISSUE.

After 4 days of email exchange to the XP-Pen support team, I found out that it only support 64-bit PC's. I on the another hand had 32-bit and as a result it gave out this error.

Issue was fixed by installing a 64 bit Linux Distribution. Used Ubuntu 16.04 x64 in this case and it worked flawlessly with no issues.

TL;DR - Driver only supports 64-bit OS, 32-bit will not work.

2

Here's a little write up on how to get the PenTablet program / driver from XP-Pen to work in linux as autostart without root privileges. I tested this on Ubuntu 18.04 with XP-Pen G640 tablet.

Download the latest driver from XP-Pen's website, and unpack it in a folder on your system. I used /usr/share/xp-pen

If you start Pentablet.sh as normal user it will complain, that it needs root access. But really all it needs is access to /dev/uinput and the usb tablet device.

So create a new group, for example tablet and add your current user to that group, replace <user_name> with your user name.

sudo groupadd tablet
sudo adduser <user_name> tablet

Then create a new udev rule file in /etc/udev/rules.d, mine is called /etc/udev/rules.d/80-xp-pen.rules containing

SUBSYSTEM=="usb", ATTR{idVendor}=="28bd", ATTR{idProduct}=="0094", GROUP="tablet", MODE="0660"
KERNEL=="uinput", MODE="0660", GROUP="tablet", OPTIONS+="static_node=uinput"

The first line will grant read and write access to the usb tablet device to group tablet. You may need to adjust idVendor and or idProduct if you are using a different tablet than me. Just plug you tablet into USB and look through the output of dmesg for example to find your id's. Or use lsusb as suggested by edap in the comments. The second line will grant access to /dev/uinput

Now reload your udev rules with

sudo udevadm control --reload-rules
sudo udevadm trigger

Double check that your user is in the tablet group by issuing this command

groups

you should see the tablet group in this list. Otherwise log out or restart.

By now you should be able to start the Pentablet.sh without sudo. You can now add it to the autostart by opening

gnome-session-properties

Click add, give it a name like "XP Pentablet" and as command /usr/share/xp-pen/Pentablet_Driver.sh or where ever you unpacked the driver files.

Congratulations, you should be done! And despite this long explanation it's actually pretty fast to achieve.

One side note: Your /dev/uinput file is now accessible by any process running as your user account. That could make it easy for keyloggers or other malicious software to steal your passwords or else. If you want to make this more secure, you can do the following:

Remove your user from the tablet group again (google if you don't know how). Add the following line to your /etc/sudoers (use visudo, to avoid locking yourself out of the system)

<user_name> ALL=(<user_name>:tablet) NOPASSWD: /usr/share/xp-pen/Pentablet_Driver.sh

This will allow your user to execute the following command without password, which executes the Pentablet.sh script with the group tablet:

sudo -g tablet /usr/share/xp-pen/Pentablet_Driver.sh

Now you can put that exact command in gnome-session-properties and you are done again. This time with a more secure version!

3
  • Thanks, this is a great explanation. Just a note, I had to use sudo visudo to edit /etc/sudoers.
    – ej159
    Jul 18, 2020 at 9:52
  • normally you don't have to, but it's certainly a good idea to do so, to avoid locking yourself out. I added it as a remark in my answer. Thank you very much!
    – wschopohl
    Jul 18, 2020 at 10:08
  • 1
    Probably, to get the idVendor and IdProduct lsusb is easier to read. for example, i have as output of lsusb Bus 001 Device 008: ID 28bd:091d UGEE 21.5 inch PenDisplay, then 28bd is the vendor and 091d is the product id
    – edap
    Oct 28, 2020 at 10:58
1

Adding this because driver support is under active development: I just bought an XP-Pen Artist Pro 15.6. Linux beta driver works for me on opensuse, better than advertised even: Supports everything but tilt sensitivity. In other words, the buttons and dial all work. However, in its present incarnation, it runs as a script that requires root: Just unzip in its permanent location (I used /opt), change into the subdirectory it creates and make Pentablet_Driver.sh executable, then link to the script from your autostart settings (or use crontab if you don't want to be pestered for root password). Tip: If you use KDE, you can create a window rule to "skip taskbar", so when you minimize it, the window disappears (but to get it back, use the Alt+Tab task switcher).

EDIT: Thanks to korvox and of course spbnick, there's a digimend fork with full suport for the xp-pen artist pro 15.6! However, you have to use commandline (xsetwacom) instead of a gui to map the buttons. The setup is a bit tricky, but I wrote a step-by-step guide here: https://forums.opensuse.org/showthread.php/537880-XP-Pen-Drawing-Tablet?p=2918114#post2918114

0

(Linux Mint - V19 / Hardware Acer Laptop, Travelmate / Pen-Tablet Display - xp-pen Artist 12)

I use the driver in V1.3.4....etc (Original package of xp-pen HP)

The Pen-Tablet Display works, but I need the driver that the pen fits with the screensize and Mouse.

Use the Terminal - /folder there the package is located

I use: chmod +x Linux_Pentablet_Driver_V1.3.4.sh after that: sudo ./Linux_Pentablet_Driver......sh

Now you get a window from the driver to set-up it.

But, there is a problem: I have to activate the driver always new

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .