lxqt / xdg-desktop-portal-lxqt

A backend implementation for xdg-desktop-portal
GNU Lesser General Public License v2.1
22 stars 9 forks source link

Add systemd user service #47

Open gen2brain opened 2 days ago

gen2brain commented 2 days ago

I noticed that xdg-desktop-portal-wlr installs the user systemd service file, and it is running that instead of what is in Exec. This is much nicer for the user as I can check the status, restart the service, etc. I noticed https://github.com/lxqt/xdg-desktop-portal-lxqt/commit/d2ca009d174c0d905dd0b1a7040196dbdc5bdafa and thought it may be better to just add user service like this one:

[Unit]
Description=Portal service (LXQt implementation)
PartOf=graphical-session.target
After=graphical-session.target

[Service]
Type=dbus
BusName=org.freedesktop.impl.portal.desktop.lxqt
ExecStart=/usr/libexec/xdg-desktop-portal-lxqt
Environment="QT_QPA_PLATFORMTHEME=lxqt"
Restart=on-failure

And then change the DBus service to:

[D-BUS Service]
Name=org.freedesktop.impl.portal.desktop.lxqt
Exec=/usr/libexec/xdg-desktop-portal-lxqt
SystemdService=xdg-desktop-portal-lxqt.service

So the user has more control over the service. What do you think?

tsujan commented 1 day ago

@palinek?