From ionic@ionic.de Fri Mar 10 09:07:09 2017 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 ymir.das-netzwerkteam.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost (localhost [127.0.0.1]) 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 ([127.0.0.1]) by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (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 [5.135.3.88]) 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 (178.162.222.41.adsl.inet-telecom.org [178.162.222.41]) 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=; h=Subject:To:References:From:Date:In-Reply-To:From; b=n3HYqbcCobC7stwg+lllmpm4Cpcx/EYEVI+dW/DGzKVBG85hzG6UOnU0GsyKuLXCI awcaQ2zoPcqvqeIz1zQD44BKdx39YlvwjH9584apJmDNpyXiB6zRMiLkGOXj4VCf74 xQO97m4lj5/zYIiYRzWHYznyQN9PUdwNgzf54EzY= Subject: Re: x2go session causes dbus conflicts with logged in desktop on Fedora 24 To: Andy Wang , 1046@bugs.x2go.org, =?UTF-8?Q?Ren=c3=a9_Genz?= References: From: Mihai Moldovan 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: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IPvsPEC05QIh461ruono26p4ffhB5qgjf" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IPvsPEC05QIh461ruono26p4ffhB5qgjf Content-Type: multipart/mixed; boundary="K2sRiRt8oOqNHEpnWMG2ShWeglIvuU5HF"; protected-headers="v1" From: Mihai Moldovan To: Andy Wang , 1046@bugs.x2go.org, =?UTF-8?Q?Ren=c3=a9_Genz?= Message-ID: <9c410235-e96e-727a-b0e2-be38b6a48620@ionic.de> Subject: Re: x2go session causes dbus conflicts with logged in desktop on Fedora 24 References: In-Reply-To: --K2sRiRt8oOqNHEpnWMG2ShWeglIvuU5HF Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Control: reassign -1 x2goserver 4.0.1.19 Control: reassign 1083 x2goserver 4.0.1.19 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 >=20 > For example: > #!/bin/sh > unset DBUS_SESSION_BUS_ADDRESS > # redirect to /dev/null due to x2go bug 914 > /usr/bin/mate-session > /dev/null >=20 > Doing some digging, it looks like the dbus socket > (/usr/lib/systemd/user/dbus.socket) on fedora 24 (dbus-1.11.2-1.fc24.x8= 6_64) > does this: > ExecStartPost=3D-/usr/bin/systemctl --user set-environment > DBUS_SESSION_BUS_ADDRESS=3Dunix:path=3D%t/bus >=20 > And sets the DBUS_SESSION_BUS_ADDRESS for all logins for your user. >=20 > This same workaround appears to be what tigervnc used as their permanen= t solution: > https://github.com/TigerVNC/tigervnc/commit/c071e493a093d7ee9a568729dd2= e151f5cd3d749 >=20 > 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 le= ast 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 Xsessio= n script directly. However, this only fixes problems with full desktop sessions. I believe t= hat 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 defau= lt do not spawn any command. Starting a new dbus session for each command spawn= ed in a pubapps session would be wrong. The situation is quite complicated in tha= t case, as there is no common command that is launched and stays available for th= e whole session. (What happens essentially is that x2goagent is started and then = kept running, even if no other programs are currently running. Programs are th= en executed by the client application, but there's no real concept of a sess= ion.) I have to come up with something to make pubapps sessions behave in a san= e way related to DBUS. Mihai --K2sRiRt8oOqNHEpnWMG2ShWeglIvuU5HF-- --IPvsPEC05QIh461ruono26p4ffhB5qgjf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCgAGBQJYwl6dAAoJEB/WLtluJTqHIKAQANSg4701RlcsdKwMj6bDccvo 7a3C9Pt10Ri5UYdS7Te+GynumG3pm06DTtWoqk1dBNF0DsSY73n7RB4YvE1/c/2p Mj3lQ6Sjh3s8jZRlRPv/XGdAZpsninjab+SbOgsU4jDy8fMZCNc21tO/fYL3bZXC T/sCYuA4xcjGrWO6v4EosoFozLOY/OSKMAUktExYMfOvlloQjSBm2PSJ3r9xpUi+ AqZro4Zh/L60SyfWzE5yac9w5iVGSNhzOMGNWE35B/JHiCTuxCycFTO1wj+nf6P/ 6jtYfKgQiIIhOxhJp3H9TdTiiEi+GgaFbE0Gm9R04jIO6F0OhBGFSqh5uZh7Vt4/ 1M2XmHqJzbEWFjt77mfmfGL11rvHy4IokKsRmcl+ANURveBMtt2nSfor1Zrlbz1v 9wuPwJNsfuZIomiWcvzl6QKUNSh5mSgEvXqnRI8tQzspQrCOXfpNsbY7zv+PGPkZ KqwE30LtXR01xji3zakItUO4S0CJ4HxqxsMvlByCfZYxJs6TgjaNKCRqYvcAjQYH 3t0OUWaK97rjZBId0pF4RJyLf3EBQ6NnWiDIm5hYZu21NEQB+ZqO+GGVKgwlMyx4 tNG59/URqTVr51T7rW+ZCh2B+mC3FWPbDvCwJHE1E5dHS1iHQXYhPP0oa0IqZZKU jdpu5ipkT+XyssB4JvM1 =/RIO -----END PGP SIGNATURE----- --IPvsPEC05QIh461ruono26p4ffhB5qgjf--