Make Firefox for Linux use Dolphin to ‘Open Containing Folder’

When I click on the Download Manager icon on the tool bar, Firefox for Linux 32.0 opens a small pane listing downloads in progress, if any, and a link ‘Show All Downloads’. If I click on the link, Firefox pops up a window listing all the files downloaded via the browser, each with a folder icon beside it. Hovering the mouse pointer over the folder icon displays a tooltip ‘Open Containing Folder’. For as long as I can remember with Firefox for Linux, clicking that folder icon resulted in the Audacious music player launching and playing an MP4 file that happens to be in my ~/Downloads/ directory!

Firstly, I have no idea why Firefox was launching a media player instead of opening the directory. Secondly, I have no idea why Firefox wanted to open that specific file rather than any of the other files in the directory. Thirdly, I have no idea why it was launching Audacious, because Audacious is not even specified as the default media player for MP4 files in KDE’s ‘System Settings’ > ‘File Associations’.

This has annoyed me for a long time, but only today did I resolve to fix it, although it was not so easy to find a working solution by searching the Web. It seems it is a common problem with Firefox in Linux, and I found threads in various forums recommending the creation of a set of preferences by using about:config. Some of those threads state that one of those preferences should specify Konqueror; other threads state that one of the preferences should specify a shell script. In the end I discovered a post in an openSUSE Forums thread from 2012 Re: How use Dolphin to “open containing folder” from firefox downloads? providing a broken link to a thread at a different Web site and, fortunately, quoting the solution which worked for me, which is to create a file named ~/.local/share/applications/defaults.list containing the following:

[Default Applications]
x-directory/normal=kde4-dolphin.desktop;kde4-kfmclient_dir.desktop;

Now when I click on the ‘Open Containing Folder’ icon in Firefox, Dolphin launches and displays the contents of ~/Downloads/ just as I would have expected from the beginning.

About Fitzcarraldo
A Linux user with an interest in all things technical.

3 Responses to Make Firefox for Linux use Dolphin to ‘Open Containing Folder’

  1. jlindgren90 says:

    Instead of editing the file by hand, you can run:
    $ xdg-mime default kde4-dolphin.desktop inode/directory

    • Fitzcarraldo says:

      Thanks for your comment. The command you listed also gives me the desired result.

      The command adds two entries to the file ~/.local/share/applications/mimeapps.list:

      $ diff ~/.local/share/applications/mimeapps.list ~/mimeapps.list.bak
      64d63
      < inode/directory=kde4-dolphin.desktop
      89d87
      < inode/directory=kde4-dolphin.desktop

      The first entry was inserted at the bottom of the existing list under [Added Associations] and the second entry was inserted at the bottom of the existing list under [Default Applications].

      It is now unnecessary to have the file ~/.local/share/applications/defaults.list (which I have read has been deprecated in favour of the file ~/.local/share/applications/mimeapps.list, although in my installation the former, if present, is still being used as well). I have therefore deleted ~/.local/share/applications/defaults.list.

  2. Pingback: Confluence: Björn Duderstadt

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: