Permanent Wacom configuration systemd udev service not running at start

Thanks @TriMoon .
Here is the output of systemctl --user list-dependencies wacom

● ├─app.slice
● └─
●   ├─
●   ├─
●   │ ├─dbus.socket
●   │ ├─dirmngr.socket
●   │ ├─gcr-ssh-agent.socket
●   │ ├─gnome-keyring-daemon.socket
●   │ ├─gpg-agent-browser.socket
●   │ ├─gpg-agent-extra.socket
●   │ ├─gpg-agent-ssh.socket
●   │ ├─gpg-agent.socket
●   │ ├─p11-kit-server.socket
●   │ ├─pipewire.socket
●   │ └─pulseaudio.socket
●   └─

I just restarted my computer and the did not run… I still have to manually start the service. And when I try to enable the service I still get the same message as per my 1st post

Here are my files :
the service :
the udev :

Try commenting out the lines.


@GregDurr , those After= and PartOf= lines need to be removed or commented out because they are not mentioned in your output of list-dependencies

Anytime you make changes to a user unit’s config file, you need to let systemd know about it like you would for system units by performing:

systemctl --user daemon-reload

Only after that you can try to start it again with the changes made…
If you had done that, you could not have gotten the same error message as in first post…

Uhmmm wait maybe you could have… due to :thinking:

Next time post code as code bewteen code-blocks instead of images, so ppl can quote the part if needed or copy to try self…

I would also suggest you to place your script at /home/greg/bin/ and use that path instead, because it is a program and not a config file :wink:


General disclaimer:

I never used user-services myself as i haven’t had any need for them…

Thanks @TriMoon and @dmt for your reply and advice.
It still does not run the script when I start my computer/session

systemctl --user enable wacom.service


Failed to enable unit: Unit file /home/greg/.config/systemd/user/ does not exist.

Wow… was not expecting it to be that difficult to run a simple script on logon !

my files :


for i in $(seq 10); do
    if xsetwacom list devices | grep -q Wacom; then
    sleep 10

list=$(xsetwacom list devices)
pad=$(echo "${list}" | awk '/pad/{print $7}')
stylus=$(echo "${list}" | xsetwacom list devices | awk '/stylus/{print $7}')

if [ -z "${pad}" ]; then
    exit 0

# configure the buttons on ${stylus} with your xsetwacom commands...
#xsetwacom set "${stylus}" Button 2 11
xsetwacom set "${stylus}" Area 200 300 86400 65300
xsetwacom set "${stylus}" MapToOutput HEAD-0

wacom.service :

Description=Configure my Wacom tablet



Is there a simpler way to run a script at logon ??

Try creating ~/.config/systemd or ~/.config/systemd/user.

When i do: (as normal user, NOT root)

mkdir -p ~/.config/systemd/user ~/bin

Then place these files at:

  • ~/.config/systemd/user/wacom.service:

    Description=Configure my Wacom tablet
    Documentation=man:systemd.special(7)"#Units managed by the user service manage"
  • I just created a different content to test, but you can use your script’s contents…

    #!/usr/bin/env bash
    printf "%s\n" \
    	"Hello from wacom config." \

Then i perform:

chmod a+x ~/bin/
systemctl --user daemon-reload
systemctl --user enable --now wacom

I get:

Created symlink /home/myusername/.config/systemd/user/ → /home/myusername/.config/systemd/user/wacom.service.
  • systemctl --user status wacom
○ wacom.service - Configure my Wacom tablet
     Loaded: loaded (/home/myusername/.config/systemd/user/wacom.service; enabled; preset: enabled)
     Active: inactive (dead) since Sat 2023-01-14 12:04:27 +03; 1min 42s ago
             man:systemd.special(7)#Units managed by the user service manage
    Process: 3927 ExecStart=/home/myusername/bin/ (code=exited, status=0/SUCCESS)
   Main PID: 3927 (code=exited, status=0/SUCCESS)
        CPU: 2ms

