On Wednesday, February 17, 2021 6:30 AM, Thomas Kluyver <[email protected]> 
wrote:

On Tue, 16 Feb 2021, at 23:04, Bollinger, John C wrote:
But that does not imply that some applications should be able to claim to be 
more equal than others with respect to particular file types.

I think Jehan's idea is that applications should be able to claim to be *less* 
equal than others for a given mimetype, i.e. that GIMP could declare 'I can 
open JPEGs, but you should probably use something else by default'. Obviously, 
if the user explicitly set GIMP as the default handler for image/jpeg, it would 
override this priority.

Ok, on re-reading I can see that, but it is even less the GIMP's role to say 
"you should prefer other applications for opening JPEGs" than it is to say "you 
should prefer me for opening XCFs".  Desktop files still are not the right 
place to express policy.  The MIME Applications specification still describes 
the right place(s).

If neither the user nor the system has explicitly configured any default 
application for a given MIME type then it is not reasonable for the user to 
expect the default application for that type to be stable.  If that presents a 
problem for the user then XDG already has a solution: configure their preferred 
default explicitly.  If doing so is unreasonably difficult in some XDG-based 
environment then what is needed is better tools for that environment, not 
changes to the desktop file specification (and all the tools based on it).

Distinguishing things like 'native' and 'equivalent intent' filetypes seems 
tempting, but I suspect it would end up with a lot of awkward grey areas. If 
this is a problem worth solving, I'd be more inclined to make a numeric 
priority scale, something like the shared-mime-info database uses for assigning 
mimetypes to files (which allows e.g. ODT files to be recognised as ODT rather 
than general zip files).

The problem here is that the application to be used to open files of a 
particular type is not an inherent characteristic of the file type, nor of the 
set of available applications that can handle that type.  That's why the user 
has no good reason to expect stability of default application where no specific 
one is configured.  And it's also why the user is mischaracterizing the problem 
if they claim that the GIMP has taken over file associations for a given file 
type -- installing a desktop file simply does not do that, because desktop 
files express no policy.

Another approach to the stability issue (e.g. GIMP 'taking over' the JPEG 
mimetype) is for the desktop to fix it: if you open a JPEG file and there isn't 
already a default application for that, store whatever it uses as the default 
application, so it won't change unless the user manually changes the 
association or uninstalls that application. I think that could be done without 
changing any specs.

Yes.  This would be a manifestation of "better tools" such as I suggested 
above.  It would be an appropriate way to address the issue from the XDG side.


John


________________________________
From: xdg <[email protected]> on behalf of Thomas Kluyver 
<[email protected]>
Sent: Wednesday, February 17, 2021 6:30 AM
To: xdg <[email protected]>
Subject: Re: New `MimeType` fields in .desktop

Caution: External Sender. Do not open unless you know the content is safe.

On Tue, 16 Feb 2021, at 23:04, Bollinger, John C wrote:
But that does not imply that some applications should be able to claim to be 
more equal than others with respect to particular file types.

I think Jehan's idea is that applications should be able to claim to be *less* 
equal than others for a given mimetype, i.e. that GIMP could declare 'I can 
open JPEGs, but you should probably use something else by default'. Obviously, 
if the user explicitly set GIMP as the default handler for image/jpeg, it would 
override this priority.

Distinguishing things like 'native' and 'equivalent intent' filetypes seems 
tempting, but I suspect it would end up with a lot of awkward grey areas. If 
this is a problem worth solving, I'd be more inclined to make a numeric 
priority scale, something like the shared-mime-info database uses for assigning 
mimetypes to files (which allows e.g. ODT files to be recognised as ODT rather 
than general zip files).

Another approach to the stability issue (e.g. GIMP 'taking over' the JPEG 
mimetype) is for the desktop to fix it: if you open a JPEG file and there isn't 
already a default application for that, store whatever it uses as the default 
application, so it won't change unless the user manually changes the 
association or uninstalls that application. I think that could be done without 
changing any specs.

Thomas

________________________________

Email Disclaimer: www.stjude.org/emaildisclaimer
Consultation Disclaimer: www.stjude.org/consultationdisclaimer
_______________________________________________
xdg mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to