Description of problem: eg. if I choose to use okular to view pdf files in systemsettings (kde 4), firefox, thunderbird or epiphany still uses evince by default to read pdf. (this works fine in mga 1) IIRC the module used to determine default application in gtk apps is gio, but I'm not sure. Version-Release number of selected component (if applicable): lib64gio2.0_0-2.31.16-1.mga2 firefox-10.0-2.mga2 thunderbird-10.0-1.mga2 epiphany-3.3.5-1.mga2 How reproducible: always Steps to Reproduce: 1. in kde 4 System Settings/File Associations, choose a default application for pdf files e.g. okular (not evince), 2. try to open a pdf file from firefox e.g. http://cran.r-project.org/doc/contrib/Paradis-rdebuts_fr.pdf 3. result: evince is used by default even if you have explicitly chosen okular as pdf reader.
Created attachment 1517 [details] my ~/.local/share/applications/mimeapps.list kde4-okularApplication_pdf.desktop is the first application for application/pdf, so okular should be used by default to view pdf files cf. freedesktop.org mime-actions-spec specifications / User-specified application ordering http://www.freedesktop.org/wiki/Specifications/mime-actions-spec
Any ideas guys ?
CC: (none) => balcaen.john, dmorganec, doktor5000, fundawang
On a fresh profile in cauldron, the only "Applications" firefox knows are protocols, like mailto, irc, webcal, and SWF files. Only thing i could find upstream was https://developer.mozilla.org/en/How_Mozilla_determines_MIME_Types#File_URIs and https://developer.mozilla.org/en/Document_Loading_-_From_Load_Start_to_Finding_a_Handler In fact, it does not list any MIME type, unlike in Mageia 1.
One of the developers pointed me to the relevant code, or at least parts of it: http://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/unix/nsOSHelperAppService.h#44 and http://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/unix/nsOSHelperAppService.cpp#1382 This is what the shipped default mimetypes.rdf looks like (it's empty): http://mxr.mozilla.org/mozilla-central/source/browser/locales/generic/profile/mimeTypes.rdf I'm currently in touch with some developers who have definitve in-depth information about this, because either mozillazine nor developer.mozilla.org has useful information, as far as i have looked.
Under linux they are asking GNOME: http://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/unix/nsGNOMERegistry.cpp Now it's time for the coders to take a look :)
The bug isn't in mozilla apps (the same code works fine in mga1, epiphany doesn't works), but in the underlying gnome's library (probably gio) used to query the default application for a given mime-type (cf bugreport title).
I reported this bug upstream, because I reproduced it with Opensuse 12.1 KDE4 LiceCD. https://bugzilla.gnome.org/show_bug.cgi?id=669936
Keywords: (none) => UPSTREAMSee Also: (none) => https://bugzilla.gnome.org/show_bug.cgi?id=669936
See https://bugs.mageia.org/show_bug.cgi?id=2051#c7
CC: (none) => davidwhodgins
Hi, This bug was filed against cauldron, but we do not have cauldron at the moment. Please report whether this bug is still valid for Mageia 2. Thanks :) Cheers, marja
Keywords: (none) => NEEDINFO
Blocks: (none) => 2027Keywords: NEEDINFO => (none)
(In reply to Luc Menut from comment #7) > I reported this bug upstream, because I reproduced it with Opensuse 12.1 > KDE4 LiceCD. > https://bugzilla.gnome.org/show_bug.cgi?id=669936 Your upstream report was closed as RESOLVED NOTGNOME - and it was referred to upstream definition of mime-actions - http://freedesktop.org/wiki/Specifications/mime-actions-spec which doesn't seem to exist anymore. This is it: https://web.archive.org/web/20140323171954/http://freedesktop.org/wiki/Specifications/mime-actions-spec/ Anyways, the key seems to be this: https://bugzilla.gnome.org/show_bug.cgi?id=669936#c2 This whole stuff still seems totally bonkers. A quick check for PDF with xdg-mime and gvfs-mime: [doktor5000@Mageia4 ~]$ xdg-mime query filetype malsha1.pdf application/pdf [doktor5000@Mageia4 ~]$ xdg-mime query default application/pdf okularApplication_pdf.desktop [doktor5000@Mageia4 ~]$ LC_ALL=C gvfs-mime --query application/pdf Default application for 'application/pdf': evince.desktop Registered applications: evince.desktop kde4-okularApplication_pdf.desktop inkscape.desktop evince-previewer.desktop gimp.desktop calibre-ebook-viewer.desktop calibre-gui.desktop epdfview.desktop atril.desktop Recommended applications: evince.desktop kde4-okularApplication_pdf.desktop inkscape.desktop evince-previewer.desktop gimp.desktop calibre-ebook-viewer.desktop calibre-gui.desktop epdfview.desktop atril.desktop xdg-mime is OK, gvfs-mime So what do we do about this bug?
More bonkers, applies to default Mageia installation, probably also for mga5. When trying to open a .patch from some GTK application (e.g. Thunderbird) it will open in ... notepad run via wine. ââ[doktor5000@Mageia4]â[13:06:04]â[~] ââââ¼ LC_ALL=C xdg-mime query default text/x-patch kate.desktop ââ[doktor5000@Mageia4]â[13:06:09]â[~] ââââ¼ LC_ALL=C gvfs-mime --query text/x-patch Default application for 'text/x-patch': wine-extension-txt.desktop Registered applications: wine-extension-txt.desktop wine-extension-pyw.desktop juffed.desktop pluma.desktop calibre-ebook-viewer.desktop calibre-gui.desktop libreoffice-writer.desktop kde4-kwrite.desktop kde4-okularApplication_txt.desktop kde4-kate.desktop mousepad.desktop emacs.desktop leafpad.desktop No recommended applications Setting it explicitly via xdg-mime set default: ââ[doktor5000@Mageia4]â[13:06:14]â[~] ââââ¼ browser="kate.desktop" ââ[doktor5000@Mageia4]â[13:06:36]â[~] ââââ¼ xdg-mime default $browser text/x-patch ââ[doktor5000@Mageia4]â[13:07:01]â[~] ââââ¼ LC_ALL=C xdg-mime query default text/x-patch kate.desktop gvfs-mime still doesn't care: ââ[doktor5000@Mageia4]â[13:07:06]â[~] ââââ¼ LC_ALL=C gvfs-mime --query text/x-patch Default application for 'text/x-patch': wine-extension-txt.desktop Registered applications: wine-extension-txt.desktop wine-extension-pyw.desktop juffed.desktop pluma.desktop calibre-ebook-viewer.desktop calibre-gui.desktop libreoffice-writer.desktop kde4-kwrite.desktop kde4-okularApplication_txt.desktop kde4-kate.desktop mousepad.desktop emacs.desktop leafpad.desktop No recommended applications You have to set it to kde4-kate.desktop - I believe that gvfs-mime makes this name up, as there's no desktop file of that name, and also no such definitions in ~/.local/share/applications. gvfs-mime is simply wrong there and should be shot^Wfixed. ââ[â]â[doktor5000@Mageia4]â[13:12:13]â[~] ââââ¼ LC_ALL=C gvfs-mime --set text/x-patch kde4-kate.desktop Set kde4-kate.desktop as the default for text/x-patch ââ[doktor5000@Mageia4]â[13:12:55]â[~] ââââ¼ LC_ALL=C gvfs-mime --query text/x-patch Default application for 'text/x-patch': kde4-kate.desktop Registered applications: kde4-kate.desktop wine-extension-txt.desktop wine-extension-pyw.desktop juffed.desktop pluma.desktop calibre-ebook-viewer.desktop calibre-gui.desktop libreoffice-writer.desktop kde4-kwrite.desktop kde4-okularApplication_txt.desktop mousepad.desktop emacs.desktop leafpad.desktop Recommended applications: kde4-kate.desktop I cannot even see where the wine entries stem from.
Assigning to Gnome maintainer group.
Assignee: bugsquad => gnome
Still valid in current Cauldron, and I've been seeing it ever since Mageia was created. This is really annoying when Firefox starts using Internet Explorer through WINE to open images or PDFs on KDE...
CC: (none) => rverschelde