Il 06/01/2024 16:19, Max Nikulin ha scritto:
On 06/01/2024 19:44, Valerio Vanni wrote:
systemd-run --unit=kaffeine-resumed --uid="$kafuid" --gid="$kafgid" \
       env XDG_RUNTIME_DIR=/run/user/"$kafuid" $kafdis XDG_CURRENT_DESKTOP=KDE \
       /usr/bin/kaffeine --lastchannel > /dev/null 2>&1

I have not figured out how to do it, but systemd-run should not use --uid since this way it makes the application a part of system.slice. Instead the application should be in app.slice that is a child of user@1000.service. Inspect output of systemd-cgls.

I confirm, it's under system.slice.

So systemd-run should talk to the systemd --user instance. I have tried to set

XDG_RUNTIME_DIR="/run/user/1000" BUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"

in setpriv ... env, but systemd requires authentication.

I don't see authentication requests, but it still stays under system.slice.

Reply via email to