! 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 !
file associations not remembered
Status:
RESOLVED: FIXED

Comments

Description Yves-Alexis Perez editbugs 2010-01-17 15:33:24 CET
Hey,

since the switch to Thunar 1.1.0, file associations are not remembered. When trying to open any file, Thunar asks for the application to open with.

I wonder if it might be related to #5383 (but as it's the mime cache, I guess not)
Comment 1 Yves-Alexis Perez editbugs 2010-03-06 10:48:03 CET
Any idea about that?
Comment 2 Martin Pitt 2010-08-10 10:13:28 CEST
Yves-Alexis,

I notice this behaviour when Thunar is called with a file argument (e. g. "Thunar mypic.jpg"), which happens through exo when you use xdg-open or gnome-open. This is usually the case for e. g. browser downloads or email attachments. Clicking on a file in the Thunar browser opens immediately.

Did you mean MIME associations, or do you also get that in the thunar browser window?
Comment 3 Yves-Alexis Perez editbugs 2010-08-10 11:12:32 CEST
Hmhm, I'm not on the box right now but I'll check that and return back. But it could very well be the case (which means it's not linked to MIME associations indeed)
Comment 4 Yves-Alexis Perez editbugs 2010-08-11 06:33:36 CEST
Ok, confirmed, it's only when running “thunar <file>” that the problem happens (so exo-open too). Not when double-clicking on the file from thunar itself.
Comment 5 Martin Pitt 2010-08-11 07:07:03 CEST
Ah, then http://bugzilla.xfce.org/show_bug.cgi?id=6627 might be a duplicate of this. I filed that yesterday with a possible workaround, and a question about a possible alternative implementation.
Comment 6 Jannis Pohlmann editbugs 2010-10-19 15:54:50 CEST
*** Bug 6627 has been marked as a duplicate of this bug. ***
Comment 7 Jannis Pohlmann editbugs 2010-10-19 16:03:14 CEST
This has been bugging me for a while, too. So while experiencing the same issue
when calling the Launch() D-Bus method, I decided to fix it. See below for a
detailed explanation and the commit ID (the fix has been pushed to Thunar
master).

commit 8fae46156ce617d3639486e10a3d91b878c75f17
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Tue Oct 19 15:53:11 2010 +0200

    Change how Thunar picks the default handler for a file (bug #6167).

    It appears that g_file_query_default_handler() prefers URI scheme
    handlers over content type handlers. This is inappropriate if we want to
    open a file for which we already know the content type (as is the case
    with most local files).

    Using g_file_query_default_handler() as the only way to pick the default
    handler for a file somewhat collides with exo-gio-module, which sets the
    default handler for a few URI schemes, such as http:// and file://.

    This was problematic only when launching a file from outside (e.g. by
    running "Thunar <file>" or by calling the D-Bus Launch() method. In
    internal situations, Thunar used thunar_file_list_get_applications()
    which prioritizes the content type.

    We now use g_app_info_get_default_for_content_type() first and only fall
    back to g_file_query_default_handler() if the content type is unknown or
    we don't have a default handler for it.
Comment 8 Jannis Pohlmann editbugs 2010-10-19 16:23:08 CEST
*** Bug 6422 has been marked as a duplicate of this bug. ***

Bug #6167

Reported by:
Yves-Alexis Perez
Reported on: 2010-01-17
Last modified on: 2010-10-19
Duplicates (2):
  • 6422 thunar doesn't remember associations
  • 6627 Always asks for program to open with when called through xdg-open

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Additional information