URGENT: Mate does not remember file type associations

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

URGENT: Mate does not remember file type associations

Postby simplex on Tue Dec 24, 2013 6:28 am

I have searched in this forum and tried to ask this in the original the MATE discussion list (which after 2 days still did not give me permission to post something.

It is urgent because I want to make s special Christmas gift tonight.

I am running the latest LMDE dist-upgrade'd.

Every time I open an mp3 file, totem pops up. I want to have Gnome Mplayer instead. When I select

Right click -> Open with other application > Mplayer -> Do this for all files of this type

Mplayer *once* plays the mp3 file, but MATE then falls back to totem-player on the very next opening of an mp3 file.

What can I do? With the newest Mint 16 on a different machine everything works fine. I have also tried the "Thunar trick" as described somewhere here or in an Ubuntu forum.

As far as I can see, my LMDE uses MATE 1.6

Greetings,
S.
simplex
Level 2
Level 2
 
Posts: 83
Joined: Sat Oct 06, 2012 2:32 pm

Linux Mint is funded by ads and donations.
 

Re: URGENT: Mate does not remember file type associations

Postby Flemur on Tue Dec 24, 2013 10:52 am

Linux's mime implementation is pretty wretched.

First I'd see if there were some other method of changing the default program (use a diff file browser, something from the system menu, etc), because the below is pretty mickey-mouse. Also make sure you checked "Always use this program").

You could also uninstall the player you don't want, then reinstall the one you do want.

If all that fails, delve into the wretchedness:

Look in:
~/.local/share/applications/mimeapps.list
which sorta-kinda shows which apps (ludicrously renamed) open which type of files (but aggregated into different names so you can't really tell the file type without looking at yet another file located somewhere else).

My default program to open mp3 files is "foobaropen", but you won't find "mp3" and "foobaropen" anywhere near each other is any file, rather, just to make things unnecessarily complicated, "mp3" isn't called mp3, so look for a line with "audio/mpeg" referring to a ".desktop" file that has nothing to do with any "desktop":
"audio/mpeg=userapp-foobaropen-8CAM7W.desktop"

Mint came up with the ludicrous name "userapp-foobaropen-8CAM7W.desktop" given the program's name of "foobaropen", and it's in:
~/.local/share/applications/userapp-foobaropen-8CAM7W.desktop

And it looks like:
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=foobaropen %f
Name=foobaropen
Comment=Custom definition for foobaropen

(IIRC, "NoDisplay" misleadingly refers to displaying in a system menu; the program itself DOES "display" when you run it).

So there's a couple of things you could do:

- change the program name in the sillyname.desktop file but leave sillyname the same.
(e.g. change the sillystuff-totem-sillystuff.desktop file to actually point to mplayer.)

- or, better, change which sillyname.desktop the mimeapps.list file points to.
(e.g. change the mimeapps.list file to point to sillystuff-mplayer-sillystuff.desktop.)

What is the .desktop file for mplayer named?

Try this or something similar:
$ sudo find / -iname "*player*.desktop"
and see what you get. In Mint 13 I have a gnome-mplayer.desktop and an mplayer.desktop, in two different places; in Mint16 nothing, because I generally uninstall most of that stuff and use vlc/foobar for all movies/audio.
Mint 16/Xfce/fluxbox, Manjaro/fluxbox, LMDE/MATE
User avatar
Flemur
Level 5
Level 5
 
Posts: 589
Joined: Mon Aug 20, 2012 9:41 pm

Re: URGENT: Mate does not remember file type associations

Postby simplex on Wed Dec 25, 2013 12:11 pm

Hello Flemur,

thank you for your effort. Uninstalling Totem Player was of no use, because MATE then always selected Banshee as the program to play mp3 files. System -> Preferred Applications -> Multimedia is set to Gnome MPlayer, so this is correct.

Before I "delve into the wretchedness", as you call it, one question: Can it be that this is an error in the Caja file browser (V1.6.1)? When I open the desktop with the browser and right click on an mp3 file in the browser to set a default application to play it, I get the same result as on the desktop without the browser: It works once, then falls back to Totem Player.

In Mint 17, this seems to be fixed, so I guess there must be a bug in some part of MATE that LMDE has not yet fixed because it uses older versions of programs.

S.
simplex
Level 2
Level 2
 
Posts: 83
Joined: Sat Oct 06, 2012 2:32 pm


Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 4 guests