From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch Date: Tue, 31 Jul 2018 23:54:19 +0200 Message-ID: <20180731235419.7b824b45@scratchpost.org> References: <2c04ce67-5606-35b3-4f26-7d4c349af97e@openmailbox.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/fR/ptDDb+Ww=qChv2.SzwuG"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkcbH-0003AR-DF for guix-devel@gnu.org; Tue, 31 Jul 2018 17:54:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fkcbE-0002O0-P6 for guix-devel@gnu.org; Tue, 31 Jul 2018 17:54:39 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:45596) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fkcbE-0002Ml-Gg for guix-devel@gnu.org; Tue, 31 Jul 2018 17:54:36 -0400 In-Reply-To: <2c04ce67-5606-35b3-4f26-7d4c349af97e@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Brendan Tildesley Cc: guix-devel --Sig_/fR/ptDDb+Ww=qChv2.SzwuG Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, dbus is an object-oriented inter-process-communication mechanism. On a typical single-user system there's one user bus, at least one session bus and one system bus. On a typical multi-user system there's multiple user buses, at least as many session buses and one system bus. =46rom your messages I suspect that the dbus session bus for your session is = not running. Try invoking echo $DBUS_SESSION_BUS_ADDRESS . If it's empty, no session bus is running. Many many GNOME parts try to use dbus for everything (also arguably for things which would work perfectly well without dbus, but whatever). dbus-launch is used to start a message bus from a shell script. It's usually chained together like this (that's how I use it for real): $ exec dbus-launch ssh-agent fluxbox This means that dbus-launch will set up some environment variables, invoke the daemon and then invoke dbus-daemon and then invoke the child (here, ssh-agent, passing it "fluxbox"), passing it the environment. If you invoke "dbus-launch evince" it's starting a mini-session bus and in there invokes evince. Evince then cannot connect to the other services in your session (because there are no other such services in this mini-session). I think modifying the slim service to use dbus-launch when starting the session should have worked just fine. >> I tried modifying the slim service to launch the session with > dbus-launch, but that only served to create some new errors when running > pcmanfm: Yes, but what does echo $DBUS_SESSION_BUS_ADDRESS say now? > invoking IsSupported() failed for remote volume monitor with dbus name ^^^^^^ ??? Also, here, it's not finding lots of service files. Something needs to make sure that the dbus daemon finds the service files. Usually we have an envi= ronment variable for that (see further below). There are system services in /etc/dbus-1/system-services which should be fo= und in all cases. Among those is org.freedesktop.UDisks2 which is not org.gtk.vfs.UDisks2Volu= meMonitor . org.gtk.vfs.UDisks2VolumeMonitor is not in the directory /etc/dbus-1/system= -services . Then there's the ~/.guix-profile/share/dbus-1/services directory. ~/.guix-profile/share is one of the XDG_DATA_DIRS. dbus-specification.xml specifies that $XDG_DATA_DIRS/dbus-1/services is to = be searched by the user bus. But this directory only contains files of packages that I personally instal= led into my profile - not of the dependencies. In this case I didn't install t= he package of org.gtk.vfs.UDisks2VolumeMonitor - so the service file resides in /gnu/store/85ih21qjgqcicjkqkw5v96wjvh9hq9g3-gvfs-1.32.1/share/dbus-1/servic= es/org.gtk.vfs.UDisks2VolumeMonitor.service . I wonder why it works with the GNOME desktop. Does it really? Possible workaround: youruser$ guix package -i gvfs Possible fix: Make nautilus and other Guix packages using gvfs propagate gvfs. Possible different fix: Add profile hook which also automatically provides service files of depende= ncies without installing the packages into the profile. I'm not sure how useful = that it since dbus will prefer a running service to service files anyway (I think).= But at least we would notice a conflict. Also, is it able to statically determine what these dependencies are? --Sig_/fR/ptDDb+Ww=qChv2.SzwuG Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAltg2osACgkQ5xo1VCww uqVkzQf/QSOPiYpX51wyvEKb/dXu/Mg+i1rzJxH6sgBdz0z5ks5df9QAMhkJ1GCW /UC2uFGRwuaMrB3qEnMCAyNQni00Ls8XlsEaTxiupjSy7+ik+2t75aEoMj0j8/Ac ElFwPKK/YJmDyqSgXv+Ai1ajpWJ+QCbJQRVfWz3T/C3Ecaow8wD3zrh4Ts7klfvF 7R7ADCeozyAbUB38w6fU9nxeUciKAQaTdWYc3/Nx216uhPbeFUzG1mG+V+WH+zOM Dalc4O/uF4x4JdhIOSt+cd6ufvX1lzQ/zQ6LEzCetWIIE1/ofpOD+pKi7ROcYhmB k45K0jQl4bmX9jkJSo1RGru3hscv8w== =nqXk -----END PGP SIGNATURE----- --Sig_/fR/ptDDb+Ww=qChv2.SzwuG--