Gnome Opening folders in mpv

So. I have a minor annoyance in Gnome.
Pretty standard setup except I have replaced vlc with mpv + installed gitkraken.

Problem I have is that with many programs, if you click on some files, and click open folder, the contents will open with mpv....

Does anyone know I can fix this nonsense? It's driving me nuts.

Thanks in advance all.

What is the output of xdg-mime query default inode/directory in Terminal?

org.gnome.Nautilus.desktop

~/home/.conf/mimeapps.list add this to bottom,
inode/directory=my-file-manager.desktop

right click on file click on open with select program.

Please note I really don't know why questions like this are being asked right click select is the same in any DE including windows, but never mind.

But right clicking is not always an option.
If I view some files in GitKraken and want to open them in a file manager, I right click and choose "Open Folder" and it tried to play any texture files in mpv. Never opens the file manager.

I'm not an idiot... Something is clearly not working as expected.

Also, ~/home/.conf/mimeapps.list doesn't exist.

The file is ~/.config/mimeapps.list and the line in question is inode/directory=.
But from the output you provided, I guess it's already set to inode/directory=org.gnome.Nautilus.desktop

If this line doesn't exist in this file, you can check an other file called mimeinfo.cache located in /usr/share/applications/ for the same line.

Your issue is weird, since Nautilus is already the default application for opening folders/directories in your system. :thinking:

I'll try to search on it further.

Is nautilus even installed? I managed to uninstall nautilus a few time. Also it would be good to know what entries are there in

grep "inode/directory" ~/.config/mimeapps.list

Because mpv shouldnt even be an option for folders, if not set by you in the past.

Odd. for some reason that line was set to inode/directory=mpv.desktop;

Why would that have changed on its own?

This is the full file

[Added Associations]
inode/directory=mpv.desktop;
application/vnd.flatpak.ref=pamac-installer.desktop;
application/x-desktop=org.gnome.gedit.desktop;

[Default Applications]
application/uproject=com.epicgames.UnrealVersionSelector.desktop

Nautilus is most definitely installed. And I haven't manually changed file associations in the past.

This is one of the things that bugs me about Gnome. Why isn't their a GUI for this?

Because there is no need for. Gnome changes that only if the user uses the "open with different programm"-option, or on first start of a new filetype with multiple apps. There is for real no need to a mime-management tool in gnome, that someone needs to develop and maintain.

Maybe some other app messed that up for you. The strange part is that in your file the inode/directory is set to mpv, while via xdg mime its set to nautilus. That should not be possible - except if something edits the file itself, without xdg stuff, or creates a new desktop file to make mpv belong to folders.

Ok, I probably used open with mpv on a folder of videos. You think that set it to default?

Cos I do that all the time in xfce, kde, windows....

Yes! Thats how you change them in Gnome (And macOS).

Oh dear lord -1 for Gnome.

Depends on the user, i think. It's actually something I love on Gnome :joy:

1 Like

What about Nautilus just closing, for no real reason. Or sometimes just not opening at all?

Cos I get that often.

I found an old bug report (currently in ASSIGNED status) which might explain why xdg-mime showed Nautilus as the default application for the inode/directory mimetype, even though mpv was added as an entry in the [Added Associations] of the mimeapps.list file.

https://bugs.freedesktop.org/show_bug.cgi?id=56352

This would explain the confusion. :thinking:

1 Like

Ahh cool. Thanks for the help everyone.

Anyone know anything about this?
Im by no means running a slow system. But currently, nautilus just wont open.

you should look in the journal for crashes or other things, but thats another topic.

What is the journal and how do I check it for crashes?
Sorry. Noob

Forum kindly sponsored by