all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
@ 2018-07-26 15:10 Brendan Tildesley
  2018-07-28 19:40 ` Nils Gillmann
  2018-07-31 21:54 ` Danny Milosavljevic
  0 siblings, 2 replies; 10+ messages in thread
From: Brendan Tildesley @ 2018-07-26 15:10 UTC (permalink / raw)
  To: guix-devel

Continuing on from my previous thread here:
https://lists.gnu.org/archive/html/help-guix/2017-11/msg00084.html

I discovered that I was able to work around the problem by running
pcmanfm with dbus-launch. Running `dbus-launch evince` also fixed an
issue I had with Evince not remembering the last page I was on in a
document. However, I understand next to nothing about dbus, gvfs, ,etc,
so I'm still not sure what the answer is. But I think this is the
essential clue that identifies the problem.

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:

-------

invoking IsSupported() failed for remote volume monitor with dbus name
org.gtk.vfs.UDisks2VolumeMonitor::
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gtk.vfs.UDisks2VolumeMonitor was not provided by any .service files
(g-dbus-error-quark, 2)
invoking IsSupported() failed for remote volume monitor with dbus name
org.gtk.vfs.GPhoto2VolumeMonitor::
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gtk.vfs.GPhoto2VolumeMonitor was not provided by any .service files
(g-dbus-error-quark, 2)
invoking IsSupported() failed for remote volume monitor with dbus name
org.gtk.vfs.MTPVolumeMonitor::
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gtk.vfs.MTPVolumeMonitor was not provided by any .service files
(g-dbus-error-quark, 2)
-------

Although I can run `dbus-launch bash` from a terminal and then run
pcmanfm from there and it will work fine (no longer displays the hidden
mounts, and displays my actual hard drives, and lets me mount them). It
be great if someone could help solve this, I know at least a couple
other people in the irc chat have experienced this bug, usually when
using some tiling wm like i3 instead of the full GNOME desktop. Is it an
issue with SLiM, or and issue somewhere else?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-07-26 15:10 Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch Brendan Tildesley
@ 2018-07-28 19:40 ` Nils Gillmann
  2018-07-31 21:54 ` Danny Milosavljevic
  1 sibling, 0 replies; 10+ messages in thread
From: Nils Gillmann @ 2018-07-28 19:40 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: guix-devel

Hi Brendan,

I can definitely confirm this, as I have been dealing with this on and
off for a couple of years now due to the window managers I use.

Would you like to file a bug on this or check if there are / have been
bugreports about this before?  I'm not sure what the best way to
proceed could be, nor do I want to decide on this.

For your new errors, do the files exist which are mentioned?
Depending on your window manager it might be too minimal and require
additional packages as user or system installed.

Brendan Tildesley transcribed 1.9K bytes:
> Continuing on from my previous thread here:
> https://lists.gnu.org/archive/html/help-guix/2017-11/msg00084.html
> 
> I discovered that I was able to work around the problem by running
> pcmanfm with dbus-launch. Running `dbus-launch evince` also fixed an
> issue I had with Evince not remembering the last page I was on in a
> document. However, I understand next to nothing about dbus, gvfs, ,etc,
> so I'm still not sure what the answer is. But I think this is the
> essential clue that identifies the problem.
> 
> 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:
> 
> -------
> 
> invoking IsSupported() failed for remote volume monitor with dbus name
> org.gtk.vfs.UDisks2VolumeMonitor::
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.gtk.vfs.UDisks2VolumeMonitor was not provided by any .service files
> (g-dbus-error-quark, 2)
> invoking IsSupported() failed for remote volume monitor with dbus name
> org.gtk.vfs.GPhoto2VolumeMonitor::
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.gtk.vfs.GPhoto2VolumeMonitor was not provided by any .service files
> (g-dbus-error-quark, 2)
> invoking IsSupported() failed for remote volume monitor with dbus name
> org.gtk.vfs.MTPVolumeMonitor::
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.gtk.vfs.MTPVolumeMonitor was not provided by any .service files
> (g-dbus-error-quark, 2)
> -------
> 
> Although I can run `dbus-launch bash` from a terminal and then run
> pcmanfm from there and it will work fine (no longer displays the hidden
> mounts, and displays my actual hard drives, and lets me mount them). It
> be great if someone could help solve this, I know at least a couple
> other people in the irc chat have experienced this bug, usually when
> using some tiling wm like i3 instead of the full GNOME desktop. Is it an
> issue with SLiM, or and issue somewhere else?
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-07-26 15:10 Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch Brendan Tildesley
  2018-07-28 19:40 ` Nils Gillmann
@ 2018-07-31 21:54 ` Danny Milosavljevic
  2018-08-02  5:52   ` Chris Marusich
  2018-08-02  6:21   ` Brendan Tildesley
  1 sibling, 2 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2018-07-31 21:54 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3391 bytes --]

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.

