March 2, 2024

Wrong file manager

Wrong file manager

Tuesday, September 13, 2022, Ralph Hersel

Popped yesterday in our Chat help The following problem appears: If you create a screenshot with the PrintScr key on the GNOME desktop, a notification will open with the “Show in files” option. With normal behavior, it opens the standard file manager Nautilus (GNOME files) and displays the “Images/Screenshots” directory. However, it may be the case for another application, for example opens B. NNN, EasyTag or Audacious, where the latter has nothing to do with file management at all. This behavior is also known in Firefox when you download a file and click “Open target folder” in the download manager.

In the GNOME Desktop System Preferences, there is an option to choose the default programs, but not for the file manager. Also in Nautilus itself, the default implementations for file types (MIME types), but not for the MIME type of the directory (inode/ directory). After some reflection, Lioh provided a hint to solve the problem today.

The solution (and much more) can be found at Liohs Linux course, if you search for “xdg” there. This is what we feel:

xdg-mime query filetype ~

xdg-mime query default inode/directory

The first command specifies the MIME type of the home directory, i.e. inode/manual. The second command asks which standard implementation is responsible for this MIME type, nautilus Right. If there is audible or easytag.desktop or nnn.desktop These apps have hijacked the default file manager. Now you can restore the normal state with this command:

xdg-mime default org.gnome.Nautilus.desktop inode/directory

However, the question is how do you know the correct desktop file name (it can also be nautilus called called). To do this, look in the manual / usr / share / applications To get a reasonable entry or search for nautilus there:

cd /usr/share/applications
ls | grep -i nautilus

Ultimately, the questions are whether it is acceptable for applications to hijack the default file manager’s MIME type. If other file managers do this, eg b. Thunar, NNN, Nemo, I can understand that. With apps like EasyTag or Audacious, I don’t understand this behavior.

See also  Pok√©mon GO: Johto Live Video Tour