You are not logged in.
I have made some scripts to configure a Wacom Intuos graphics tablet, with a polkit rule so that the relevant configuration happens when it is hot-plugged. All well and good, but I need some guidance for when the device is already plugged in when the machine boots.
The crucial bit is that when the device is hot-plugged a file is automatically created which has the tablet's LED status:
/sys/bus/usb/devices/*/*/wacom_led/status_led0_select
This is owned by root, but needs to be writeable by the user, so the polkit rule allows it to be chowned by the user, without needing `sudo`.
cat /etc/udev/rules.d/90-wacom.rules
ACTION=="add|change", SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", ATTR{idProduct}=="0315", RUN="/usr/local/bin/wacom-setup.sh"
ACTION=="add|change", SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", ATTR{idProduct}=="0084", RUN="/usr/local/bin/wacom-setup.sh"
cat /etc/polkit-1/localauthority/50-local.d/10-wacomled.pkla
[Local Users]
Identity=unix-group:*
Action=org.freedesktop.policykit.exec
ResultAny=no
ResultInactive=no
ResultActive=yes
If the tablet is already connected then `ACTION=="add|change"` doesn't apply, so the LED status file isn't writeable by the user. There must be a way of enabling this universally, without needing to run the script at login?
Should I be investigating systemd services, or udisks, or.....?
Last edited by damo (2016-01-17 19:34:19)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I think you're supposed to use /etc/X11/xorg.conf.d to configure it but you probably already know this.
https://wiki.archlinux.org/index.php/Wa … figuration
The ArchWiki has this tip for Wacom LEDs:
https://wiki.archlinux.org/index.php/Wacom#LEDs
AFAIUI, the "add" ACTION also applies when udev runs at boot but I may be mistaken.
Offline
^ Thanks
I was hoping to do it more elegantly than using an xorg.conf, having seriously messed up there before with graphics configs! 8o
With what I have so far, the "add" action works when hot-plugging, but not when booting when the device is already connected.
I'll have another look at the Arch LED tip. I glanced at it before, but it is a lot different from other approaches I've found.
EDIT: the Arch LED rule works great. I can confirm that the "add" ACTION only works when hot-plugging
Last edited by damo (2016-01-17 13:16:22)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
I've found the problem buried in the depths of `man wacom`. Options for pad buttons in a `/etc/X11/xorg.conf.d/XX-wacom.conf` can only take integer values, so setting keybinds with `xsetwacom` can only be done in at runtime.
A script has to be run anyway, after login or a hotplug event.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline