Bug 494345

Summary: PDF is associated with the GIMP - Okular is available
Product: [openSUSE] openSUSE 11.1 Reporter: Geoff Cutter <gcutter>
Component: GNOMEAssignee: Stanislav Brabec <sbrabec>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: kde-maintainers, vuntz
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 11.1   
Whiteboard: desktop-interop
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Geoff Cutter 2009-04-13 15:21:05 UTC
My concern would be whether or not the file
/usr/share/applications/defaults.list
is supplied with the line

application/pdf=gimp.desktop

I can't remember changing it, even indirectly. No doubt gimp is always
available, but if okular is I suppose okular should be selected.

------- Comment #3 From Maksim Orlovich 2009-04-13 03:23:10 (-) [reply] ------- 
That file is provided by your distribution
Comment 1 Geoff Cutter 2009-04-14 00:59:48 UTC
Reporter address is now geoff.cutter at gmail.com .
Comment 2 Vincent Untz 2009-04-28 15:23:37 UTC
/usr/share/applications/defaults.list is generated from /etc/gnome_defaults.conf with "SuSEconfig --module glib2".

The reason it's happening is explained in /etc/gnome_defaults.conf:

# If application in this list is installed, it is used as default in GNOME.
# It works in following way:
# 1. Read this file.
# 2. Collect all available desktop files.
# 3. Go through all declared MIME types and search for default application
#    for defaults.list in following order:
# 3.1 Installed application listed here for certain MIME type.
# 3.2 Installed application listed here as preferred default.
# 3.3 Installed application listed here as default.
# 3.4 Installed application with GNOME in Categories.
# 3.5 Installed application with GTK in Categories.
# 3.6 Installed application.
# If there are more applications in the same order, it uses pseudo-randomly
# one of them (last in aplhabetical order).

It turns out you don't have evince (which would satisfy 3.3 here for pdf), so you end up with GIMP for pdf since it has GTK in Categories.

Now, in which case is this an issue? Are you using GNOME or KDE?
Comment 3 Stanislav Brabec 2009-04-29 12:16:55 UTC
KDE user would want okular. The same problem as bug 456026 => KDE needs different defaults.list. I guess that some XDG path magic plus a small modification of the script would fix it.

*** This bug has been marked as a duplicate of bug 456026 ***