From 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 environment
variable for that (see further below).

There are system services in /etc/dbus-1/system-services which should be found in
all cases.

Among those is org.freedesktop.UDisks2 which is not org.gtk.vfs.UDisks2VolumeMonitor .

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 installed
into my profile - not of the dependencies.  In this case I didn't install the
package of org.gtk.vfs.UDisks2VolumeMonitor - so the service file resides in
/gnu/store/85ih21qjgqcicjkqkw5v96wjvh9hq9g3-gvfs-1.32.1/share/dbus-1/services/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 dependencies
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?

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-07-31 21:54 ` Danny Milosavljevic
@ 2018-08-02  5:52   ` Chris Marusich
  2018-08-02  6:21   ` Brendan Tildesley
  1 sibling, 0 replies; 10+ messages in thread
From: Chris Marusich @ 2018-08-02  5:52 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

Danny Milosavljevic <dannym@scratchpost.org> writes:

> dbus is an object-oriented inter-process-communication mechanism.

Wow, awesome overview!  Thank you for taking the time to explain it.
I've always wondered how it was supposed to fit together.

> I wonder why it works with the GNOME desktop.  Does it really?

What is "it"?  What works with GNOME desktop, which you expect does not?

I use GNOME on GuixSD.  For what it's worth, after I've logged into my
GNOME session, if I open up a GNOME Terminal, run "dbus-monitor", and
then launch Evince (from the application search menu), I do see a flurry
of activity related to Evince, so I think it's connecting to the session
bus (dbus-monitor monitors the session bus by default, apparently).

Regarding the lack of a "back" button in Evince, I do see one, and it
does seem to work.  The button looks like a "<" symbol.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-07-31 21:54 ` Danny Milosavljevic
  2018-08-02  5:52   ` Chris Marusich
@ 2018-08-02  6:21   ` Brendan Tildesley
  2018-08-05  0:23     ` Danny Milosavljevic
  1 sibling, 1 reply; 10+ messages in thread
From: Brendan Tildesley @ 2018-08-02  6:21 UTC (permalink / raw)
  Cc: guix-devel

On 08/01/18 07:54, Danny Milosavljevic wrote:
> 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.
>
> >From 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 environment
> variable for that (see further below).
>
> There are system services in /etc/dbus-1/system-services which should be found in
> all cases.
>
> Among those is org.freedesktop.UDisks2 which is not org.gtk.vfs.UDisks2VolumeMonitor .
>
> 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 installed
> into my profile - not of the dependencies.  In this case I didn't install the
> package of org.gtk.vfs.UDisks2VolumeMonitor - so the service file resides in
> /gnu/store/85ih21qjgqcicjkqkw5v96wjvh9hq9g3-gvfs-1.32.1/share/dbus-1/services/org.gtk.vfs.UDisks2VolumeMonitor.service .
>
> I wonder why it works with the GNOME desktop.  Does it really?
>
> Possible workaround:
>
> youruser$ guix package -i gvfs
I've always had gvfs installed and it hasn't made any difference as far
as I can tell
>
> 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 dependencies
> 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?

Previously there was no $DBUS_SESSION_BUS_ADDRESS. After I modified slim
to add dbus-launch, I have
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Rc7AP3Xnzz,guid=97d26aba11773a9ce755829b5b611375

but it didn't fix the issue, and caused those weird errors. Actually I'm
not getting those errors anymore, maybe due to reconfiguring and
rebooting. When I run `dbus-launch bash` , it overwrites that value with
a new value in the current environment:
unix:abstract=/tmp/dbus-1vzMgxAURi,guid=98eb63bd2e22340a0c1d3bd85b6116d5
 and then running pcmanfm/evince only from that bash shell works fine,
running outside it or from dmenu doesn't.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-08-02  6:21   ` Brendan Tildesley
@ 2018-08-05  0:23     ` Danny Milosavljevic
  2018-08-05  0:30       ` Danny Milosavljevic
  2018-08-05 11:57       ` Brendan Tildesley
  0 siblings, 2 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2018-08-05  0:23 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1899 bytes --]

Hi Brendan,

On Thu, 2 Aug 2018 16:21:02 +1000
Brendan Tildesley <brendan.tildesley@openmailbox.org> wrote:

> I've always had gvfs installed and it hasn't made any difference as far
> as I can tell

Hmm, what does your ~/.guix-profile/share/dbus-1/services directory contain?

What is the environment variable XDG_DATA_DIRS set to?

> Previously there was no $DBUS_SESSION_BUS_ADDRESS. 

Ok, then no dbus was running and that's bad for the clients of dbus.  They try
to autorun dbus in that case - but I've never seen that actually working :P

>After I modified slim
> to add dbus-launch, I have
> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Rc7AP3Xnzz,guid=97d26aba11773a9ce755829b5b611375

Okay, so now there's a session bus now.  Progress :)

> but it didn't fix the issue, and caused those weird errors. Actually I'm
> not getting those errors anymore, maybe due to reconfiguring and
> rebooting. 

Even more progress :)

>When I run `dbus-launch bash` , it overwrites that value with
> a new value in the current environment:
> unix:abstract=/tmp/dbus-1vzMgxAURi,guid=98eb63bd2e22340a0c1d3bd85b6116d5

Yeah, as I said, now you have a tiny session even though you had a big session
already.  This isn't as useless as it sounds - it would make sense in containers
etc.

>  and then running pcmanfm/evince only from that bash shell works fine,
> running outside it or from dmenu doesn't.

If you are motivated, I suggest to try to proceed to get the version
without "dbus-launch bash" (but with slim configured to use dbus-launch)
to work.  It can't be missing much now.

I suspect that the gvfs service file is either not there, the environment
variable is not set or the executable mentioned inside the service file
is not found.

For better debugging, try:

youruser$ export DBUS_VERBOSE=1
youruser$ evince

And post the result here.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-08-05  0:23     ` Danny Milosavljevic
@ 2018-08-05  0:30       ` Danny Milosavljevic
  2018-08-05 11:57       ` Brendan Tildesley
  1 sibling, 0 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2018-08-05  0:30 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

