This is an automated email from the git hooks/post-receive script.

wrar-guest pushed a commit to branch master
in repository xboxdrv.

commit 6e1f028b370ad9c054c6be8cec4dff82bcdc343c
Author: Ingo Ruhnke <[email protected]>
Date:   Sat Nov 7 17:43:14 2015 +0100

    Only use dbus session for root when DISPLAY is set
---
 src/xboxdrv_daemon.cpp | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/xboxdrv_daemon.cpp b/src/xboxdrv_daemon.cpp
index d6dbaea..8a74caa 100644
--- a/src/xboxdrv_daemon.cpp
+++ b/src/xboxdrv_daemon.cpp
@@ -148,7 +148,21 @@ XboxdrvDaemon::run()
       switch(m_opts.dbus)
       {
         case Options::kDBusAuto:
-          dbus_bus_type = DBUS_BUS_SESSION;
+          if (getuid() == 0)
+          {
+            if (getenv("DISPLAY"))
+            {
+              dbus_bus_type = DBUS_BUS_SESSION;
+            }
+            else
+            {
+              dbus_bus_type = DBUS_BUS_SYSTEM;
+            }
+          }
+          else
+          {
+            dbus_bus_type = DBUS_BUS_SESSION;
+          }
           break;
 
         case Options::kDBusSession:

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/xboxdrv.git

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to