2018-06-07 11:38:24 |
Alejandro Perez |
description |
It seems that packages for version 1.0.5 where built with IPC_DBUS_GLIB, which uses a simplified code for launching the ephemeral DBUS session, whereas packages for version 1.0.6 are built with IPC_DBUS_GLIB disabled. While this works ok for Centos 7 and Debian, in Centos 6.9 the attempt to connect to the current DBUS session (which does not exist) does not result into DBUS_GERROR_NOT_SUPPORTED, but into DBUS_GERROR_SPAWN_EXEC_FAILED. This makes that dbus_launch_moonshot is not executed hence no DBUS session is available for the client and it fails.
A simple patch that works is including this second error into the known errors that can trigger the execution of dbus_launch_moonshot().
diff --git a/libmoonshot/libmoonshot-dbus.c b/libmoonshot/libmoonshot-dbus.c
index f3635bb..6a753e3 100644
--- a/libmoonshot/libmoonshot-dbus.c
+++ b/libmoonshot/libmoonshot-dbus.c
@@ -167,7 +167,8 @@ static DBusGProxy *dbus_connect (MoonshotError **error, GPid *server_pid)
{
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &g_error);
- if (g_error_matches(g_error, DBUS_GERROR, DBUS_GERROR_NOT_SUPPORTED)) {
+ if (g_error_matches(g_error, DBUS_GERROR, DBUS_GERROR_NOT_SUPPORTED) ||
+ g_error_matches(g_error, DBUS_GERROR, DBUS_GERROR_SPAWN_EXEC_FAILED)) {
/*Generally this means autolaunch failed because probably DISPLAY is unset*/
connection = dbus_launch_moonshot();
ad_hoc_dbus_session = TRUE; |
It seems that packages for version 1.0.5 where built with IPC_DBUS_GLIB, which uses a simplified code for launching the ephemeral DBUS session, whereas packages for version 1.0.6 are built with IPC_DBUS_GLIB disabled. While this works ok for Centos 7 and Debian, in Centos 6.9 the attempt to connect to the current DBUS session (which does not exist) does not result into DBUS_GERROR_NOT_SUPPORTED, but into DBUS_GERROR_SPAWN_EXEC_FAILED. This makes that dbus_launch_moonshot is not executed hence no DBUS session is available for the client and it fails.
A simple patch that works is including this second error into the known errors that can trigger the execution of dbus_launch_moonshot().
EDITED: removed pasted patch and attach it properly. |
|