Talk:XDG MIME Applications

From ArchWiki

Futher improvement

Would be great to see such detailed explanation for KDE too. --AlexanderR 23:57, 22 January 2012 (EST)

It might be worth to mention that Enlightenment's file browser (in version e19) still uses the depreciated defaults.list file. --Drtebi (talk) 09:01, 25 December 2014 (UTC)

This can be placed in section "File managers" as a subsection for "Application launchers" (Andy Crowd - 蔡依林 14:16, 20 May 2016 (UTC)).

"Reason: The MIME database is located at"

Read here: [1]. "XDG MIME-type database" is in the /usr/share/mime but mimeinfo.cache is located in other folders and updates automatically after update or installation of new programs:

find /usr/ -type f -name "mimeinfo.cache"

(Andy Crowd - 蔡依林 17:05, 23 May 2016 (UTC)).

The section title is "Shared MIME-info database", there are two links to [2] and the update-mime-database.hook updates the database in /usr/share/mime/. The mimeinfo.cache files are different database handled by update-desktop-database.hook. Also, there is an incomplete sentence around the first link. -- Lahwaacz (talk) 17:26, 23 May 2016 (UTC)
Yes, you are right, it must be rewritten and corrected. (Andy Crowd - 蔡依林 22:21, 23 May 2016 (UTC)).
Thanks for the info, Changed and removed template with [3], please proof-read again. Closing. --Indigo (talk) 11:49, 24 May 2016 (UTC)
Well, the description of the "shared MIME-info database" and the "desktop file MIME type cache" are still all mixed up. I can do a rewrite in a few days, so I'll leave this open until then. -- Lahwaacz (talk) 11:14, 25 May 2016 (UTC)

Which application ends up being default "by default"?

Is there a rule for determining which application (.desktop file) is going to handle the mime type in the absence of any explicit config in mimeapps.list? -- Pmartycz (talk) 21:49, 15 November 2016 (UTC)

Yes, see the last paragraph in [4]. -- Lahwaacz (talk) 08:47, 16 November 2016 (UTC)
Well, it doesn't mention what happens when there is no default entry specified in any of mimeapps.list files. The other section states: In the absence of such an entry, the next mimeapps.list is checked. Once all levels have been checked, if no entry could be found, the implementations can pick any of the .desktop files associated with the mimetype. In other words, there is no way to tell which .desktop file is going to be picked as far as the standard is concerned. E.g. if you install a new audio player it might "hijack" associations from your favourite player unless you set an explicit mapping for every supported media type in mimeapps.list (and there are a lot of them for audio). -- Pmartycz (talk) 10:52, 16 November 2016 (UTC)
You are correct that there is no method specified by the standard. The default application in that case is implementation-specific. Silverhammermba (talk) 19:21, 16 November 2016 (UTC)

xdo-open vs xdg-open

xfce4 uses xdo-open for many tasks, eg clicking a link in xfce4-terminal.

There can be browser issues...

The preferred browser needs to be set via the "Preferred Applications" GUI app.

Strangely, exo-web-browser.desktop has no MIME associations by default, so you need to confirm the following exists in ~/config/mimeapps.list:

[Added Associations] x-scheme-handler/http=exo-web-browser.desktop x-scheme-handler/https=exo-web-browser.desktop

Ataraxy (talk)

Inclusion of XDG standard requirements (perl-file-mimeinfo / mimeo) and the following sections explain the requirement for one of these package sets in order to read from the mimeinfo database but I believe it's particularly relevant here since (and somewhat hidden away where it is). Google queries for issues relating to this often lead to this page, which does not make even passing mention of this requirement. CelesteS (talk) 05:47, 22 June 2022 (UTC)