Browsers, mail clients, etc. often use xdg-open or gnome-open to display file attachments or downloads. When doing that in XFCE with Thunar 1.1.x (tested .0 and .1), this calls exo-open -> exo-helper-1 -> Thunar $path. When thunar is called that way, i. e. with a single path, it always brings up the file association dialog, even if you click "remember". This does not happen if you click on a file in the Thunar browser. I tested that with a simple .jpg image, with having eog installed.
Keeping notes here: thunar_file_launch() calls thunar_file_get_default_handler() on the file (.jpg in my case), but this returns (lt-Thunar:3995): Thunar-DEBUG: thunar_file_launch(00005.jpg): got app_info = 0x23e8890 (lt-Thunar:3995): Thunar-DEBUG: thunar_file_launch: app_info name=exo-helper-1 exe=/usr/lib/libexo-1-0/exo-helper-1 --launch FileManager %u I. e. this hits the "recursive" case which is guarded in the subsequent code (marked with "HACK") which calls thunar_show_chooser_dialog().
More notes: So, in my GNOME system, g_file_query_default_handler("myphoto.jpg") delivers the correct result: name=Image Viewer exe=eog %U but in my XFCE system (which is severely stripped down admittedly, but also has eog installed) I get name=exo-helper-1 exe=/usr/lib/libexo-1-0/exo-helper-1 --launch FileManager %u If I disable /usr/lib/gio/modules/libexo-module-1.so, then I get the correct answer again, so it seems that exo somehow clobbers the mime handlers which are defined in /usr/share/applications?
For the record, I reported that on exo 0.5.2 (doesn't exist in the Version dropdown in bugzilla), and also confirmed on 0.5.3. Subscribing Nick, since he wrote exo-gio-module/exo-module.c according to the comment in the file. Nick, why does this module overwrite the handler for all file:// URLs? We certainly want exo-helper for http:// etc. URLs, but for files we should rather rely on /usr/share/applications/*.desktop to register the MIME types. If I drop the "file" match from that module, then "exo-open foo.jpg" now does the right thing and opens eog right away (gio -> eog), instead of giving me the chooser dialog through the gio -> exo-helper -> Thunar -> dialog -> eog maze. But maybe I'm missing something here? Thank you, Martin
*** This bug has been marked as a duplicate of bug 6167 ***