kde ignores file associations program hierarchy

Bug #1076889 reported by Pawel Kierat
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KDE Base
Fix Released
Medium
kde-baseapps (Ubuntu)
Triaged
Low
Unassigned

Bug Description

I have my .jnlp files (application/x-java-jnlp-file) associated to Oracle Java 7 Web Start. However, when I try to open it either by double-clicking in dolphin or through xdg-open command, it starts rekonq even though rekonq is only third application in the program hierarchy (the second program is IcedTea Java Web Start). To open it properly, I have to use Open with... option.
The problem remains even if I remove rekonq from the program hierarchy list.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: dolphin 4:4.8.5-0ubuntu0.1
ProcVersionSignature: Ubuntu 3.2.0-32.51-generic 3.2.30
Uname: Linux 3.2.0-32-generic x86_64
ApportVersion: 2.0.1-0ubuntu14
Architecture: amd64
Date: Fri Nov 9 08:17:26 2012
InstallationMedia: Kubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120820.1)
ProcEnviron:
 LANGUAGE=pl_PL
 LANG=pl_PL.UTF-8
 SHELL=/bin/bash
SourcePackage: kde-baseapps
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Ovidiu Nitan (nitanovidiu) wrote :

Version: unspecified (using Devel)
OS: Linux

It seems that setting a web browser in System Settings - Default Applications - Web browser makes KDE to open XML-based files in browser, even if there's another application associated with that file type. Dolphin, kde-open or xdg-open are affected by this bug. Surprising Konqueror isn't affected by this issue.

Reproducible: Didn't try

Steps to Reproduce:
1. Open System Settings, go to Default Applications -> Web browser, check "in the following browser:" radio button and fill the entry with a browser name.
2. Try to open with Dolphin a XML-based file (I tried with a .cbp CodeBlocks project). The web browser will be launched and will probably offer you to "download" that file. The same thing is happening if you run kde-open /path/to/file or xdg-open /path/to/file.

Actual Results:
The file is opened in webbrowser

Expected Results:
The file should be opened with the application defined in File Associations.

Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

Could you check if the commit for bug 290936 fixes it?

Revision history for this message
In , Ovidiu Nitan (nitanovidiu) wrote :

