XFCE requires a special format of .desktop file for what it calls "helpers". This requirement is handled by the check_xfce_desktop_file function in xdg-settings. The function "converts" an existing application .desktop file by removing the Type line and adding the so-called custom tweaks it requires. This breaks when the application .desktop file has multiple sections (for example, the chromium-browser.desktop that is present on Ubuntu). I propose that instead of "converting" an existing application .desktop file, when an existing XFCE helper .desktop file is not found it should create a minimal one with only the necessary content. This would match more closely to what what is done by XFCE's own preferred applications GUI when you browse for a path to select a browser. It should be noted that the GUI always creates "custom-WebBrowser.desktop" rather than [application].desktop, but this behavior does not appear to be important and I am not sure yet if it is desirable (I need to do more testing with how Chromium detects that it is not the default browser to be sure). I have already started working on a new version of this function, but have not finished testing yet. I will attach it later this week.
Created attachment 106561 [details] [review] patch to convert multi-group desktop file to XFCE WebBrowser helper file I made this patch against the "1.1.0 rc3" version obtained from the git repository on 2014-09-18.
I ran into this problem when selecting "Google Chrome" as my default in XFCE. Upon starting Google Chrome it would report "Google Chrome isn't your default browser" and I would click "Set as default". But when I later ran another application (KeePassX), it would say there was no default browser set, and would ask me to choose one (using the XFCE prefferred application chooser), so I would choose "Google Chrome" again. When Google Chrome was restarted, it would again say it was not the default, and this cycle would endlessly repeat unless you click "Don't ask again" and just set it in the XFCE preferred application chooser. I found the root cause of this problem is the broken XFCE helper file created by xdg-settings when encountering a desktop file with multiple groups, such as those used to support "X-Ayatana-Desktop-Shortcuts".
Patch applied, thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.