Subject: x2go session causes dbus conflicts with logged in desktop on Fedora 24

From: Andy Wang <[email-masked]>
Date: Fri, 24 Jun 2016 22:30:42 -0500

Package: x2goserver
Version: 4.0.1.19-8.fc24

When attempting to login with a client desktop session that uses dbus while
logged in as the same user on the console causes an error to appear in a
pop up window:
Could not acquire name on session bus

You can dismiss the error but the desktop never full starts and attempts to
logout triggers the logout on the console session.

>From the error, I this appears to be resolved by using a custom session
script in x2go and making sure to call: unset DBUS_SESSION_BUS_ADDRESS

For example:
#!/bin/sh
unset DBUS_SESSION_BUS_ADDRESS
# redirect to /dev/null due to x2go bug 914
/usr/bin/mate-session > /dev/null

Doing some digging, it looks like the dbus socket
(/usr/lib/systemd/user/dbus.socket) on fedora 24
(dbus-1.11.2-1.fc24.x86_64) does this:
ExecStartPost=-/usr/bin/systemctl --user set-environment
DBUS_SESSION_BUS_ADDRESS=unix:path=%t/bus

And sets the DBUS_SESSION_BUS_ADDRESS for all logins for your user.

This same workaround appears to be what tigervnc used as their permanent
solution:
https://github.com/TigerVNC/tigervnc/commit/c071e493a093d7ee9a568729dd2e151f5cd3d749

So I think this is the proper solution.

FYI, a bug was filed against Fedora as well:
https://bugzilla.redhat.com/show_bug.cgi?id=1350004