Of course, with both of these workarounds, the semantic changes from "start this process once the user logs in" to "start this process once the desktop environment starts", but the end results are identical for almost all users.
> the slackware guys came up with an elaborate solution that wraps the pipewire command with a daemonize tool that is supposed to cleanup after itself
You mean Slackware users on some random forum. Besides, the solution they came up with uses XDG autostart which has nothing to do with systemd. Not to mention that it's not even doing the exact same thing as the Gentoo solution and running two more commands in addition to pipewire. On top of that, Gentoo also seems to be using XDG autostart for Pipewire[1] so it's basically the same approach.
Believe it or not, that's actually the official slackware forum. And whatever solution those guys come up with, it will likely become the official solution.
> Besides, the solution they came up with uses XDG autostart which has nothing to do with systemd.
The slackware solution involves a project that nobody has heard of before, just so it can imitate the "user-level service" feature provided by systemd: https://github.com/raforg/daemon
> Not to mention that it's not even doing the exact same thing as the Gentoo solution and running two more commands in addition to pipewire.
The slackware solution requires starting those 3 processes (pipewire, pipewire-media-session, pipewire-pulse) separately from 3 different .desktop files, likely because the daemon tool above can't properly reap the pipewire-pulse process (not sure whose fault is this though).
On the other hand, the gentoo solution can start all 3 processes with just 1 .desktop files, because `pkill` takes care of it. Simple and effective.
I think the key difference, in this case, is that the slackware guys are trying their best to imitate a systemd feature, while the gentoo guys seem to focus more on finding the best way to allow users to enjoy pipewire.
> Believe it or not, that's actually the official slackware forum.
My bad. TIL.
> The slackware solution involves a project that nobody has heard of before, just so it can imitate the "user-level service" feature provided by systemd
Daemonizing processes has been a thing far before systemd even existed. Solutions similar to this "daemon" project are commonly employed in SysV init scripts. If anything, systemd made those things irrelevant by offering a more simple configuration to daemonize programs.
> The slackware solution requires starting those 3 processes
> On the other hand, the gentoo solution can start all 3 processes with just 1 .desktop files
It looks to me Gentoo doesn't start the other two processes. I don't see how "daemonize" or pkill is relevant here.
> slackware guys are trying their best to imitate a systemd feature, while the gentoo guys seem to focus more on finding the best way to allow users to enjoy pipewire.
With respect, this is a unsound take. The explanation is more simple and it's that Gentoo does not currently handle pipewire cleanup.
Recently, I started using pipewire, which is designed to rely on a user-level service to start and stop the pipewire process.
To bypass this requirement, the slackware guys came up with an elaborate solution that wraps the pipewire command with a daemonize tool that is supposed to cleanup after itself: https://www.linuxquestions.org/questions/slackware-14/using-...
Meanwhile, the gentoo guys just did the simplest thing possible: https://github.com/gentoo/gentoo/blob/f788f38/media-video/pi...
Of course, with both of these workarounds, the semantic changes from "start this process once the user logs in" to "start this process once the desktop environment starts", but the end results are identical for almost all users.