[LAU] Using udev to launch JACK as specific user?

From: Mario Lang <mlang@email-addr-hidden>
Date: Sat Jan 11 2020 - 20:55:43 EET

Hi.

After 2 hours of "edit, reboot, fail" I am giving up and ask here.
I feel like what I want should be relatively simple, but it isn't.

I'd like to launch JACK via Systemd whenever a certain
card is present. I have a udev rule in /etc/udev/rules.d/10-8A.rules
that looks like this:

ACTION=="add", SUBSYSTEMS=="sound", ATTRS{id}=="D8A", TAG+="systemd",
SYMLINK+="MOTU-8A"

This works, I get a /dev/MOTU-8A symlink. The idea was to declare

[Install]
WantedBy=dev-MOTU-8A.device

in my systemd user service for JACK. However, contrary to
what the web seems to document, the symlinked device does not
show up in systemctl. So apparently, I can't depend on it either.

I am guessing anyone here must have a similar setup.
In its purest form, I am looking for a way to launch
a systemd user service once a certain ALSA hw device is available.

I see references to ENV{SYSTEMD_USER_WANTS}="jack.service", however,
I totally fail how this should work. Udev has no idea which user
should launch this service.

Any hints to untangle this sort of messy situation?

-- 
CYa,
  ⡍⠁⠗⠊⠕
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sat Jan 11 22:24:54 2020

This archive was generated by hypermail 2.1.8 : Sat Jan 11 2020 - 22:24:56 EET