FWIW I just installed pcmanfm (didn't know it before) as a regular user - and
it works fine with no warnings or crashes (in fluxbox with the mentioned session
command line).

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-08-05  0:23     ` Danny Milosavljevic
  2018-08-05  0:30       ` Danny Milosavljevic
@ 2018-08-05 11:57       ` Brendan Tildesley
  2018-08-12 22:09         ` Danny Milosavljevic
  1 sibling, 1 reply; 10+ messages in thread
From: Brendan Tildesley @ 2018-08-05 11:57 UTC (permalink / raw)
  To: guix-devel

On 08/05/18 10:23, Danny Milosavljevic wrote:
> Hi Brendan,
>
> On Thu, 2 Aug 2018 16:21:02 +1000
> Brendan Tildesley <brendan.tildesley@openmailbox.org> wrote:
>
>> I've always had gvfs installed and it hasn't made any difference as far
>> as I can tell
> Hmm, what does your ~/.guix-profile/share/dbus-1/services directory contain?

ca.desrt.dconf.service               
org.freedesktop.IBus.service                     
org.gnome.FileRoller.ArchiveManager1.service 
org.gtk.vfs.Daemon.service               
org.gtk.vfs.UDisks2VolumeMonitor.service
org.a11y.Bus.service                 
org.freedesktop.portal.IBus.service              
org.gnome.FileRoller.service                 
org.gtk.vfs.GPhoto2VolumeMonitor.service  org.xfce.FileManager.service
org.fcitx.Fcitx.service              
org.freedesktop.Telepathy.Client.Vinagre.service 
org.gnome.Nautilus.service                   
org.gtk.vfs.Metadata.service              org.xfce.Thunar.service
org.freedesktop.FileManager1.service 
org.gnome.evince.Daemon.service                  
org.gnome.Rhythmbox3.service                 
org.gtk.vfs.MTPVolumeMonitor.service

>
> What is the environment variable XDG_DATA_DIRS set to?
/home/b/.guix-profile/share:/run/current-system/profile/share:/home/b/.guix-profile/share:/run/current-system/profile/share

(Not sure why it's repeated twice.)
> [...]
>> but it didn't fix the issue, and caused those weird errors. Actually I'm
>> not getting those errors anymore, maybe due to reconfiguring and
>> rebooting. 
> Even more progress :)
Ok they are there for pcmanfm, but not evince.
It may be unrelated but I also get these messages with pcmanfm
(XDG_TEMPLATES_DIR  is empty)

** (pcmanfm:1051): WARNING **: 20:10:52.602: XDG_TEMPLATES_DIR is set to
invalid path, ignoring it

(pcmanfm:1051): Gtk-WARNING **: 20:10:52.604: Unable to locate theme
engine in module_path: "adwaita",

(pcmanfm:1051): Gtk-WARNING **: 20:10:52.605: Unable to locate theme
engine in module_path: "adwaita",

(pcmanfm:1051): Gtk-WARNING **: 20:10:52.606: Unable to locate theme
engine in module_path: "murrine",


> [...]
> If you are motivated, I suggest to try to proceed to get the version
> without "dbus-launch bash" (but with slim configured to use dbus-launch)
> to work.  It can't be missing much now.
I'm motivated it's just I have very little clue what I'm doing.
>
> I suspect that the gvfs service file is either not there, the environment
> variable is not set or the executable mentioned inside the service file
> is not found.
>
> For better debugging, try:
>
> youruser$ export DBUS_VERBOSE=1
> youruser$ evince
>
> And post the result here.
** (evince:1019): WARNING **: 20:07:46.869: Error retrieving
accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown:
The name org.a11y.Bus was not provided by any .service files
Error registering document:
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gnome.evince.Daemon was not provided by any .service files

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-08-05 11:57       ` Brendan Tildesley
@ 2018-08-12 22:09         ` Danny Milosavljevic
  2018-11-12 10:57           ` Brendan Tildesley
  0 siblings, 1 reply; 10+ messages in thread
From: Danny Milosavljevic @ 2018-08-12 22:09 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3876 bytes --]

Hi,

On Sun, 5 Aug 2018 21:57:15 +1000
Brendan Tildesley <brendan.tildesley@openmailbox.org> wrote:

> On 08/05/18 10:23, Danny Milosavljevic wrote:
> > Hi Brendan,
> >
> > On Thu, 2 Aug 2018 16:21:02 +1000
> > Brendan Tildesley <brendan.tildesley@openmailbox.org> wrote:
> >  
> >> I've always had gvfs installed and it hasn't made any difference as far
> >> as I can tell  
> > Hmm, what does your ~/.guix-profile/share/dbus-1/services directory contain?  
> 
> ca.desrt.dconf.service               
> org.freedesktop.IBus.service                     
> org.gnome.FileRoller.ArchiveManager1.service 
> org.gtk.vfs.Daemon.service               
> org.gtk.vfs.UDisks2VolumeMonitor.service

> org.a11y.Bus.service                 

^^^^ Okay.

> org.freedesktop.portal.IBus.service              
> org.gnome.FileRoller.service                 
> org.gtk.vfs.GPhoto2VolumeMonitor.service  org.xfce.FileManager.service
> org.fcitx.Fcitx.service              
> org.freedesktop.Telepathy.Client.Vinagre.service 
> org.gnome.Nautilus.service                   
> org.gtk.vfs.Metadata.service              org.xfce.Thunar.service
> org.freedesktop.FileManager1.service 

> org.gnome.evince.Daemon.service                  

^^^^ Okay.

> org.gnome.Rhythmbox3.service                 
> org.gtk.vfs.MTPVolumeMonitor.service
> 
> >
> > What is the environment variable XDG_DATA_DIRS set to?  
> /home/b/.guix-profile/share:/run/current-system/profile/share:/home/b/.guix-profile/share:/run/current-system/profile/share
> 
> (Not sure why it's repeated twice.)

Okay.  To compare, try this:

$ ps $(pgrep -U `id -u` '^dbus-daemon$') |grep session |grep -v /run/user/
Notice the PID (first column) and then do:
$ cat /proc/<pid>/environ  |tr '\0' '\n' |grep XDG

Is the result the same?

> ** (pcmanfm:1051): WARNING **: 20:10:52.602: XDG_TEMPLATES_DIR is set to
> invalid path, ignoring it
> 
> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.604: Unable to locate theme
> engine in module_path: "adwaita",
> 
> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.605: Unable to locate theme
> engine in module_path: "adwaita",
> 
> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.606: Unable to locate theme
> engine in module_path: "murrine",

Hmm, I tried to find where it explicitly looks up "adwaita" and "murrine"
in pcmanfm, but I couldn't find it.

Can you try the following?

$ export XDG_TEMPLATES_DIR=/tmp
$ gdb --args pcmanfm --g-fatal-warnings
(gdb) r
... wait until it crashes
(gdb) bt

and post the result here.  It should make it possible for us to find
out where the "lookup" instruction is.

> > I suspect that the gvfs service file is either not there, the environment
> > variable is not set or the executable mentioned inside the service file
> > is not found.
> >
> > For better debugging, try:
> >
> > youruser$ export DBUS_VERBOSE=1
> > youruser$ evince
> >
> > And post the result here.  
> ** (evince:1019): WARNING **: 20:07:46.869: Error retrieving
> accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown:
> The name org.a11y.Bus was not provided by any .service files
> Error registering document:
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.gnome.evince.Daemon was not provided by any .service files

Aha! Accessibility bus!

I've checked, I have another dbus process for accessibility here:

$ ps -ef |grep accessibility.conf
dannym     600   596  0 Aug12 ?        00:00:00 /gnu/store/30v35016yw7nr0r9778k585vc1g7wsn8-dbus-1.12.2/bin/dbus-daemon --config-file=/gnu/store/yj5plxmgaxsa1in6nx202a5xsz3y33yp-at-spi2-core-2.26.2/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3

Do you have it?  For finding out, try:

$ ps -ef |grep accessibility.conf

If you have it, what does its /proc/.../environ contain?

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch
  2018-08-12 22:09         ` Danny Milosavljevic
@ 2018-11-12 10:57           ` Brendan Tildesley
  0 siblings, 0 replies; 10+ messages in thread
From: Brendan Tildesley @ 2018-11-12 10:57 UTC (permalink / raw)
  To: guix-devel

On 08/13/18 08:09, Danny Milosavljevic wrote:
> Okay. To compare, try this:
> $ ps $(pgrep -U `id -u` '^dbus-daemon$') |grep session |grep -v /run/user/
> Notice the PID (first column) and then do:
> $ cat /proc/<pid>/environ  |tr '\0' '\n' |grep XDG
>
> Is the result the same?
b@ui ~$ ps $(pgrep -U `id -u` '^dbus-daemon$') |grep session |grep -v
/run/user/
  708 ?        Ss     0:00
/gnu/store/5bda3bgy871dyb9cna4k7gnz002j88rq-dbus-1.12.6/bin/dbus-daemon
--syslog-only --fork --print-pid 5 --print-address 7 --session
b@ui ~$ cat /proc/708/environ  |tr '\0' '\n' |grep XDG
XDG_VTNR=7
XDG_SESSION_ID=c1
XDG_DATA_DIRS=/gnu/store/ifq7znihd687bgz4gkn9vy1dsk60k7xl-shared-mime-info-1.8/share:/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/share:/gnu/store/hiij9hlxq53w39g0maf67b842j15kw22-gtk+-3.22.30/share:/gnu/store/6zhrh72zsfv4h8jw64rvzs3jcpm1ypmn-modem-manager-1.4.14/share:/gnu/store/n3zml7g3gfp0wgxrwqzairbqx9ab3q8l-network-manager-applet-1.8.4/share:/home/b/.guix-profile/share:/run/current-system/profile/share:/home/b/.guix-profile/share:/run/current-system/profile/share
XDG_SEAT=seat0
XDG_RUNTIME_DIR=/run/user/1000
XDG_CONFIG_DIRS=/home/b/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg
b@ui ~$



>
>> ** (pcmanfm:1051): WARNING **: 20:10:52.602: XDG_TEMPLATES_DIR is set to
>> invalid path, ignoring it
>>
>> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.604: Unable to locate theme
>> engine in module_path: "adwaita",
>>
>> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.605: Unable to locate theme
>> engine in module_path: "adwaita",
>>
>> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.606: Unable to locate theme
>> engine in module_path: "murrine",
> Hmm, I tried to find where it explicitly looks up "adwaita" and "murrine"
> in pcmanfm, but I couldn't find it.
>
> Can you try the following?
>
> $ export XDG_TEMPLATES_DIR=/tmp
> $ gdb --args pcmanfm --g-fatal-warnings
> (gdb) r
> ... wait until it crashes
> (gdb) bt
>
> and post the result here.  It should make it possible for us to find
> out where the "lookup" instruction is.
b@ui ~$ export XDG_TEMPLATES_DIR=/tmp
b@ui ~$ gdb --args pcmanfm --g-fatal-warnings
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pcmanfm...(no debugging symbols found)...done.
(gdb) r
Starting program:
/gnu/store/32zqds837fjm6ql4lsk2v27hn0j3zszc-profile/bin/pcmanfm
--g-fatal-warnings
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/gnu/store/l4lr0f5cjd0nbsaaf8b5dmcw1a1yypr3-glibc-2.27/lib/libthread_db.so.1".
[New Thread 0x7fffef53b700 (LWP 999)]
[New Thread 0x7fffeeb2a700 (LWP 1000)]
[New Thread 0x7fffee199700 (LWP 1001)]

** (pcmanfm:995): WARNING **: 18:22:56.725: XDG_TEMPLATES_DIR is set to
invalid path, ignoring it

Thread 1 "pcmanfm" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff4f9b2c1 in _g_log_abort () from
/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/libglib-2.0.so.0
(gdb) bt
#0  0x00007ffff4f9b2c1 in _g_log_abort () from
/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/libglib-2.0.so.0
#1  0x00007ffff4f9c515 in g_logv () from
/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/libglib-2.0.so.0
#2  0x00007ffff4f9c662 in g_log () from
/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/libglib-2.0.so.0
#3  0x00007ffff5a76345 in _fm_templates_init () from
/gnu/store/4r9sh1ddhkd3qh92hxzqanjsxikzhqzi-libfm-1.3.0.2/lib/libfm.so.4
#4  0x00007ffff5a638d3 in fm_init () from
/gnu/store/4r9sh1ddhkd3qh92hxzqanjsxikzhqzi-libfm-1.3.0.2/lib/libfm.so.4
#5  0x00007ffff7851691 in fm_gtk_init () from
/gnu/store/4r9sh1ddhkd3qh92hxzqanjsxikzhqzi-libfm-1.3.0.2/lib/libfm-gtk.so.4
#6  0x0000000000413714 in main ()
(gdb)
>
>>> I suspect that the gvfs service file is either not there, the environment
>>> variable is not set or the executable mentioned inside the service file
>>> is not found.
>>>
>>> For better debugging, try:
>>>
>>> youruser$ export DBUS_VERBOSE=1
>>> youruser$ evince
>>>
>>> And post the result here.  
There is no output
>> ** (evince:1019): WARNING **: 20:07:46.869: Error retrieving
>> accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown:
>> The name org.a11y.Bus was not provided by any .service files
>> Error registering document:
>> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
>> org.gnome.evince.Daemon was not provided by any .service files
> Aha! Accessibility bus!
>
> I've checked, I have another dbus process for accessibility here:
>
> $ ps -ef |grep accessibility.conf
> dannym     600   596  0 Aug12 ?        00:00:00 /gnu/store/30v35016yw7nr0r9778k585vc1g7wsn8-dbus-1.12.2/bin/dbus-daemon --config-file=/gnu/store/yj5plxmgaxsa1in6nx202a5xsz3y33yp-at-spi2-core-2.26.2/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
>
> Do you have it?  For finding out, try:
>
> $ ps -ef |grep accessibility.conf
b          714   710  0 16:01 ?        00:00:00
/gnu/store/5bda3bgy871dyb9cna4k7gnz002j88rq-dbus-1.12.6/bin/dbus-daemon
--config-file=/gnu/store/842v39q6mf31wx818s0qrqkigc7lsjv0-at-spi2-core-2.26.2/share/defaults/at-spi2/accessibility.con
 --nofork --print-address 3

>
> If you have it, what does its /proc/.../environ contain?


b@ui ~$ cat /proc/714/environ  |tr '\0' '\n'|sort
 ;;
 ;;
 *)
}
ALTERNATE_EDITOR=emacs
BASH_FUNC_cycle-layout%%=() {  CURRENT=$(setxkbmap -query | grep layout
| cut -d ':' -f 2- | tr -d ' ');
BASH_LOADABLES_PATH=/run/current-system/profile/lib/bash
 case $CURRENT in
CPATH=/home/b/.guix-profile/include
DBUS_FATAL_WARNINGS=0
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-D221282NDW,guid=695c2c1ced04449c1fa91b6b5be90946
DBUS_STARTER_ADDRESS=unix:abstract=/tmp/dbus-D221282NDW,guid=695c2c1ced04449c1fa91b6b5be90946
DBUS_STARTER_BUS_TYPE=session
DICPATH=/home/b/.guix-profile/share/hunspell:/run/current-system/profile/share/hunspell
DISPLAY=:0.0
 echo "my colemak";
 echo "qwerty"
EDITOR=emacsclient -nw -c -a "" $@
 esac
GIO_EXTRA_MODULES=/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/gio/modules:/home/b/.guix-profile/lib/gio/modules:/run/current-system/profile/lib/gio/modules
GIT_EXEC_PATH=/home/b/.guix-profile/libexec/git-core
GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt
GST_PLUGIN_PATH=/home/b/.guix-profile/lib/gstreamer-1.0
GST_PLUGIN_SYSTEM_PATH=/home/b/.guix-profile/lib/gstreamer-1.0
GTK_DATA_PREFIX=/run/current-system/profile
GTK_PATH=/gnu/store/hiij9hlxq53w39g0maf67b842j15kw22-gtk+-3.22.30/lib/gtk-3.0
GUILE_LOAD_COMPILED_PATH=/home/b/.guix-profile/lib/guile/2.2/site-ccache:/home/b/.guix-profile/share/guile/site/2.2:/run/current-system/profile/lib/guile/2.2/site-ccache:/run/current-system/profile/share/guile/site/2.2
GUILE_LOAD_PATH=/home/b/.guix-profile/share/guile/site/2.2:/run/current-system/profile/share/guile/site/2.2
GUIX_GTK3_PATH=/home/b/.guix-profile/lib/gtk-3.0
GUIX_LOCPATH=/run/current-system/locale
HISTFILE=/home/b/.bash_eternal_history
HISTFILESIZE=-1
HISTSIZE=-1
HISTTIMEFORMAT=[%F %T]
HOME=/home/b
IBUS_COMPONENT_PATH=/home/b/.guix-profile/share/ibus/component
INFOPATH=/home/b/.config/guix/current/share/info:/home/b/.guix-profile/share/info:/run/current-system/profile/share/info:/home/b/.guix-profile/share/info:/run/current-system/profile/share/info
LANG=en_AU.utf8
LIBRARY_PATH=/home/b/.guix-profile/lib
LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules
LOGNAME=b
MAIL=/var/mail/b
MANPATH=/run/current-system/profile/share/man:/home/b/.guix-profile/share/man:/run/current-system/profile/share/man
MINETEST_SUBGAME_PATH=/home/b/.guix-profile/share/minetest/games
NM_VPN_PLUGIN_DIR=/gnu/store/c5hsbhfqzbikhfg29qlp3rjbq9nv8jn6-network-manager-vpn-plugins/lib/NetworkManager/VPN
PATH=/home/b/config/bin/:/run/setuid-programs:/home/b/.config/guix/current/bin:/home/b/.guix-profile/bin:/home/b/.guix-profile/sbin:/run/current-system/profile/bin:/run/current-system/profile/sbin:/home/b/.nix-profile/bin
PWD=/home/b
PYTHONPATH=/home/b/.guix-profile/lib/python3.6/site-packages
 setxkbmap -layout "us(basic)";
 setxkbmap -layout "us(colemak)";
SHELL=/gnu/store/q4b3s9y4i0da36drp7zfq9yqcf43s47v-bash-4.4.19/bin/bash
SHLVL=2
SSL_CERT_DIR=/etc/ssl/certs
SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
TERMINFO_DIRS=/home/b/.guix-profile/share/terminfo
TERM=xterm
TZDIR=/gnu/store/2b2md66fbzyspsmd5dj6zkj9hilac40r-tzdata-2018e/share/zoneinfo
 "us(colemak)")
USER=b
VISUAL=emacsclient -c -a "" $@
XAUTHORITY=/home/b/.Xauthority
XCURSOR_PATH=/home/b/.icons:/home/b/.guix-profile/share/icons:/run/current-system/profile/share/icons
XDG_CONFIG_DIRS=/home/b/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg
XDG_DATA_DIRS=/gnu/store/ifq7znihd687bgz4gkn9vy1dsk60k7xl-shared-mime-info-1.8/share:/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/share:/gnu/store/hiij9hlxq53w39g0maf67b842j15kw22-gtk+-3.22.30/share:/gnu/store/6zhrh72zsfv4h8jw64rvzs3jcpm1ypmn-modem-manager-1.4.14/share:/gnu/store/n3zml7g3gfp0wgxrwqzairbqx9ab3q8l-network-manager-applet-1.8.4/share:/home/b/.guix-profile/share:/run/current-system/profile/share:/home/b/.guix-profile/share:/run/current-system/profile/share
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_ID=c1
XDG_VTNR=7
 xmodmap ~/.Xmodmap
 xset r rate 180 90;

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-11-12 10:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 15:10 Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch Brendan Tildesley
2018-07-28 19:40 ` Nils Gillmann
2018-07-31 21:54 ` Danny Milosavljevic
2018-08-02  5:52   ` Chris Marusich
2018-08-02  6:21   ` Brendan Tildesley
2018-08-05  0:23     ` Danny Milosavljevic
2018-08-05  0:30       ` Danny Milosavljevic
2018-08-05 11:57       ` Brendan Tildesley
2018-08-12 22:09         ` Danny Milosavljevic
2018-11-12 10:57           ` Brendan Tildesley

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.