From 93e090469c3c95907a61f97cb5a6b127ea88ab69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 26 Aug 2015 02:03:00 +0200 Subject: [PATCH] qubes-desktop-run: start the Dbus service (if needed) Much tidier way to solve the issue, provided by @Unman. qubesos/qubes-issues#1031 --- misc/qubes-desktop-run | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/qubes-desktop-run b/misc/qubes-desktop-run index 14e3f8b..6580060 100755 --- a/misc/qubes-desktop-run +++ b/misc/qubes-desktop-run @@ -2,9 +2,17 @@ from gi.repository import Gio import sys +import dbus def main(myname, desktop, *files): launcher = Gio.DesktopAppInfo.new_from_filename(desktop) + activatable = launcher.get_boolean('DBusActivatable') + if activatable: + bus = dbus.SessionBus() + service_id = launcher.get_id() + # cut the .desktop suffix + service_id = service_id[:-8] + bus.start_service_by_name(service_id) launcher.launch(files, None) if __name__ == "__main__":