Discussion:
Proposal: database(s) of file types and URI schemes
Thomas U. Grüttmüller
2017-08-29 00:58:09 UTC
Permalink
Hello list,

When I get emails with a PDF attachment, Icedove (aka Thunderbird) tries
to open it with The GIMP. This always makes me angry, because I would
like it to open it with Atril (the Evince clone that preserves the menu
bar), and I can’t find the right configuration option to change this
behaviour. So my current “solution” is to open the file with GIMP, kill
GIMP and then open the file manually, while it is still in /tmp.

Setting file types in ROX filer is pretty straightforward, but there are
no defaults at all, and – as the example above shows – other programs
don’t care about these settings.

So my idea is: it would be neat if there was a common database of file
types, accessible by all programs, that contains information about which
program to use to open files of a specific type.


The second issue is about URI schemes. I have noticed that Firefox has
no idea how to open geo:, irc: or tel: URIs. It just responds: “This
address wasn’t understood”. So I also propose to also have a common
database of URI schemes, accessible by all programs, that contains
information about which program to use to open URIs of a specific scheme.

Greetings,
Thomas
Vladimir Kudrya
2017-08-29 04:33:15 UTC
Permalink
Hello.

Things you describe already exist:
https://specifications.freedesktop.org/mime-apps-spec/latest/
and 'x-scheme-handler' notation is there for uri's.

The problem is that Firefox and Thunderbird do not follow the spec properly.

https://bugzilla.mozilla.org/show_bug.cgi?id=296443 this bug is still 'new'.
Post by Thomas U. Grüttmüller
Hello list,
When I get emails with a PDF attachment, Icedove (aka Thunderbird)
tries to open it with The GIMP. This always makes me angry, because I
would like it to open it with Atril (the Evince clone that preserves
the menu bar), and I can’t find the right configuration option to
change this behaviour. So my current “solution” is to open the file
with GIMP, kill GIMP and then open the file manually, while it is
still in /tmp.
Setting file types in ROX filer is pretty straightforward, but there
are no defaults at all, and – as the example above shows – other
programs don’t care about these settings.
So my idea is: it would be neat if there was a common database of file
types, accessible by all programs, that contains information about
which program to use to open files of a specific type.
The second issue is about URI schemes. I have noticed that Firefox has
no idea how to open geo:, irc: or tel: URIs. It just responds: “This
address wasn’t understood”. So I also propose to also have a common
database of URI schemes, accessible by all programs, that contains
information about which program to use to open URIs of a specific scheme.
Greetings,
Thomas
_______________________________________________
xdg mailing list
https://lists.freedesktop.org/mailman/listinfo/xdg
Thomas U. Grüttmüller
2017-08-30 02:40:52 UTC
Permalink
Hi
Post by Vladimir Kudrya
https://specifications.freedesktop.org/mime-apps-spec/latest/
and 'x-scheme-handler' notation is there for uri's.
The problem is that Firefox and Thunderbird do not follow the spec properly.
https://bugzilla.mozilla.org/show_bug.cgi?id=296443 this bug is still 'new'.
So there is a common database, but Thunderbird ignores it. Okay, then
for now the best way seems to be to configure it manually in
Thunderbird: Edit→Preferences→Attachments→Incoming.

Thank you for the links. The whole thing looks very complicated; I was
expecting something simple like this:

*.pdf: atril, gimp, xpdf
*.xcf: gimp
*.gif: eog, firefox, gimp

In this case the first entry would be the default.

…But in reality, there is one one database that defines the file
extensions of mime types, one database that defines the mime types each
program can handle and one database that defines the default program, if
there are more than one. That looks really complicated.

I still have some questions:

1. Is there an API, or will the individual programs have to manually
parse these files?

2. I can imagine a problem when several file types share the same
extension. *.doc can be a Microsoft Word file or a GST 1st WordPlus file
or a plain text file. Is there a solution to this?

3. One solution would be that different system users interpret the
extensions differntly. Is it possible to customize the MIME-info
database on a per-user base?

4. Some programs are installed locally in a user’s home directory. Is it
possible to create *.desktop files that are used only by one user?
Where would they go?

5. Some system wide *.desktop files might be annoying to certain users.
Is there a way a user may blacklist them?

6. Are there graphical tools to configure these things?

Greetings,
Thomas
Eike Hein
2017-08-30 03:00:30 UTC
Permalink
Hi Thomas,

the answers to basically all your questions are 'yes' and found in
greater detail in the various specs on freedesktop.org, with full
implementations in KDE, Gnome and others linked from the website.


Cheers,
Eike

Loading...