Open Bug 1285711 Opened 4 years ago Updated 26 days ago

Firefox does not use default file manager


(Core :: Widget: Gtk, defect, P5)

47 Branch





(Reporter: myaverageorange, Unassigned)



(Keywords: dupeme, Whiteboard: tpi:-)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160623084759

Steps to reproduce:

Save a file OR open the containing folder from the downloads window. Using Fedora 24 with Cinnamon 3.0.6.

Actual results:

Firefox opens Nemo, which is not my default file manager.

Expected results:

Firefox should have opened Thunar, which is set as my default file manager on Fedora 24 + Cinnamon via mimeapps.list and mimeinfo.cache and modifications to .desktop files.

This is a known problem:
Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
Keywords: dupeme
Whiteboard: tpi:-
Hi. I have the same issue (years ongoing), but I would like to add something to this bug report.

I've noted that in Nightly 53.0a1 the Downloads pane action "Open Downloads Folder" opens the Downloads directory in the default file manager, while the icon next to a download ("Open Containing Folder") opens the directory in the wrong file manager.

This is probably helpful to fix the issue.
I'm seeing this issue as well. I'm using Fedora 25 51.0.1 and gnome. When I open folders, I get Dolphin instead of Nautilus.
I'm also seeing this issue. I'm using Kubuntu 14.04.5 LTS and Firefox 54.0 (64-bit). Firefox just refuses to use Dolphin (system default) - even after changing MIME fies, etc... Also I get the same problem with Thunderbird 52.1.1 (64-bit). It looks like a general Mozilla app Linux bug
In case this helps someone else having the issue... I was actually writing this up to post a "me too" post but the issue went away after I ran 'killall nautilus'... perhaps there is some weird behavior related to that... or the gremlin in the system got bored and took a nap... who knows. Also, I did not reboot my system during any of these or my other debug steps.

Firefox: 59.0.2 (64-bit)
OS: Linux Mint 18.2

Steps to recreate:
1. visit
2. Right-click on an image and click Save Image As > Save to your Downloads folder
3. Press Ctrl+Shift+Y to bring up recent downloads
4. Click the icon button next to the download and observed that it does not open the default file manager (nemo) but instead opens nautilus. I was able to confirm it by running the following from the command line and seeing the window close:
 killall nautilus

5. Running the killall command also seemed to fix my issue. From that point on, I observed that clicking the button correctly opened Nemo

Here is some system configuration info to assist in others having the issue:

$ inxi -S
System:    Host: ***** Kernel: 4.13.0-41-generic x86_64 (64 bit) Desktop: Cinnamon 3.4.6
           Distro: Linux Mint 18.2 Sonya

$ uname -a
Linux mintbox 4.13.0-41-generic #46~16.04.1-Ubuntu SMP Thu May 3 10:06:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/linuxmint/info
EDITION="Cinnamon 64-bit"
DESCRIPTION="Linux Mint 18.2 Sonya"
GRUB_TITLE=Linux Mint 18.2 Cinnamon 64-bit

$ grep "directory" ~/.config/mimeapps.list

$ grep "directory" /usr/share/applications/mimeapps.list
grep: /usr/share/applications/mimeapps.list: No such file or directory

$ grep "directory" /usr/share/applications/mimeinfo.cache

$ grep "directory" /usr/share/applications/defaults.list 

$ echo "Note: I had created this while FF was running but it didn't see to fix the issue." > /dev/null;
$ grep "directory" ~/.local/share/applications/mimeapps.list

$ xdg-open
-> opens in Nemo
Nevermind.. the gremlin just stepped out for a minute. The bug is back. killall does NOT resolve...

anyway, my configuration is posted above. I'll probably do a fresh OS install when Mint 19 comes out and see if the issue is still around. Might do a fresh FF install too if this request is ever added:
This bug still exists for Kubuntu 14.04\Firefox 59.0b10. Konqueror file manager has no problem using the correct file manager but don't really want have to to use Konqueror open files. I am not sure which file manager Firefox launches but is a real pain to use as you can only select files using the right-click a couple of times and all too easy to drag files around in error. Please Mozilla fix this.
Duplicate of this bug: 1470408
Gentoo official Firefox ebuild with default USE flags.
As referenced:
Steps to reproduce:

1. Happen to have both Nemo and Nautilus file managers installed
2. Either:
- Use the "Open file" menu option
- Try to download anything
- Try to upload anything

Actual results:

Firefox opens Nautilus *even though* nemo is the default. `xdg-mime query default inode/directory` yields "nemo.desktop", `xdg-open` used on a directory opens Nemo, `cat /usr/share/applications/mimeinfo.cache | grep directory` yields "inode/directory=nemo.desktop;org.gnome.Nautilus.desktop;"

Expected results:

Nemo should be used instead.

some problem
xdg-mime query default inode/directory is Thunar but firefox use dolphin .
I wonder: is it so difficult to fix this bug?

Since upgrading to Ubuntu 18.04 (from 14.04) this problem has gone away. i.e. Firefox(Quantum) uses Dolphin as the default file manager.

