Bug 769305

Summary: patches for unknown DE
Product: [Fedora] Fedora Reporter: Marcus Moeller <marcus.moeller>
Component: xdg-utilsAssignee: Rex Dieter <rdieter>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: pertusus, rdieter, sokoloff.a
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-02 19:52:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
xdg-mime Patch
none
xdg-open Patch
none
xdg-mime.in.diff for comment 2 (2011-12-21 14:02:23)
none
xdg-open.in.diff for comment 2 (2011-12-21 14:02:23)
none
Patched xdg-mime for comment 2 (2011-12-21 14:02:23)
none
Patched xdg-open for comment 2 (2011-12-21 14:02:23) none

Description Marcus Moeller 2011-12-20 13:33:37 UTC
Created attachment 548838 [details]
xdg-mime Patch

In order to get Razor-qt to work correctly, some patches to xdg-mime and xdg-open are required.

Comment 1 Marcus Moeller 2011-12-20 13:34:31 UTC
Created attachment 548839 [details]
xdg-open Patch

Comment 2 Alexander Sokolov 2011-12-21 19:02:23 UTC
The first name of the bug is invalid. The patch does not contain any changes specific for the Razor. Changes are suitable for all "unknown" DE.

If the scripts knows DE, it uses DE-specific tools like kde-open or gvfs-open.
So all trubles occur when DE was not detected.

1. Improvement in xdg-mime 
The defapp_fallback function searches default application only in the ~/.local/share/applications/defaults.list. I added the defapp_fallback that recurse scans .desktop files in $XDG_DATA_DIRS/applications and search deafult app based on InitialPreference line. The algorithm is similar KDE.

2. Improvement in xdg-open
The open_generic_xdg_mime The function does not search .desktop files recursively. I added a recursive search.

I attach diffs for source xdg-mime.in & xdg-open.in. And already fixed files for the tests.

Comment 3 Alexander Sokolov 2011-12-21 19:04:54 UTC
Created attachment 549068 [details]
xdg-mime.in.diff for comment 2 (2011-12-21 14:02:23)

Comment 4 Alexander Sokolov 2011-12-21 19:05:25 UTC
Created attachment 549069 [details]
xdg-open.in.diff for comment 2 (2011-12-21 14:02:23)

Comment 5 Alexander Sokolov 2011-12-21 19:06:22 UTC
Created attachment 549071 [details]
Patched xdg-mime for comment 2 (2011-12-21 14:02:23)

Comment 6 Alexander Sokolov 2011-12-21 19:07:38 UTC
Created attachment 549073 [details]
Patched xdg-open for comment 2 (2011-12-21 14:02:23)

Comment 7 Marcus Moeller 2011-12-21 19:08:50 UTC
renamed bug according to Alexanders hint.

Comment 8 Rex Dieter 2012-03-02 18:32:25 UTC
sorry for the delay, I'll try to carve out some time today to review your contribution (and thanks! by the way).

Comment 9 Rex Dieter 2012-03-02 18:38:27 UTC
patch commited upstream (thanks!),

http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=687127b9cd9c858491fd5e3109a6ad1ab06be396

I'll review a few others, and see about spinning up a build for some testing and feedback.

Comment 10 Rex Dieter 2012-03-02 19:52:03 UTC
test build for rawhide,
http://koji.fedoraproject.org/koji/taskinfo?taskID=3847653