From d5efcc5a2617c6692c1f77d8308f9fa3d27baa44 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 7 Mar 2016 14:45:01 -0500 Subject: [PATCH] daemon: Honor RPMOSTREE_USE_SESSION_BUS for startup too While I was debugging the tests, I wanted to run the daemon interactively under gdb but still on the session. In our previous logic this was only possible if we were exec'd by dbus-daemon which made attaching gdb annoying. Let's honor the environment variable consistently on client and server. --- src/daemon/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/daemon/main.c b/src/daemon/main.c index ae0b3e87..a720d0b6 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -361,6 +361,8 @@ main (int argc, * the system bus. */ if (g_getenv ("DBUS_STARTER_BUS_TYPE") != NULL) bus_type = G_BUS_TYPE_STARTER; + else if (g_getenv ("RPMOSTREE_USE_SESSION_BUS") != NULL) + bus_type = G_BUS_TYPE_SESSION; else bus_type = G_BUS_TYPE_SYSTEM;