Jan 14 12:04:27 kubuntu systemd[1358]: Starting Configure my Wacom tablet...
Jan 14 12:04:27 kubuntu[3927]: Hello from wacom config.
Jan 14 12:04:27 kubuntu[3927]: DISPLAY=:0
Jan 14 12:04:27 kubuntu[3927]: XAUTHORITY=/home/myusername/.Xauthority
Jan 14 12:04:27 kubuntu systemd[1358]: Finished Configure my Wacom tablet.

Logging out and back into the GUI and checking the status again shows it was started again, which you can check by the timestamp.

PS: I didn’t use any udev config like you posted, because i don’t actually have a wacom device…

But it should be doable to add a dependency on the device path, that gets created when you insert the device, to automatically start the service without an udev config…
(Hint: under the Install section)

Thanks a lot for your time helping me out here @TriMoon

I followed your recommendations and, as usual, when I do

systemctl --user enable --now wacom

I get

Failed to enable unit: Unit file /home/greg/.config/systemd/user/ does not exist.

I still have to manually start the service for the script to be run…
It seems the symLink is not being created.

I think I just found another way …
I start “Session and startup” → Application Autostart and I add the to the list to start on login. I just tried and it works.
What do you think ? Is that a valid answer to what I asked since I mentionned “udev” and “service” ?

If you are still getting that error you have/did something wrong, or skipped some steps i provided…
Can you provide the output of:

ls -la ~/.config/systemd/user ~/bin

Because i tested on my system and provided proof of it’s proper functionality to enable…

Hmm I think I followed your instructions carefullly but here is the output of

ls -la ~/.config/systemd/user ~/bin
total 12
drwxr-xr-x  2 greg greg 4096 15 janv. 00:22 .
drwx------ 30 greg greg 4096 15 janv. 17:46 ..
-rwxr-xr-x  1 greg greg  536 15 janv. 00:22

total 12
drwxr-xr-x 2 root root 4096 14 janv. 23:47 .
drwxr-xr-x 3 root root 4096 11 janv. 14:23 ..
-rw-r--r-- 1 root root  448 14 janv. 23:47 wacom.service

Ok sorry I just saw that root was the owner of systemd …
I changed it to me (the user) and it did create the symlink

The script still doesn’t run at logon though…

To properly fix that you should do:

sudo chown --changes --recursive $(id -u):$(id -g) ~/.config

Which should fix possible other dirs/files under it also…
(It will output the ones it changes)

  • Maybe followed by this, but i doubt this is really needed:
    sudo chmod --changes --recursive g+rX ~/.config

Isn’t XFCE using systemd and XDG specs? :thinking:
Maybe it will fix itself after the above command(s)…

  • man systemd.special
    The XDG specification defines a way to autostart applications using XDG desktop files. systemd ships systemd-xdg-autostart-generator(8) for the XDG desktop files in autostart
    directories. Desktop Environments can opt-in to use this service by adding a Wants= dependency on

No idea how to check if XFCE has indeed “opt-in” into this feature or not, as i don’t use XFCE…
But maybe this could shed a light: :thinking:

systemctl list-dependencies --user --reverse --all graphical-session{,-pre}.target

Which should mention both the and your service, when things works like on my system with KDE…

This means your home dir can only be accessed by your user account and nothing else…
systemd needs to be able to walk into your home dir before it can find, to read and react to, the config for it self…
That should also be fixed i think… (but I’m not sure)
(Check my previous reply first to make sure everything is in order that way, before trying to fix this…)

But if that is a concern you could, especially with this service which any user on your system might benefit from, place the service and script in the global space instead.

  • /etc/systemd/user
    For the service itself.
  • /usr/local/bin
    For the script…
    Ofcourse with accompaning changes in the ExecStart line in the service :wink:

I did that, restarted and the script did not run.

I enter :

systemctl list-dependencies --user --reverse --all graphical-session{,-pre}.target

