Bug 56092 - XFCE .desktop file created for browser selection is broken
Summary: XFCE .desktop file created for browser selection is broken
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.1.0 rc1
Hardware: All Linux (All)
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-17 15:41 UTC by random832
Modified: 2014-09-19 17:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch to convert multi-group desktop file to XFCE WebBrowser helper file (1.90 KB, patch)
2014-09-19 17:16 UTC, Ken Neighbors
Details | Splinter Review

Description random832 2012-10-17 15:41:32 UTC
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.
Comment 1 Ken Neighbors 2014-09-19 17:16:03 UTC
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.
Comment 2 Ken Neighbors 2014-09-19 17:17:12 UTC
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".
Comment 3 Rex Dieter 2014-09-19 17:42:19 UTC
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.