User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060513 Ubuntu/dapper Firefox/1.5.0.3 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060513 Ubuntu/dapper Firefox/1.5.0.3 I am not sure this is a bug, but some people think so. The last comments on this bug describe the issue. https://launchpad.net/distros/ubuntu/+source/desktop-file-utils/+bug/35997/ Reproducible: Always
Thunar registers the "Open Folder in Thunar" handler for x-directory/gnome-default-handler, otherwise Firefox (and other software) is not able to use it as file manager. x-directory/gnome-default-handler is, as the name suggests, the default handler for directories (should be renamed to something w/o 'gnome' in its name to avoid confusion). If software (like gnome-panel) wants to use nautilus, it should simply run nautilus. x-directory/gnome-default-handler is not garantied to be nautilus; in fact that would be really useless. Instead it's the user's preferred file manager.
any additional comments? Ubuntu/Gnome packagers disagree with the last one as seen in the LP bug
Well, in a perfect world, Firefox&Co. would use xdg-open... but until Portland gets more attention from the distributions, Firefox&Co. will use x-directory/gnome-default-handler, and so Thunar will have to support that to integrate well with other apps. As a simple (temporary) solution for Ubuntu, I'd suggest to add a wrapper script and register it for x-directory/gnome-default-handler, with the following content: --- #!/bin/sh # have to check nautilus first and fallback to Thunar, since Thunar is # not garantied to run throughout the whole session, while nautilus is # always running in a (default) GNOME session. if pgrep nautilus; then nautilus $@ else Thunar $@ fi --- Probably with some more smartness, but you get the idea. Then don't install nautilus-folder-handler.desktop and Thunar-folder-handler.desktop, but only this smart-folder-handler.desktop. Now when run within a GNOME session, Nautilus will popup, and when run within an Xfce session, Thunar will popup. You could even extend this for KDE. Or if Ubuntu already supports Portland, simply use xdg-open, which already supports Xfce, GNOME and KDE properly.
I have modified Thunar-folder-handler.desktop to only register inode/directory and that seems to be sufficient for the one case I found a file manager being launched by firefox.That is the 'Open containing folder' in the downloads window. I am not sure whether the gnome-default-handler is used by stock firefox or a pre 1.5 version? The 1.5.0.3 one in ubuntu/debian (with whatever patches it has over stock) seems to work with only that mimetype registered by Thunar. Are there other apps which use the gnome-default-handler, or other placesin firefox (although the latter is unlikely as it would be inconsistent)
Ok, so this is fixed.