4

I would like to run Nemo instead of Xfce's default file browser, in my browser.

Per Clean way to run proper file manager from Firefox on Linux I tried to do:

$ mkdir --parents ~/.local/share/dbus-1/services/
$ ln --symbolic /usr/share/dbus-1/services/nemo.FileManager1.service ~/.local/share/dbus-1/services/org.freedesktop.FileManager1.service

To test to see which file manager opens, I ran:

$ dbus-send --dest=org.freedesktop.FileManager1 --type=method_call /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems array:string:"file:///home/" string:""

I then rebooted, but nothing changed. I even copied a few more service files and updated their Name field:

  • /usr/share/dbus-1/services/org.xfce.FileManager.service
  • /usr/share/dbus-1/services/org.xfce.Thunar.FileManager1.service

Again nothing changed and Thunar still opens. It seems like my settings are entirely being ignored.

Any ideas on whats going on, or how can I debug this issue?

1 Answer 1

2

I looked at /usr/share/dbus-1/session.conf, which I didn't modify. This contains <standard_session_servicedirs />. Per dbus-daemon this means ~/.local/share/dbus-1/services/ is included and should take preference over services in /usr/share/dbus-1/services/.

There was nothing relevant in dbus.service logs.

Some googling and Changing DBUS FileManager1 to Krusader says:

There's no solution for auto-launching. If you want a per-desktop override of a given service, start it early. So your question is to your desktop system and to your application in particular: have them launch early and claim the org.freedesktop.FileManager1 service name. And don't quit.

Indeed, looking at my running D-Bus services, there's already a org.freedesktop.FileManager1.

import dbus

session_bus = dbus.bus.BusConnection('unix:path=/run/user/1000/bus')
for service in session_bus.list_names():
    print(service)

Looking at my processes, I have /usr/bin/Thunar --gapplication-service running.

This was started by /usr/share/dbus-1/services/org.xfce.Thunar.FileManager1.service with the contents:

[D-BUS Service]
Name=org.freedesktop.FileManager1
Exec=/usr/bin/Thunar --gapplication-service
SystemdService=thunar.service

Upon killing this process, my config in ~/.local/share/dbus-1/services/org.freedesktop.FileManager1.service works.

There is still no way to disable D-Bus services per Need to provide standardized way to disable services started by dbus (#70) · Issues · dbus / dbus · GitLab.

So in order to fix this issue, in addition to including ~/.local/share/dbus-1/services/org.freedesktop.FileManager1.service, I just killed any Thunar processes on login. Now Nemo shows up when I open it in my web browser.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.