Question: I'm trying to use Dolphin as file chooser for Firefox in Archlinux instead of Nautilus. I've read [this](https://bbs.archlinux.org/viewtopic.php?id=87574) but it did not solve my problem. The config seems related to firefox as 

```
xdg-mime query default inode/directory
dolphin.desktop

```

Which is right. Also 

```
cat /usr/share/applications/mimeinfo.cache | grep  x-directory/gnome-default-handler
x-directory/gnome-default-handler=kde4-dolphin.desktop;

```

Seems to be right too. What am I missing?

Answer: 
I'd have a similar problem running Manjaro 4.18.9-1. After install nautilus for a test, firefox started to open folders with nautilus, I removed nautilus and firefox then opened folders with Atom.

At least for me, this solution worked:

* Close firefox
* Go to your file manager (Thunar in my case), right click on a folder and click on "open as"
* Mark "use this app as default" and choose your file manager
* Open firefox and see if it worked
Firefox use GIO's GAppInfo. GIO's behaviour is slightly different from xdg-mime's. 
By adding `inode/directory=ranger.desktop` in `$HOME/.config/mimeapps.list`, my firefox can open directory properly.

You can check the diffents between `xdg-mime query default inode/directory` and `gio mime inode/directory`.