mime apps specification

Vladimir Kudrya vladimir-csp at yandex.ru
Tue Apr 15 13:06:49 PDT 2014


On 15.04.2014 23:13, David Faure wrote:
> When looking for the default app, we'll get app2, from the very first file in
> the list.
>
> When looking for the full list of associated apps:
> (the step numbers correspond to the items in the algorithm in the spec) (*)
>
> step 1: result = (), blacklist = ()
> step 2: opening $XDG_CONFIG_HOME desktop-specific list, no Added or Removed
> group, skipping. Then opening $XDG_CONFIG_HOME list.
> step 3: result = (app2)
> step 4: blacklist = (app4)
> step 5 and 6: no desktop files here, skipping
>
> Then moving up one dir, to $XDG_DATA_HOME applications:
> step 3,4: no mimeapps.list found, nothing to do
> step 5: result = (app2, app5)
> step 6: blacklist = (app4, app5)
>
> Then moving up one dir, to $XDG_CONFIG_DIRS list:
> step 3: none
> step 4: blacklist = (app4, app5, app2)
> step 5 and 6: no desktop files here, skipping
>
> Then moving up one dir, to $XDG_DATA_HOME applications, nothing to do
> Then moving up one dir, to $XDG_DATA_DIRS (has both mimeapps.list and apps)
> step 3: nothing (do not append app4 to result since it's in the blacklist)
> step 4: none
> step 5: add app1 and app3 (not app2, it's in the blacklist)
>     => result = (app2, app5, app1, app3)
>
>> Is the result app2.desktop;app3.desktop;app1.desktop;app5.desktop?
>
> No. I think you missed the fact that we go up the dirs in order, and process
> both (or either, whatever is available) mimeapps.list and .desktop files.
> So app5 gets added before we go up to more global dirs.
>

While I was writing this message, you've already answered most of the 
questions in another, so I'm sending the following only as a side notes. 
I'll put updated thoughts in reply to your message the neighboring branch...

------
OK, at least the set is the same, different order...

Why app5 got into blacklist in $XDG_DATA_HOME step 6?

Thank you, now I have more understanding of the algorithm. But maybe I'm 
missing some basic thing here which prevents me from understanding the 
choice of direction. My point of view comes from perceiving the whole 
override thing as the result of actions consecutively applied to some 
inital set. In this case, initial set is $XDG_DATA_DIRS .desktop files. 
And actions - all that goes on the way from that to the user-level.
That view just looks natural and simplier to me, but it does not look 
natural to you. Have you any idea why? Because i'm really curious. Maybe 
some rule i'm [blindly] ignoring, or you [blindly] following?

By the way, the result "app2, app5, app1, app3" can also be achieved by 
going global>local while making additions to the beginning of the list.


More information about the xdg mailing list