3

Each time I go to about:support and click on "Open Directory", Firefox opens it with SMPlayer and then mpv/mplayer complains about :

  Playing: /home/sebastien/.mozilla/firefox-esr/empty6/persdict.dat
Failed to recognize file format.
Exiting... (Errors when loading file)

So I've searched "smplayer" in about:preferences#applications but couldn't find it.

I've also searched for "smplayer" in about:config but couldn't find it either.

And finally I've searched in the XDG mimes types definitions :

$ xdg-mime query filetype ~/.mozilla/firefox-esr/empty6/persdict.dat
text/plain
$ xdg-mime query default text/plain
kate.desktop
$ xdg-mime query filetype ~/
inode/directory
$ xdg-mime query default inode/directory
dolphin.desktop

EDIT 0 : Adding a few xdg-open commands :

$ xdg-open ~/.mozilla/firefox-esr/empty6/persdict.dat
Fontconfig warning: ignoring C.UTF-8: not a valid language tag
$ pgrep -af /persdict.dat
32659 /usr/bin/kate -b /home/sebastien/.mozilla/firefox-esr/empty6/persdict.dat
$ xdg-open Documents
Fontconfig warning: ignoring C.UTF-8: not a valid language tag
$ pgrep -af /Documents
8437 /usr/bin/dolphin --icon system-file-manager -caption Dolphin /home/sebastien/Documents

EDIT 1 : inode/directory= entry in ~/.local/share/applications/mimeapps.list :

$ grep inode/directory= ~/.local/share/applications/mimeapps.list
inode/directory=dolphin.desktop;smplayer.desktop;kde4-dolphin.desktop;vlc.desktop;caja-2.desktop;kde4-kfmclient_dir.desktop;kde4-gwenview.desktop;easytag.desktop;nemo.desktop;audacious-qt.desktop;Thunar-folder-handler.desktop;qmmp_cue.desktop;audacious.desktop;kde4-k4dirstat.desktop;pcmanfm.desktop;qmmp_dir.desktop;qmmp_enqueue.desktop;
inode/directory=dolphin.desktop

EDIT 2 : The Dolphin application launcher is not found by Firefox because it's in the kde4 subfolder of /usr/share/applications/ :

$ locate /dolphin.desktop
/usr/share/applications/kde4/dolphin.desktop

Explanation : Firefox couldn't find dolphin.desktop in /usr/share/applications/, therefore it was using the next entry for inode/directory mimetype in ~/.local/share/applications/mimeapps.list file which was smplayer.desktop :

$ grep inode/directory= ~/.local/share/applications/mimeapps.list
inode/directory=dolphin.desktop;smplayer.desktop;kde4-dolphin.desktop;vlc.desktop;caja-2.desktop;kde4-kfmclient_dir.desktop;kde4-gwenview.desktop;easytag.desktop;nemo.desktop;audacious-qt.desktop;Thunar-folder-handler.desktop;qmmp_cue.desktop;audacious.desktop;kde4-k4dirstat.desktop;pcmanfm.desktop;qmmp_dir.desktop;qmmp_enqueue.desktop;
inode/directory=dolphin.desktop

Solution : Thanks to ashvatthama's anwser : To solve this pb., you can type this command :

xdg-mime default kde4-dolphin.desktop inode/directory

and now it works fine :

$ pgrep -af /empty6
29083 dolphin --icon system-file-manager -caption Dolphin /home/sebastien/.mozilla/firefox-esr/empty6

I've seen this bug for years, I'd love to solve it.

Can you help me ?

  • 1
    Please edit the question title to clearly reflect your question. – vanadium Jun 17 at 18:39
  • @vanadium Just edited the title, is it better ? – SebMa Jun 17 at 19:51
  • 1
  • 1
    Much clearer now - it puts the reader on the right foot. Strange issue, though. – vanadium Jun 18 at 5:38
  • If you would go to a terminal and give the command xdg-open Documents, would it also attempt to open Documents with SMPlayer? – vanadium Jun 18 at 5:41
3
$ grep inode/directory= ~/.local/share/applications/mimeapps.list
inode/directory=dolphin.desktop;smplayer.desktop;kde4-dolphin.desktop;vlc.desktop;caja-2.desktop;kde4-kfmclient_dir.desktop;kde4-gwenview.desktop;easytag.desktop;nemo.desktop;audacious-qt.desktop;Thunar-folder-handler.desktop;qmmp_cue.desktop;audacious.desktop;kde4-k4dirstat.desktop;pcmanfm.desktop;qmmp_dir.desktop;qmmp_enqueue.desktop;
inode/directory=dolphin.desktop

$ grep inode/directory= /usr/share/applications/mimeinfo.cache
inode/directory=Thunar-folder-handler.desktop;kde4-kid3.desktop;kde4-gwenview.desktop;kde4-dolphin.desktop;kde4-kfmclient_dir.desktop;nautilus.desktop;caja-folder-handler.desktop;audacious-qt.desktop;nautilus-folder-handler.desktop;pcmanfm.desktop;audacious.desktop;baobab.desktop;nemo.desktop;

so what you should do is edit both of these files so that the lines starting with inode/directory say inode/directory=dolphin.desktop and nothing else.

EDIT: subfolders

According to the XDG Desktop Entry specification:

Desktop File ID

Each desktop entry representing an application is identified by its desktop file ID, which is based on its filename.

To determine the ID of a desktop file, make its full path relative to the $XDG_DATA_DIRS component in which the desktop file is installed, remove the "applications/" prefix, and turn '/' into '-'.

For example /usr/share/applications/foo/bar.desktop has the desktop file ID foo-bar.desktop.

so you didn't need to make a symlink from dolphin.desktop to kde4/dolphin.desktop, you could have just specified kde4-dolphin.desktop to xdg-mime etc.

| improve this answer | |
  • You're right. But the thing is I have multiple desktop environments installed on this PC (KDE,XFCE,LXDE), each of them having their own default file managers. – SebMa Jun 18 at 7:34
  • I see, then at least you should remove the smplayer.desktop bit – ashvatthama Jun 18 at 7:35
  • Yes. I was trying to edit it and somehow it was being written by another daemon. Now, the file size is 0 so I'm going to remove it. Now, I've just re-defined the inode/directory to dolphin.desktop with this command : xdg-mime default dolphin.desktop inode/directory – SebMa Jun 18 at 7:37
  • did xdg-mime default fix the issue? – ashvatthama Jun 18 at 7:51
  • Yes and No. Yes because firefox does not use SMPlayer anymore but No because it does NOT use Dolphin either. – SebMa Jun 18 at 7:58

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.