Faulty default file manager association

Hello there,

I’ve tried various file managers during the past months, and right now I’d like to settle with “files”. In my mimeapps.list, it states inode/directory=xfce4-file-manager.desktop.
The problem: if I double-click a folder, Manjaro tries to open the folder with dolphin - which I removed some time ago. So basically, nothing happens.

Could you please instruct me where to look for this pending association between folders and dolphin?

Thank you.

Hi @dejhost, and welcome!

It would seem there are at least two different mimeapps.list files:

$ find ~ -iname 'mimeapps.list'                                                                                                                                                                                                                      

/home/mirdarthos/.config/mimeapps.list
[...]
/home/mirdarthos/.local/share/applications/mimeapps.list

So make sure it’s correct in both of 'em.

@Mirdarthos
Can you provide me resources on how to use “find” utility ?

@Unbeknownst,

Of course!

man find

I reference this one :point_up: every time I intend to use it.

find

Find files or directories under the given directory tree, recursively.
More information: https://manned.org/find.

- Find files by extension:
find root_path -name '*.ext'

- Find files matching multiple path/name patterns:
find root_path -path '**/path/**/*.ext' -or -name '*pattern*'

- Find directories matching a given name, in case-insensitive mode:
find root_path -type d -iname '*lib*'

- Find files matching a given pattern, excluding specific paths:
find root_path -name '*.py' -not -path '*/site-packages/*'

- Find files matching a given size range:
find root_path -size +500k -size -10M

- Run a command for each file (use `{}` within the command to access the filename):
find root_path -name '*.ext' -exec wc -l {} \;

- Find files modified in the last 7 days and delete them:
find root_path -daystart -mtime -7 -delete

- Find empty (0 byte) files and delete them:
find root_path -type f -empty -delete

This is how I learned it, anyway.

:laughing:

1 Like

Hi Mirdathos,
thank you for your welcome and your answer :slight_smile:

In the directory /home/dejhost/.local/share/applications/ there is no mimeapps.list. But it contains a mimeinfo.cache:

[MIME Cache]
application/octet-stream=FoxitReader.desktop;
application/pdf=FoxitReader.desktop;mendeleydesktop.desktop;wine-extension-pdf.desktop;
application/rtf=wine-extension-rtf.desktop;
application/vnd.ms-htmlhelp=wine-extension-chm.desktop;
application/winhlp=wine-extension-hlp.desktop;
application/x-ipynb+json=jupyter-notebook.desktop;
application/x-mswinurl=wine-extension-url.desktop;
application/x-mswrite=wine-extension-wri.desktop;
application/x-wine-extension-ini=wine-extension-ini.desktop;
application/x-wine-extension-msp=wine-extension-msp.desktop;
application/xml=wine-extension-xml.desktop;
image/gif=wine-extension-gif.desktop;
image/jpeg=wine-extension-jfif.desktop;wine-extension-jpe.desktop;
image/png=wine-extension-png.desktop;
text/html=wine-extension-htm.desktop;
text/plain=wine-extension-txt.desktop;
text/vbscript=wine-extension-vbs.desktop;
text/x-bibtex=mendeleydesktop.desktop;
x-scheme-handler/mendeley=mendeleydesktop.desktop;

The file /home/dejhost/.config/mimeapps.list looks like this:

image/png=viewnior.desktop;gimp.desktop
text/plain=mousepad.desktop
video/mp4=vlc.desktop
video/ogg=vlc.desktop
video/x-flv=vlc.desktop
video/x-ms-wmv=vlc.desktop
video/x-ogm+ogg=vlc.desktop
video/x-theora+ogg=vlc.desktop
application/ppdf=FoxitReader.desktop
x-scheme-handler/trash=xfce4-file-manager.desktop
application/geo+json=vivaldi-stable.desktop
text/x-python=code_code.desktop

[Added Associations]
application/vnd.debian.binary-package=org.manjaro.pamac.manager.desktop;
application/pdf=FoxitReader.desktop;
application/x-ms-dos-executable=wine.desktop;
application/x-rpm=org.manjaro.pamac.manager.desktop;
text/plain=org.xfce.mousepad.desktop;
application/xml=org.xfce.mousepad.desktop;
text/x-python=org.xfce.mousepad.desktop;code_code.desktop;
application/x-ipynb+json=code_code.desktop;
image/jpeg=gimp.desktop;
text/x-python3=code_code.desktop;
inode/directory=xfce4-file-manager.desktop;
x-scheme-handler/trash=xfce4-file-manager.desktop;
application/geo+json=vivaldi-stable.desktop;
application/vnd.appimage=org.manjaro.pamac.manager.desktop;

[Removed Associations]
text/x-python=wine-extension-txt.desktop;notepad-plus-plus_notepad-plus-plus.desktop;
inode/directory=dolphin.desktop;

I recently added the last line - with no effect.

No other search results. :frowning:

Well, according to this page then:

Upon trial and error in a docker, I realised what follows.

xfce4-mime-settings reads associations in preference order from:

  1. $HOME/.config/mimeapps.list
  2. /usr/share/applications/mimeinfo.cache

Actual directories are affected by $XDG_CONFIG_HOME, $XDG_CONFIG_DIRS, and $XDG_DATA_DIRS and it is possible to have also a DE specific version of mimeapps.list with higher preference, such as xfce-mimeapps.list.
See Association between MIME types and applications

If the user modifies settings in xfce4-mime-settings, they are saved to $HOME/.config/mimeapps.list.

The file /usr/share/applications/mimeinfo.cache can be created from scratch or updated with the standard utility from freedesktop.org desktop-file-utils

sudo update-desktop-database 

i still don’t know if there is tool to bulk-populate $HOME/.config/mimeapps.list

With respect to my question, apparent idiosyncaracies are solved by inspecting the cache (mimeinfo.cache).

So all I can recommend is deleting the mimeinfo.cache file.

Other, than that, I have no idea.

In xfce like this: Settings-Default Applications-Utilities-File Manager

2 Likes

You got to be kidding me! :joy:

That’s the one. I did not even search for a graphical user interface for this setting.

Thank you so much!

1 Like

Now do me a favour and try and see where and in what file the change was. I want to me a note of it, if I can.

Took me a while - but this seems to be the file we were seeking:

./home/dejhost/.config/xfce4/helpers.rc

Thanks again for helping everybody!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.