Skip to content

Commit

Permalink
Restart xdg portal on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed Jun 9, 2023
1 parent 9b49c0b commit 14d8ebe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions startdesk/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ int main(int argc, char* argv[]) {
QStringLiteral("PATH=%1").arg(qEnvironmentVariable("PATH"))})});
QDBusConnection::sessionBus().asyncCall(setEnvironmentMessage);

// Restart the portal so it picks up our new environment variables
QDBusMessage restartPortalMessage = QDBusMessage::createMethodCall("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "RestartUnit");
restartPortalMessage.setArguments({QStringLiteral("xdg-desktop-portal.service"), QStringLiteral("replace")});
QDBusConnection::sessionBus().asyncCall(restartPortalMessage);

SplashController::instance()->startDE();

return a.exec();
Expand Down

0 comments on commit 14d8ebe

Please sign in to comment.