xdg-desktop-portal: tell systemd the BusName of the service so that it won't consider it started until after said bus name is acquired

this partially fixes an error in sandboxed gtk apps where they would try to connect to org.freedesktop.portal to query settings, and then fall back to bad default fonts when the endpoint errored (because xdp-gtk wasn't ready)
This commit is contained in:
Colin 2024-03-13 05:27:43 +00:00
parent 4510352c07
commit eafabe87c4
3 changed files with 8 additions and 4 deletions

View File

@ -47,7 +47,8 @@ in
serviceConfig = {
ExecStart="${cfg.package}/libexec/xdg-desktop-portal-gtk";
Type = "simple";
Type = "dbus";
BusName = "org.freedesktop.impl.portal.desktop.gtk";
Restart = "always";
RestartSec = "10s";
};

View File

@ -32,7 +32,8 @@ in
serviceConfig = {
ExecStart="${cfg.package}/libexec/xdg-desktop-portal-wlr";
Type = "simple";
Type = "dbus";
BusName = "org.freedesktop.impl.portal.desktop.wlr";
Restart = "always";
RestartSec = "10s";
};

View File

@ -60,7 +60,8 @@ in
serviceConfig = {
ExecStart="${cfg.package}/libexec/xdg-desktop-portal";
Type = "simple";
Type = "dbus";
BusName = "org.freedesktop.portal.Desktop";
Restart = "always";
RestartSec = "10s";
};
@ -85,7 +86,8 @@ in
serviceConfig = {
ExecStart="${cfg.package}/libexec/xdg-permission-store";
Type = "simple";
Type = "dbus";
BusName = "org.freedesktop.impl.portal.PermissionStore";
Restart = "always";
RestartSec = "10s";
};