Re: require a system service unit to start a user service as a dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mi, 23.12.20 21:47, John (graysky@xxxxxxxxxxxx) wrote:

> I need to have the following start
> /usr/lib/systemd/user/pulseaudio.service so it can make use of
> pulseaudio.  Using a After= or Wants= does not work.  What is the
> correct way to have a system service like this run a user service
> unit?
>
> % cat /usr/lib/systemd/system/kodi.service
> [Unit]
> Description=Kodi standalone (GBM)
> After=remote-fs.target network-online.target nss-lookup.target
> sound.target bluetooth.target polkit.service upower.service
> mysqld.service
> Wants=network-online.target polkit.service upower.service
> Conflicts=getty@tty1.service
>
> [Service]
> User=kodi
> Group=kodi
> EnvironmentFile=-/etc/conf.d/kodi-standalone
> TTYPath=/dev/tty1
> Environment=WINDOWING=gbm
> ExecStart=/usr/bin/kodi-standalone
> ExecStop=/usr/bin/killall --user kodi --exact --wait kodi-gbm
> Restart=on-abort
> StandardInput=tty
> StandardOutput=journal
>
> [Install]
> Alias=display-manager.service

This is not a supported setup. System services should not be clients
to per-user services. The opposite is OK, but you are reversing your
stack here...

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux