



















This is the driver for the new current models of XP-PEN graphics tablets, if you have a legacy model, use this package
Note: prior releases shipped vendor file permissions (0666/0777) unchanged. 4.0.15 tightens these (libraries read-only, config files group-writable via users). This is experimental — please report if saving settings or running the driver breaks.
Add in ~/.local/share/applications/xppentablet.desktop and using /usr/lib/pentablet/PenTablet makes the gui work in wayland
[Desktop Entry]
Name=xppentablet
Comment=XPPen driver
Exec=/usr/lib/pentablet/PenTablet
Icon=/usr/share/icons/hicolor/256x256/apps/xppentablet.png
Terminal=false
Type=Application
X-Ubuntu-Touch=true
Categories=Application;Utility;
StartupNotify=true
Name[en_US]=xppentablet
Name[en]=xppentablet
Name[en_US.UTF-8]=xppentablet
Comment[en]=XPPen driver
Comment[en_US]=XPPen driver
Comment[en_US.UTF-8]=XPPen driver
PrefersNonDefaultGPU=false
Hidden=false
NoDisplay=false
and override ~/.config/systemd/user/xppentablet.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/lib/pentablet/PenTablet /mini
Hi @matei so I am just trying to make it work on wayland. Then I discovered that
/usr/lib/pentablet/PenTablet.sh forces the gui to use its bundled LD_LIBRARY_PATH
So I just run the raw binary/usr/lib/pentablet/PenTablet and it runs in wayland!
For maintainers,I know the /usr/lib/pentablet/PenTablet.sh was shipped from xppen but is it posible to add a patch to run it in wayland? Same approach would be this https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=xp-pen-tablet-systemlibs. (maybe adopt xp-pen-tablet-systemlibs )
tldr, running it with system libs, makes it work in wayland.
I couldn't originally launch the app. I am using Hyprland, with the QT_QPA_PLATFORM set to "wayland;xcb". This worked until now for all apps, but for this driver I had to launch it with "QT_QPA_PLATFORM=xcb /usr/lib/pentablet/PenTablet.sh". Otherwise, I get the error message: This application failed to start because it could not find or load the Qt platform plugin "wayland;xcb" in "".
Available platform plugins are: xcb.
New PKGBUILD:
pkgname=xp-pen-tablet
pkgver=4.0.13
pkgrel=251226
epoch=0
pkgdesc="XP-Pen (Official) Linux utility (New UI driver)"
arch=('x86_64')
url='https://www.xp-pen.com/download/index.html'
license=('custom')
source=("XPPenLinux${pkgver}-${pkgrel}.deb::https://download01.xp-pen.com/file/2026/01/XPPenLinux${pkgver}-${pkgrel}.deb")
install=${pkgname}.install
# options=('!strip')
sha512sums=('03bd071184f327adce3618b703b1e65338c2c83b5d8242e81c2f0184f6eafa1f1740441b9b88cd7f728f4f83e980ab0f1b28ff28274757fa61a601a028854205')
prepare() {
ar x "${srcdir}/XPPenLinux${pkgver}-${pkgrel}.deb"
tar -xf data.tar.xz -C "${srcdir}"
}
package() {
cp -dr --preserve=mode,links usr "${pkgdir}/"
chmod 755 "${pkgdir}/usr/lib/pentablet"
chmod 755 "${pkgdir}/usr/lib/pentablet/lib"
chmod 755 "${pkgdir}/usr/lib/pentablet/platforms"
chmod 755 "${pkgdir}/usr/lib/pentablet/conf/xppen"
find "${pkgdir}/usr/lib/pentablet/lib" "${pkgdir}/usr/lib/pentablet/platforms" \
-type f -exec chmod 644 {} \;
chmod 755 "${pkgdir}/usr/lib/pentablet/PenTablet"
chmod 755 "${pkgdir}/usr/lib/pentablet/PenTablet.sh"
chmod 644 "${pkgdir}/usr/lib/pentablet/conf/xppen"/*.xml
chmod 644 "${pkgdir}/usr/lib/pentablet/conf/xppen"/*.ini
chmod 755 ${pkgdir}/usr/share/applications/xppentablet.desktop
chmod 644 ${pkgdir}/usr/share/icons/hicolor/256x256/apps/xppentablet.png
install -Dm0644 "${pkgdir}/usr/lib/pentablet/doc/EULA" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
#https://wiki.archlinux.org/title/Users_and_groups#Pre-systemd_groups
#use udev uaccess for device permission
install -Dm0644 /dev/null "${pkgdir}/usr/lib/udev/rules.d/10-xp-pen.rules"
cat <<'EOF' > "${pkgdir}/usr/lib/udev/rules.d/10-xp-pen.rules"
KERNEL=="uinput",SUBSYSTEMS=="misc",MODE="0660",TAG+="uaccess",OPTIONS+="static_node=uinput"
SUBSYSTEMS=="usb",ATTRS{idVendor}=="28bd",MODE="0660",TAG+="uaccess"
EOF
# === systemd user service ===
install -Dm0644 /dev/null "${pkgdir}/usr/lib/systemd/user/xppentablet.service"
cat <<'EOF' > "${pkgdir}/usr/lib/systemd/user/xppentablet.service"
[Unit]
Description=XPPen Driver
Requires=xdg-desktop-autostart.target
After=xdg-desktop-autostart.target
[Service]
ExecStart=/usr/lib/pentablet/PenTablet.sh /mini
[Install]
WantedBy=xdg-desktop-autostart.target
EOF
if command -v setfacl &>/dev/null; then
find "${pkgdir}" -exec setfacl -b {} +; 2>/dev/null || true
fi
}
New xp-pen-tablet.install:
#! /bin/bash
get_valid_users() {
_l="/etc/login.defs"
_p="/etc/passwd"
## get min and max UID limit ##
l=$(grep "^UID_MIN" "$_l")
l1=$(grep "^UID_MAX" "$_l")
## use awk to print if UID >= $MIN and UID <= $MAX and shell is not /sbin/nologin ##
awk -F':' -v "min=${l##UID_MIN}" -v "max=${l1##UID_MAX}" '{
if ($3 >= min && $3 <= max && $7 != "/sbin/nologin") print $0
}' "$_p" | cut -d: -f1
}
disable_user_service() {
users=$(get_valid_users)
for i in $users; do
echo "Disabling xppentablet.service for user '$i'"
sudo systemctl --machine "$i"@ disable --now --user xppentablet.service
done
}
pre_install() {
AppName=PenTablet
pid=$(ps -e | grep $AppName)
appScript=$AppName".sh"
if [ -n "$pid" ]; then
echo $pid
arr=()
while read -r line; do
arr+=("$line")
done <<<"$pid"
for val in "${arr[@]}"; do
appid=$(echo $val | awk '{print $1}')
name=$(echo $val | awk '{print $4}')
echo "ID:"$appid
echo "Name:"$name
if [ "$name" = "$appRunScript" ]; then
echo "close $appRunScript"
kill -15 $appid
elif [ "$name" = "$AppName" ]; then
echo "close $AppName"
kill -15 $appid
fi
done
fi
}
post_install() {
RuleDir="/usr/lib/udev/rules.d"
ruleName="10-xp-pen.rules"
# Checking and applying the udev rule
if [ -f "$RuleDir/$ruleName" ]; then
udevadm control --reload-rules && udevadm trigger
fi
#Removing autostart scripts as the systemd service is now used.
if [ -f "/etc/xdg/autostart/pentablet.desktop" ] || [ -f "/etc/xdg/autostart/xppentablet.desktop" ]; then
rm -f /etc/xdg/autostart/ugee-pentablet.desktop
rm -f /etc/xdg/autostart/pentablet.desktop
rm -f /etc/xdg/autostart/xppentablet.desktop
fi
#Reload daemon
systemctl daemon-reload
cat <<EOF
********************"
installation successful!
to restart the xp-pen driver, please run:
systemctl --user restart xppentablet.service
if you want the driver to autostart, please run:
systemctl --user enable xppentablet.service
********************"
EOF
}
pre_upgrade() {
pre_install
}
post_upgrade() {
post_install
}
pre_remove() {
pre_install
lockfile="/tmp/qtsingleapp-Pentab-9c9b-lockfile"
rm $lockfile
#Remove service
disable_user_service
}
post_remove() {
echo "Uninstall succeeded."
}
piou, In addition, the installation script xp-pen-tablet.install sets maximum rights, creating a huge security hole!
post_install() {
appDir=/usr/lib/pentablet
confPath=$appDir/conf/xppen
libPath=$appDir/lib
platPath=$appDir/platforms
RuleDir="/usr/lib/udev/rules.d"
ruleName="10-xp-pen.rules"
chmod +0755 /usr/share/applications/xppentablet.desktop
chmod +0644 /usr/share/icons/hicolor/256x256/apps/xppentablet.png
chmod +0755 $appDir/PenTablet
chmod +0755 $appDir/PenTablet.sh
#chmod +0666 $appDir/resource.rcc #not exist in this version
# chmod +0777 $confPath #Move to package()
# chmod +0777 $libPath
# chmod +0777 $platPath
chmod +0666 $confPath/config.xml
chmod +0666 $confPath/language.ini
chmod +0666 $confPath/name_config.ini
chmod +0666 $libPath/libicudata.so.56
chmod +0666 $libPath/libicui18n.so.56
chmod +0666 $libPath/libicuuc.so.56
chmod +0666 $libPath/libQt5Core.so.5
chmod +0666 $libPath/libQt5DBus.so.5
chmod +0666 $libPath/libQt5Gui.so.5
chmod +0666 $libPath/libQt5Network.so.5
chmod +0666 $libPath/libQt5Widgets.so.5
chmod +0666 $libPath/libQt5X11Extras.so.5
chmod +0666 $libPath/libQt5XcbQpa.so.5
chmod +0666 $libPath/libQt5Xml.so.5
chmod +0666 $platPath/libqxcb.so
lockfile="/tmp/qtsingleapp-Pentab-9c9b-lockfile"
touch $lockfile
chmod +0666 $lockfile
# Checking and applying the udev rule
if [ -f "$RuleDir/$ruleName" ]; then
udevadm control --reload-rules && udevadm trigger
fi
#Removing autostart scripts as the systemd service is now used.
if [ -f "/etc/xdg/autostart/pentablet.desktop" ] || [ -f "/etc/xdg/autostart/xppentablet.desktop" ]; then
rm -f /etc/xdg/autostart/ugee-pentablet.desktop
rm -f /etc/xdg/autostart/pentablet.desktop
rm -f /etc/xdg/autostart/xppentablet.desktop
fi
#Reload daemon
systemctl daemon-reload
cat <<EOF
Hi, at the moment, by default, many .so files are installed with rights 777 (everything in /usr/lib/pentablet/lib and /usr/lib/pentablet/platforms).
Can you make it so the rights are dropped to something more reasonnable like 755 at install? At the moment this presents a security risk: as an unprivileged user I could replace the content of those libraries with my own code and wait for another user (hopefully more privileged) to start the driver and unknowingly execute my code with their rights. That's a privilege escalation, and it's easy to fix: chmod -R 755 /usr/lib/pentablet/{lib,platforms}
4.0.13 just got released.
new version released today, 4.0.9, available here
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Note: prior releases shipped vendor file permissions (0666/0777) unchanged. 4.0.15 tightens these (libraries read-only, config files group-writable via
users). This is experimental — please report if saving settings or running the driver breaks.