2

After going through several already-answered questions on AskUbuntu and Unix's stackexchange, Firefox's "Open containing folder" option (when a file is downloaded) still opens folder in Thunar File Manager, even though my default file manager is Nautilus. (However, it's Nautilus that's opened when prompted to save a file, for example, meaning, I guess, that Firefox is somehow aware that Nautilus exists.) I'm on XFCE (Ubuntu 22) so I can't uninstall Thunar without causing core problems (already tried that).

Nautilus (under the name Files) is set a default File Manager. In the GUI of my "Applications by default" app, inode/directory and inode/mount-point are set to Files.

I've tried to modify every mimeapps.list and defaults.list and mimeinfo.cache files possible, every single one of them has the following line:

inode/directory=org.gnome.Nautilus.desktop

(Some of them have also [Default Applications] on the line before)

Except one mimeinfo.cache that has "Catfish" and "Thunar" after Nautilus. But removing mention of Thunar with sudo doesn't change anything.

I also updated /usr/share/dbus-1/services/org.freedesktop.FileManager1.service according to suggestions, that didn't change anything.

I've closed/reopened my user session, also restarted my computer, nothing changed.

What have I missed?

Please don't mark as duplicate, since none of the answers provided in below questions solutioned my problem:

12
  • Did you check firefox settings? Check Setting>General>applications within firefox.
    – mook765
    Aug 25 at 16:04
  • 1
    @vanadium xdg-open ~ does launch Nautilus!
    – Chloé
    Aug 26 at 12:32
  • @mook765 I did... I don't think any "content type" calls Thunar: all "content types" has either "Save file", "Open in Firefox" or "Always ask" related actions, except for "magnet" and "appstream" content types that have "Use system handler (default)" related action. But I don't think it has anything to do with "Open containing folder" option, has it? When Firefox ask where I wan't to save a file, it launches correctly Nautilus. It's only when it opens containing folder of a downloaded file that it launches Thunar.
    – Chloé
    Aug 26 at 12:33
  • Any update? -- Usually I was able to fix similar problem (I'm on Plasma) by modifying the mimeinfo.cache file, but with Thunar something different must be involved. A Thunar-specific question might be needed.
    – cipricus
    Sep 21 at 9:05
  • 1
    @mchid thanks for all these explanations. Sadly, the value of this key is currently 1. I guess I changed it at some point during my hours of research on the matter...
    – Chloé
    Oct 24 at 17:47

1 Answer 1

1

Imagining this is related to my case:

Look at /usr/share/dbus-1/services/ and find:

 org.xfce.FileManager.service
 org.xfce.Thunar.FileManager1.service

Because I was using Dolphin on Kubuntu I had also org.kde.dolphin.FileManager1.service. I have copied the line SystemdService=plasma-dolphin.service from the "dolphin" file into the other two, replacing the corresponding "thunar" lines there.

In your case you should use the variables corresponding to your case, involving "nautilus".

They might look like so:

org.xfce.FileManager.service:

[D-BUS Service]
Name=org.xfce.FileManager
Exec=/usr/bin/Thunar --gapplication-service
SystemdService=nautilus.service

org.xfce.Thunar.FileManager1.service:

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

I am not sure about org.gnome.Nautilus.service: but maybe something like:

[D-BUS Service]
Name=org.freedesktop.FileManager1
Exec=/usr/bin/nautilus --daemon
SystemdService=nautilus.service

Other solutions from my sources (see link), which I haven't tested but are confirmed to work:

  • running killall Thunar at login

  • running systemctl --user mask thunar

I think these solutions cannot be used on a desktop like Xfece (where Thunar is handling the desktop) without further settings that would fully replace Thunar's functions.

5
  • My problem is that I don't have such "SystemdService" line in my org.gnome.Nautilus.service file... I tried systemcl status <service> with nautilus.service, org.gnome.Nautilus.service and gnome.nautilus.service (in place of <service>) but none was a valid service. Is Nautilus even a service ? I confirm that I cannot kill Thunar, otherwise my desktop icons don't work anymore (among other things). Also tried solution proposed there without success...
    – Chloé
    Sep 22 at 20:08
  • @Chloé - for your needs related to uninstaling or killing Thunar, this might be helpful. - Considering I don't have such "SystemdService" line: what happens if you create the files that you don't have? I will post detail contents in my answer. I see here that nautilus.service should exist.
    – cipricus
    Sep 22 at 21:39
  • As a workaround: I think Thunar is rather limited comparatively, but not compared to Nautilus. On the GTK side I find Nemo the most complete file manager (and the one that vaguely stands comparison to Dolphin). I have posted in the previous comment a link to a post I wrote when using Nemo to replace Thunar in Xfce. I am not sure if the solution is similar for Nautilus but Nemo is similar to Nautilus - maybe.
    – cipricus
    Sep 22 at 22:02
  • Thanks for the link. However Nautilus doesn't have the desktop icons capacity anymore so I depend on Thunar to deal with this... / I've added SystemdService=nautilus.service on each file mentioned in your answer, and that didn't change a thing. Kinda hopeless about this, especially after reading the [bugzilla] page(bugzilla.mozilla.org/show_bug.cgi?id=1285711) you mentioned in another answer.
    – Chloé
    Sep 25 at 14:08
  • I think Nemo (which is a Nautilus fork) has the desktop icons capacity... so I don't think the solution could apply to Nautilus. I thought about changing for Nemo and installed it, but I don't like how it looks (so I removed it straight after). I think I'll have to leave with this Firefox-open-in-folder downside (:
    – Chloé
    Sep 25 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.