X2Go Bug report logs - #1046
x2go session causes dbus conflicts with logged in desktop on Fedora 24

version graph

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Andy Wang <dopey@moonteeth.com>

Date: Sat, 25 Jun 2016 03:35:01 UTC

Severity: normal

Merged with 1083

Found in version

Full log

🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#1046: x2go session causes dbus conflicts with logged in desktop on Fedora 24
Reply-To: Mihai Moldovan <ionic@ionic.de>, 1046@bugs.x2go.org
Resent-From: Mihai Moldovan <ionic@ionic.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Fri, 10 Mar 2017 08:10:01 +0000
Resent-Message-ID: <handler.1046.B1046.148913323013925@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 1046
X-X2Go-PR-Package: x2goserver
Received: via spool by 1046-submit@bugs.x2go.org id=B1046.148913323013925
          (code B ref 1046); Fri, 10 Mar 2017 08:10:01 +0000
Received: (at 1046) by bugs.x2go.org; 10 Mar 2017 08:07:10 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on
X-Spam-Status: No, score=-2.0 required=3.0 tests=BAYES_00,DKIM_SIGNED,
	autolearn_force=no version=3.4.1
Received: from localhost (localhost [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 3D2DE5DAD0
	for <1046@bugs.x2go.org>; Fri, 10 Mar 2017 09:07:09 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([])
	by localhost (ymir.das-netzwerkteam.de []) (amavisd-new, port 10024)
	with ESMTP id EQt5kNpptuRi for <1046@bugs.x2go.org>;
	Fri, 10 Mar 2017 09:07:01 +0100 (CET)
Received: from Root24.de (powered.by.root24.eu [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 2127E5DACF
	for <1046@bugs.x2go.org>; Fri, 10 Mar 2017 09:06:56 +0100 (CET)
Received: from nopileos.local ( [])
	by mail.ionic.de (Postfix) with ESMTPSA id 73E514F002E1;
	Fri, 10 Mar 2017 09:06:55 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ionic.de; s=default;
	t=1489133215; bh=yiyyzbXLfc52jB9u9PEe3RqglaOUE2meEZEKV0fQmz0=;
To: Andy Wang <dopey@moonteeth.com>, 1046@bugs.x2go.org,
 René Genz <liebundartig@freenet.de>
References: <CAGjaHhvetz3KfxWj+_96UFYZZEHU1XFgAuyX=tOYTXP=BvEVQg@mail.gmail.com>
From: Mihai Moldovan <ionic@ionic.de>
Message-ID: <9c410235-e96e-727a-b0e2-be38b6a48620@ionic.de>
Date: Fri, 10 Mar 2017 09:06:46 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0)
 Gecko/20100101 Thunderbird/45.7.1
MIME-Version: 1.0
In-Reply-To: <CAGjaHhvetz3KfxWj+_96UFYZZEHU1XFgAuyX=tOYTXP=BvEVQg@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha512;
[Message part 1 (text/plain, inline)]
Control: reassign -1 x2goserver
Control: reassign 1083 x2goserver
Control: merge -1 1083

On 25.06.2016 05:30 AM, Andy Wang wrote:
> 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
> # 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.

Yes, we should probably also unset DBUS_SESSION_BUS_ADDRESS. If this env
variable is set, dbus-launch won't be used by the Xsession scripts (at least on
Debian, I didn't check Fedora or others) - otherwise dbus-launch will be used,
which is what we really want.

Merging the two bug reports.

This said, I guess I should do this in x2goruncommand, not in the Xsession
script directly.

However, this only fixes problems with full desktop sessions. I believe that we
should also unset DBUS_SESSION_BUS_ADDRESS and wrap all other commands in
dbus-launch. Does that make sense? Or does anyone have a justified veto?

And then, I have to take special care of pubapps sessions, which by default do
not spawn any command. Starting a new dbus session for each command spawned in a
pubapps session would be wrong. The situation is quite complicated in that case,
as there is no common command that is launched and stays available for the whole
session. (What happens essentially is that x2goagent is started and then kept
running, even if no other programs are currently running. Programs are then
executed by the client application, but there's no real concept of a session.)
I have to come up with something to make pubapps sessions behave in a sane way
related to DBUS.


[signature.asc (application/pgp-signature, attachment)]

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Jun 20 21:32:03 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.