Unfortunately it is too late for me to confirm whether it was the Firefox upgrade (to Quantum) or Ubuntu (18.04) that fixed it but for now I am happy.

Firefox quantum on gentoo :the problem is still there!! have you try to change default file-manager ?

(In reply to from comment #10)

have you try to change default file-manager ?

I have this too, Alberto.
My default is set to thunar and firefox keeps opening nautilus.
When I use xdg-open, thunar openes the path.
When I try through firefox, nautilus opens the path.

Post Script

Further information:

My OS is Kubuntu 18.04 (Ubuntu + KDE Plasma desktop).

Here it looks like Firefox gets the default file manager from KDE -> System Settings -> Personalisation -> Applications -> File Associations -> inode -> Directory where Application Preference Order shows Dolphin at the top of the list followed by Gwenview, PCManFM File Manager.

Duplicate of this bug: 1527063


This affects me as well.

Arch linux, FF 67.0.4

grep inode/directory /usr/share/applications/mimeinfo.cache

the default file browser is pcmanfm for the user, xdg-open . opens it in pcmanfm, but open directory with downloads from FF make it with thunar

Hello, I can sadly confirm this being an ugly bug (as it breaks workflows) in firefox for years.
On KDE Neon (dolphin being default filemanager) firefox (70.0.1 at the moment) does not care about any settings mentioned above, it always opens containing folder in "nemo" here.
One has to rename /usr/bin/nemo AND execute a "killall nemo" before, then xdg settings are respected.

This means that Firefox must have some file manager settings hard coded in.

It is also incomprehensible to me why it has not been possible to fix this for years now.

I would like to update, this one bug is reproducible regardless of the new or stable profile.

This is my mime related state:

> xdg-mime query default inode/directory
> locate exo-file-manager.desktop
> grep Exec /usr/share/applications/exo-file-manager.desktop
Exec=exo-open --launch FileManager %u
> strace -fe file exo-open --launch FileManager . 2>&1 | grep exec
execve("/usr/bin/exo-open", ["exo-open", "--launch", "FileManager", "."], 0x7ffec39324e8 /* 55 vars */) = 0
[pid 92006] execve("/usr/lib/xfce4/exo-2/exo-helper-2", ["/usr/lib/xfce4/exo-2/exo-helper-"..., "--launch", "FileManager", "."], 0x7ffe24c49f20 /* 55 vars */) = 0
[pid 92009] execve("/usr/bin/pcmanfm", ["/usr/bin/pcmanfm", "."], 0x7ffe00edda90 /* 55 vars */) = 0

If you could say, how to find the place, where FF triggers the file manager, I'll be happy to help.

Just to complete, my state is:

me@mypc:~$ xdg-mime query default inode/directory

me@mypc:~$ locate kfmclient_dir.desktop

me@mypc:~$ grep Exec /usr/share/applications/kfmclient_dir.desktop
Exec=kfmclient openURL %u inode/directory

me@mypc:~$ kfmclient openURL /tmp inode/directory
QUrl("file:///tmp") mimetype= "inode/directory"
me@mypc:~$ # line above started konqueror (which i prefer as file manager) with /tmp, as expected

me@mypc:~$ strace -fe file kfmclient openURL /tmp inode/directory 2>&1 | grep exec
execve("/usr/bin/kfmclient", ["kfmclient", "openURL", "/tmp", "inode/directory"], 0x7ffda58414e8 /* 61 vars */) = 0
[pid  6765] stat("/usr/lib/x86_64-linux-gnu/qt5/libexec/drkonqi", 0x7fff4a956fa0) = -1 ENOENT (No such file or directory)
[pid  6765] stat("/usr/lib/x86_64-linux-gnu/libexec/drkonqi", {st_mode=S_IFREG|0755, st_size=858368, ...}) = 0
[pid  6765] access("/usr/lib/x86_64-linux-gnu/libexec/drkonqi", X_OK) = 0
me@mypc:~$ # again, konqueror opened /tmp

If you search "Open Containing Folder" on you will find "<!ENTITY "Open Containing Folder">". So obviously one has to search for "". Since I'm not a developer, I can't find the corresponding function (method) that starts the file manager. This snippet could be so revealing - does anyone find it?

I figure out that it is due to the use of the org.freedesktop.FileManager1 d-bus service from . The solution is to change the implementation of the d-bus service (see /usr/share/dbus-1/services/org.xfce.Thunar.service).

For example, for Thunar we have the following in /usr/share/dbus-1/services/org.freedesktop.FileManager1.service:
[D-BUS Service]
Exec=/usr/bin/Thunar --gapplication-service

How is this still a problem after 4 years?

Same problem here. Default file manager is spacefm, it is used throughout the system. Only firefox persists on using Thunar for some godforsaken reason. Linux Mint 19 Xfce, inode/directory=spacefm.desktop wherever applicable.

I have this problem as well - when I click to show file in folder, it opens Thunar instead of Nautilus.
But I saw the issue also exists in Chrome, so maybe it's not Firefox related anymore?

I am using Fedora 32 with GNOME and FF is from repository (not flatpak).

You need to log in before you can comment on or make changes to this bug.