Package: mailcap Version: 3.74 Followup-For: Bug #964723 X-Debbugs-Cc: [email protected]
I'm interested in trying to improve this. Many programs read mailcap directly, which makes it challenging to do any kind of dynamic detection, such as *which* desktop's preferences to use. However, the mimeapps.list files do provide one useful piece of information: any application appearing in *any* of them should be prioritized over any application *not* appearing in any of them. Thus, as a first pass, I'd propose doing this: - Read /usr/share/applications/*-mimeapps.list before reading .desktop files. - When generating MIME entries from .desktop files, give entries a priority of 6 if they appear in *any* of the lists, or 4 if they don't. This would already make things better for the common case of having one DE installed, *and* for the case of having more than one. (e.g. for application/pdf, preferring *any* of evince/okular/papers would be better than defaulting to gimp or libreoffice or pdf-presenter-console). This could easily be expanded in the future. For instance, we could have an /etc/alternatives entry for "default-desktop-mimeapps.list", and assign the entries from *that* list priority 7. Or even better, once support for *-mimeapps.list exists, we could generate a /run/user/$UID/mailcap at login time, and make /etc/mailcap a symlink to that. But that could come later, if at all. As a first step, does it seem reasonable to read /usr/share/applications/*-mimeapps.list and prefer the entries in it over the entries not in it? -- System Information: Debian Release: forky/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: arm64 Kernel: Linux 6.16-amd64 (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages mailcap depends on: ii media-types 13.0.0 ii perl 5.40.1-6 Versions of packages mailcap recommends: ii bzip2 1.0.8-6 ii file 1:5.46-5 ii xz-utils 5.8.1-1 mailcap suggests no packages. -- no debconf information