(In reply to comment #1)
> Could you check if the commit for bug 290936 fixes it?

Nope. I'm on KDE 4.8 now and this issue already exists...

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 292857 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mschoepf (mschoepf) wrote :

I am also affected by this. For me it's .nzb files. Application settings are ignored and always a webbrowser is opened.

Revision history for this message
In , hexatron (rotave) wrote :

(In reply to comment #4)
> I am also affected by this. For me it's .nzb files. Application settings are
> ignored and always a webbrowser is opened.

Can confirm that the above is also affecting me for .nzb files. Only started happening with KDE 4.8

Revision history for this message
In , DA (adawit) wrote :

This is because the browser you specified, which probably is Firefox, supports opening XML files and advertises as such. Only my system firefox.desktop contains the following entry:

MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;

Unfortunately, when you attempt to launch something the KDE launcher first checks to see if external browser are defined and whether or not those browsers are capable of handling the requested resource. If that is, the document is launched with the external browser. Konqueror's desktop files do not contain any text/xml in their MimeType entry and as such are not affected by this problem.

Anyhow, this issue is caused by the same code that causes another closely related bug# 182591. When that bug is addressed eventually, this one will probably get resolved as well.

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 294112 has been marked as a duplicate of this bug. ***

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 295665 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cyberbeat-p (cyberbeat-p) wrote :

I am also affected, for example .odt files are opened with chromium instead of libreoffice (the first choice in "open-with")

Revision history for this message
In , Jens-rutschmann (jens-rutschmann) wrote :

(In reply to comment #6)
> This is because the browser you specified, which probably is Firefox,
> supports opening XML files and advertises as such. Only my system
> firefox.desktop contains the following entry:
>
> MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.
> xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
>
> Unfortunately, when you attempt to launch something the KDE launcher first
> checks to see if external browser are defined and whether or not those
> browsers are capable of handling the requested resource. If that is, the
> document is launched with the external browser. Konqueror's desktop files do
> not contain any text/xml in their MimeType entry and as such are not
> affected by this problem.
>
> Anyhow, this issue is caused by the same code that causes another closely
> related bug# 182591. When that bug is addressed eventually, this one will
> probably get resolved as well.

Hi,
I'm also affected by this and modified /usr/share/applications/firefox.desktop to not contain text/xml (which by the way does not match the real mimetype "application/xml").

Unfortunately this didn't help. For now I did not specify a default browser at all - which works.

Is there a better workaround ?

Revision history for this message
In , Ovidiu Nitan (nitanovidiu) wrote :

Yes, I also tried by creating a script which just call my favourite browser and passes all received arguments (so no .desktop file for it). After I set it up in the System Settings as my default browser, but XML files are still opened with the web browser (in fact, with my script) instead of the associated application.

Revision history for this message
In , Jens-rutschmann (jens-rutschmann) wrote :

Is there anyone looking into this? I'd be glad to test any patches / provide more info.
Unfortunately I don't have any development experience in C++/Qt and the KDE platform itself and have no idea to where to start looking into this, otherwise I'd might try it myself.

This bug is really annoying since I right now I have to decide between:
- being able to double-click XML files (which I need very often)
- being able to click on links in akregrator / skype, etc. (which I also do quite often)

Furthermore, is this really a bug in Konqueror, since this issue is associated with the "Konquerer" product.

Again, if I can do anything to help fixing this, just ask.

Revision history for this message
In , Cyberbeat-p (cyberbeat-p) wrote :

*** This bug has been confirmed by popular vote. ***

Revision history for this message
In , Paulo Fidalgo (o-kanniball-o) wrote :

This don't happens only on Konqueror, with Dolphin I have the same behaviour.

Revision history for this message
In , Jens-rutschmann (jens-rutschmann) wrote :

Apparently it even occurs in Ark, when I double-click an XML file inside a ZIP, JAR, etc.
Instead of using the kate part it uses the konqueror part for the preview which is not helpful at all.

This is driving me nuts, does anyone have an idea where to start looking for the issue ?

Revision history for this message
In , Torsten Römer (dode) wrote :

I have a clean new installation of kubuntu 12.04 and configured KDE to open XML files with kate or kwrite, and it keeps on opening them with rekonq. When I uninstall rekonq, it complains that it is not installed and then opens the file with kwrite.
Only when I change the standard webbrowser from rekonq to "an application that is based on url contents" it finally works.
This is very confusing, because the standard browser setting mentions only http and https urls, so why does it affect XML files?

Revision history for this message
In , Cyberbeat-p (cyberbeat-p) wrote :

this bug seems fixed for me in dolphin kde/4.8.3

Revision history for this message
In , Ovidiu Nitan (nitanovidiu) wrote :

Not for me: still occurs in KDE 4.8.3 (Dolphin)

Revision history for this message
In , Jens-rutschmann (jens-rutschmann) wrote :

Not fixed for me as well (Gentoo, KDE 4.8.3)
Still the same behaviour.

Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

*** Bug 300208 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Tcppmm (tcppmm) wrote :

Not fixed. (Gentoo, KDE 4.8.3)
Problem with *.fb2 files.

Revision history for this message
In , Dweeble01103 (dweeble01103) wrote :

can confirm still problem in 4.9beta

Revision history for this message
In , mogliii (mogliii) wrote :

Also .svg from Dolphin in Kubuntu 12.04, 4.8.3. Not using inkscape as it should.

Revision history for this message
In , Jens-rutschmann (jens-rutschmann) wrote :

I'm also experiencing the following probably related issue:

When I open a ZIP / JAR file in Ark and double click an included XML file, then the Konqueror kpart seems to be used for the preview instead of the text editor kpart.

Did anyone else observe this as well ?

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 302549 has been marked as a duplicate of this bug. ***

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 303068 has been marked as a duplicate of this bug. ***

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 291287 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rakuco-h (rakuco-h) wrote :

I wonder if bug 201162 could also be marked as a duplicate of this one (even if it's older, the issue seems to be being tracked further here).

Revision history for this message
In , DA (adawit) wrote :

(In reply to comment #28)
> I wonder if bug 201162 could also be marked as a duplicate of this one (even
> if it's older, the issue seems to be being tracked further here).

It is not entirely the same issue. However, if the user sets their own default browser, then previewing XML files in ark does indeed get broken the same way the scenario mentioned in this bug report.

However, even with the fix proposed for this bug the issue in ark preview will remain unless the user or the distro changes the preference order of embedded parts for XML files types.

Revision history for this message
In , DA (adawit) wrote :

Git commit d4af904d455c8348d128568f87beb4f74099578e by Dawit Alemayehu.
Committed on 07/07/2012 at 21:08.
Pushed by adawit into branch 'KDE/4.9'.

Do not use the user's default browser configuration to open XML files.
FIXED-IN: 4.9.0
REVIEW: 105476

M +3 -3 kio/kio/krun.cpp

http://commits.kde.org/kdelibs/d4af904d455c8348d128568f87beb4f74099578e

Revision history for this message
In , Jens-rutschmann (jens-rutschmann) wrote :

(In reply to comment #30)
> Git commit d4af904d455c8348d128568f87beb4f74099578e by Dawit Alemayehu.
> Committed on 07/07/2012 at 21:08.
> Pushed by adawit into branch 'KDE/4.9'.
>
> Do not use the user's default browser configuration to open XML files.
> FIXED-IN: 4.9.0
> REVIEW: 105476
>
> M +3 -3 kio/kio/krun.cpp
>
> http://commits.kde.org/kdelibs/d4af904d455c8348d128568f87beb4f74099578e

I applied the patch on top of 4.8.3 and XML based files are opened correctly when double-clicked in dolphin.
But in Ark those files are still previewed with the konqueror kpart. Do I need to update some config file for that ?

Revision history for this message
In , Rakuco-h (rakuco-h) wrote :

(In reply to comment #31)
> I applied the patch on top of 4.8.3 and XML based files are opened correctly
> when double-clicked in dolphin.
> But in Ark those files are still previewed with the konqueror kpart. Do I
> need to update some config file for that ?

Please see Dawit's comment #29 and the comments in bug 201162 -- to open things correctly in Ark you need to go to System Settings, choose File Associations, choose the "application/xml" mimetype and put Katepart before the browser KParts in the "Embedding" tab.

Revision history for this message
In , Jens-rutschmann (jens-rutschmann) wrote :

Thanks, I forgot about the embedded tab.
FIXED :-)

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 295296 has been marked as a duplicate of this bug. ***

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 306085 has been marked as a duplicate of this bug. ***

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 306786 has been marked as a duplicate of this bug. ***

Revision history for this message
In , adaptee (adaptee) wrote :

*** Bug 307579 has been marked as a duplicate of this bug. ***

Revision history for this message
Pawel Kierat (pkierat) wrote :
Revision history for this message
JThoennes (joerg-thoennes) wrote :

Related KDE bugs seems to be fixed:
- https://bugs.kde.org/show_bug.cgi?id=291177

So when will this ported to 12.04 LTS

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kde-baseapps (Ubuntu):
status: New → Confirmed
Revision history for this message
JThoennes (joerg-thoennes) wrote :

This bug is still existing in the newest 12.04.2 LTS will reportedly corrected in KDE 4.9:
- https://bugs.kde.org/show_bug.cgi?id=156544

So I wonder when this will be included into Ubuntu 12.04 LTS.

Changed in kde-baseapps (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
In , Rael Gugelmin Cunha (rael-gc) wrote :

I'm using KDE 4.10.2 and my default browser (Chrome) is still trying open a lot of documents NOT configured for it (like .doc files, by example).

Changed in kde-baseapps:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
In , Hugo Costelha (hugo-costelha) wrote :

Opening System Settings --> Default Applications --> Web Browser (on the left) and changing "Open hhtp and https URLs" "in an application based on the contents of the URL", together with the "associations" changes solved the issue for me. This, however, seems very non intuitive.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.