Ubuntu – Kubuntu 12.04 Firefox and Rekong don’t know how to open downloaded files

firefoxkubuntumime-typerekonq

I just installed Kubuntu 12.04 beta 1.

Both Rekong and Firefox don't know how to "Open Containing Folder" for downloaded items. They also don't know how open the item itself. (I'll give the specific error below.)

Furthermore, if I manually tell Firefox (in the dialog) to remember the file associations, that creates a new problem. Every file opens in Dolphin first, then Dolphin opens the correct application. (It could almost be a feature instead of a bug, but it gets annoying at times.)

My installation is missing the file /usr/share/applications/mimeinfo.cache.
I'm also missing /usr/share/applications/defaults.list and ~/.local/share/applications/mimeapps.list. If anyone has default copies of those files for this build, I would appreciate copies. I think they may help me resolve this. (Anyone else see those files missing?)

Details:

Rekong is installed by default and the problem is present in a standard configuration.

To reproduce, download a file with Rekong. Then go to Downloads > Open directory (of the downloaded file). The result is:

Error: rekonq does not know how to handle this protocol: 

The same situation exists in Firefox. I used the included Kubuntu menu item to install Firefox. No problems with the installation, everything standard.

But when I download an item (e.g., a JPG image) with Firefox and then choose to either open it or open the containing folder, I get a dialog titled "launch application" and I have to "choose an application". Once I choose an application, telling Firefox to remember it leads to the problem above: Every file opens in Dolphin.

It seems that Firefox doesn't know the mime types. However, Dolphin does know the mime types.

More info:

In Firefox preferences > Applications, the only content types shown are irc, ircs, mailto, podcast, tar file, webca and webfeed. Normally, there would be many more.

I tried deleting mimeTypes.rdf (as mentioned in a Mozilla Knowledge Base article) in my Firefox profile and it did not resolve the issue.

I also tried copying a known good complete Firefox profile from my other computer (Linux Mint 12). Once I began using that profile, it also had the problem under Kubuntu 12.04.

Here's some more info:

$ cat ~/.local/share/applications/mimeapps.list  
cat: /home/user/.local/share/applications/mimeapps.list: No such file or directory

$ cat /usr/share/applications/defaults.list  
cat: /usr/share/applications/defaults.list: No such file or directory

Unfortunately, copying those files from a working Ubuntu installation did not resolve the issue. It had seemingly no impact.

The default applications for handling files in Dolphin works correctly.

I have been continuing to research this. I was reading this knowledge base article: http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions

It says, "All versions of Firefox and SeaMonkey will use an installed and enabled plugin to open a downloaded file by default, based on its MIME type."

I checked and the only plugin installed in Firefox is Skype Buttons for Kopete. Nothing else. On my Linux Mint install, there are a number of plugins, including Gnome Shell Integration. Could missing plugins be the issue?

There's a similar question here with no solution.

Here's a question where the problem sounds almost identical, but the solution is unrelated. I'm working with a new, fresh installation of Kubuntu and I don't have any other DE installed.

Best Answer

Here is a workaround for the Firefox problem from Canonical support:

1) stop firefox
2) rm ~/.mozilla/firefox//mimeTypes.rdf
3) start firefox
4) download a file
5) open it from the downloads menu and choose the application. Browse to /usr/bin /xdg-open. then check to remember your choice

Now both open and open containing folder should work. You can then change the preferred programs through kde's file associations settings.
NOTE: I have confirmed that this solution works. It's a workaround, but in some ways it is an improvement over the original Firefox approach (for KDE users).

Regarding Rekonq, I was in the kubuntu-devel IRC channel recently speaking to a developer. He said he was putting through a fix for the Rekonq issue. I believe it is in place now. I'm told that that after 'apt-get upgrade rekonq' has been run on Kubuntu 12.04 beta1 that this Rekonq bug is gone. EDIT: yes, I have confirmed this fix too.