! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
"Open with" always changes default - order of MIME type associations changes ...
Status:
RESOLVED: WORKSFORME

Comments

Description Bakhelit 2018-10-29 15:15:02 CET
Dear XFCE developers,

The order of MIME type associations offered in Thunar "Open with" context menu changes based on what was the last used association. This is reproducible at least with Thunar 1.6.11 (on my main system - Debian Stretch) and with Thunar 1.8.2 (on my VM system - Debian Stretch + Thunar and its dependences from Sid/Stretch Backports). An example to better illustrate this:

In the "/etc/xdg/mimeapps.list" I have the following defined for "image/jpeg":

image/jpeg=geeqie.desktop;gimp.desktop;firefox-esr.desktop;pto_gen.desktop;display-im6.q16.desktop;

This means that when I open JPG file in Thunar I want it to always use the viewer program by default (Geeqie). But instead every time I for example open some JPG files for editing using GIMP then GIMP becomes the default association for JPG. Thus, it is like I would have edited "/etc/xdg/mimeapps.list" to have the following defined for "image/jpeg" (the preferred order changes):

image/jpeg=gimp.desktop;geeqie.desktop;firefox-esr.desktop;pto_gen.desktop;display-im6.q16.desktop;

This is quite annoying especially for MIME types that have more than 2 associations, because then the remaining associations are shown in a submenu of the Thunar context menu. It is not ok when your preferred and most frequently used application for the given MIME type gets reordered into a submenu. Not to mention the surprise when one just double clicks on a file in Thunar and the file opens using a non-default association (e.g. opening an image causes the whole GIMP to start instead of just quickly viewing it in Geeqie, which is my preferred association). If this dynamic changing of MIME type associations is desired by some I sugest at least an option to disable this is added to Thunar or XFCE settings.

Anyways big thanks for developing XFCE and Thunar in a way that offers a customizable and non-bloated desktop experience at the same time (I think its quite rare nowadays:).

Best Regards
Bakhelit
Comment 1 alexxcons editbugs 2018-10-29 23:08:11 CET
Thanks for reporting! I can reproduce the problem on master.

Though I cannot tell when I will find time to look into it, my thunar TODO list is already very long :X

Patches are always welcome, and would speed up things !
Comment 2 Theo Linkspfeifer editbugs 2019-04-17 20:45:59 CEST
*** Bug 15271 has been marked as a duplicate of this bug. ***
Comment 3 Theo Linkspfeifer editbugs 2019-04-18 13:56:17 CEST
I see the described behavior when there is no default application assigned to a MIME type. So, your mimeapps.list is probably missing the following information:

[Default Applications]
image/jpeg=geeqie.desktop

If you use the "Open With Other Application..." menu entry and enable the "Use as default for this kind of file" checkbox, the file ~/.config/mimeapps.list should be updated accordingly.
Comment 4 Theo Linkspfeifer editbugs 2019-04-20 22:26:09 CEST
Also, see: https://bugzilla.xfce.org/show_bug.cgi?id=12493
Comment 5 Bakhelit 2019-04-29 15:15:28 CEST
Thanks for info about the "[Default Applications] ..." section, it seems to work. Hopefully it will also work for the "/etc/xdg/mimeapps.list" file (did not test so far). Until now i kept my MIME type associations ordered which previously worked, but I guess it is time for updating my config files and scripts:). Feel free to close this bug.
Comment 6 Bakhelit 2019-05-01 17:25:31 CEST
I just finished my configs changes and can confirm that the "[Default Applications] ..." section works ok also for the "/etc/xdg/mimeapps.list" file.

On my XFCE this results in a stable system wide default MIME type associations configuration with the usage based reordering of remaining MIME type associations. One can also quickly restore the system wide MIME type ordering by deleting the "~/.config/mimeapps.list" file (if both the "[Default Applications]" and "[Added Associations]" sections are configured in the "/etc/xdg/mimeapps.list" file). Thus, the automatic usage based reordering can be temporary, which seems a reasonable design to me.

Bug #14811

Reported by:
Bakhelit
Reported on: 2018-10-29
Last modified on: 2019-05-01
Duplicates (1):
  • 15271 "Open with" always changes default

People

Assignee:
Xfce Bug Triage
CC List:
5 users

Version

Attachments

Additional information