That gives me :
○ └─wacom.service
●   ├─sys-devices-pci0000:00-0000:00:1d.2-usb8-8\x2d2-8\x2d2:1.0.device
●   └─sys-devices-pci0000:00-0000:00:1d.2-usb8-8\x2d2.device


ls -la ~/.config/systemd/user ~/bin

gives :

total 12
drwxr-xr-x  2 greg greg 4096 15 janv. 00:22 .
drwx------ 30 greg greg 4096 16 janv. 13:02 ..
-rwxr-xr-x  1 greg greg  536 15 janv. 00:22

total 16
drwxr-xr-x 3 greg greg 4096 15 janv. 21:45 .
drwxr-xr-x 3 greg greg 4096 11 janv. 14:23 ..
-rw-r--r-- 1 greg greg  448 14 janv. 23:47 wacom.service
drwxr-xr-x 2 greg greg 4096 15 janv. 21:45

At least now the file/dir permissions are correct. :+1:
I’ve been searching on the internet for quite some time since yesterday, but i didn’t find any info on how to “opt-in” as mentioned for XFCE…
(I don’t know either as i dont use XFCE, else i might find a way myself)

There are plenty of pages using autostart via XDG specs, that use “*.desktop” files, but not for using systemd-user-services. :woman_shrugging:

Well seems on your setup is not mentioned :woman_shrugging:
For comparison with mine using KDE and my-user-test.service instead of your wacom.service:
○ ├─my-user-test.service
● │ └─
● │   └─
● │     └─
● └─
●   └─
● └─
○   ├─plasma-ksplash-ready.service
●   │ ├─
○   │ │ ├─my-user-test.service
●   │ │ │ └─
●   │ │ │   └─
●   │ │ │     └─
●   │ │ └─
●   │ │   └─
●   │ └─
●   │   └─
●   └─
●     └─

But in your case is still mentioned so mybe try to disable your service first, then change the service to have:


Then do a daemon-reload followed by an enable again, and try if it does work this time…
There is nothing more i could help with, because theres only so much i can do while using a totally different system as yours (KDE vs XFCE and Kubuntu vs Manjaro) :woman_shrugging:

It looks to me like XFCE is lacking proper integration with systemd…

Oh by the way now that all file/dir permissions are correct you might also try what i said at start of thread :rofl:

perhaps start over - it seems this is now a mess …
I had no problem following the wiki - but I detail here where and why I amended it.

first create the udev rule:

sudo nano /etc/udev/rules.d/99-wacom.rules

put the contents in

(you need sudo for this because you want this file to be in /etc/…
this is the only command that needs sudo/root rights - all of the rest should not be run as root!)

create the directory because it initially does not exist

mkdir -p ~/.config/systemd/user

then you can save the wacom.service unit file to it:

nano ~/.config/systemd/user/wacom.service

put the contents in and save
(I did not amend the
I just copy pasted and left it as it was - this you should fix)

once again create a directory which does not exist by default (perhaps you already have it though)

mkdir -p ~/.local/bin

Because this directory is in your default $PATH
echo $PATH
will show you

create the in that location:

nano ~/.local/bin/

put the content in and save

then, make that script executable:

chmod +x ~/.local/bin/

Now you can enable the service:

systemctl --user enable wacom.service

I did all that in exactly that way and got no error.


Thank you very much for your help, really appreciate it, but the script still doesn’t run at logon.
@Nachlese I started again from scratch and followed all of your steps scrupulously. I got no error indeed but the script just doesn’t run when I start my session.

Again, a simple solution that I found is to add the script in the “Session and Startup” → Application autostart list. Could you explain how that solution might not be correct, aside from not matching the title of the topic ?

If it works, if it does what it is supposed to do - I’ll not explain why it is not correct, no. :slightly_smiling_face:
It may not be “lege artis”, but it is not incorrect.

I understand, makes sense.
Well, thanks a lot for your help @TriMoon and @Nachlese .
I’ll create another topic without systemd and udev in its title with a solution for the sake of helping the community.
For who landed on this topic to configure a wacom device on XFCE :

Hope that helps others