KDE/Konqueror, RT attachments, and OpenOffice

I’ve come across an interesting problem which is not specific to RT, but
is related to viewing certain attachments in RT via the Konqueror
browser - thought I would share my experience here to save others the
pain. Specifically I think its a bug in Konqueror and I’ll be posting
as a bug in bugs.kde.org as well.

A few of my users were complaining about RT being slow - and after some
testing I found that firefox was the issue - and switching them to
konqueror (3.5.10) made a huge difference - its very fast by comparison.

But with konqueror - Ticket attachments for OpenOffice documents (odt,
ods, doc, xls, etc) wouldn’t open. Specifically OpenOffice would
generate this message: “Error reading data from the Internet. Server
error message: 503 Service Unavailable.”

After alot of digging, I found that the problem lies in the Exec line in
the system “.desktop” files.

OpenOffice can handle URLs, so the Exec line is defined under (k)ubuntu
in ooo-writer.desktop as:

Exec=ooffice -writer %U

Konqueror uses kioexec for downloading, which follows the conventions
defined here:
http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html , and thus launches OpenOffice with the http URL of the link to the attachment. Because there are no authentication credentials, OO cannot access the URL thus the 503 error.

Changing the desktop entry to use “%f” instead of “%U” fixes the problem

  • the file gets saved to a temp directory and OpenOffice launches with a
    local document - which is how firefox behaves.

But this breaks things like sftp:// urls because it downloads the file -
even though OpenOffice can handle sftp urls properly.

So konqueror, being both a file browser and a web browser, has adopted a
common approach to URL handling which doesn’t work in the real world (of
authenticated web sessions).

-Bob

I’ve come across an interesting problem which is not specific to RT, but is related to viewing certain attachments in RT via the Konqueror browser - thought I would share my experience here to save others the pain. Specifically I think its a bug in Konqueror and I’ll be posting as a bug in bugs.kde.org as well.

A few of my users were complaining about RT being slow - and after some testing I found that firefox was the issue - and switching them to konqueror (3.5.10) made a huge difference - its very fast by comparison.

But with konqueror - Ticket attachments for OpenOffice documents (odt, ods, doc, xls, etc) wouldn't open.  Specifically OpenOffice would generate this message: "Error reading data from the Internet.  Server error message: 503 Service Unavailable."

After alot of digging, I found that the problem lies in the Exec line in the system ".desktop" files.

OpenOffice can handle URLs, so the Exec line is defined under (k)ubuntu in ooo-writer.desktop as:

Exec=ooffice -writer %U

Konqueror uses kioexec for downloading, which follows the conventions defined here: http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html , and thus launches OpenOffice with the http URL of the link to the attachment.  Because there are no authentication credentials, OO cannot access the URL thus the 503 error.

Changing the desktop entry to use "%f" instead of "%U" fixes the problem - the file gets saved to a temp directory and OpenOffice launches with a local document - which is how firefox behaves.

But this breaks things like sftp:// urls because it downloads the file - even though OpenOffice can handle sftp urls properly.

So konqueror, being both a file browser and a web browser, has adopted a common approach to URL handling which doesn't work in the real world (of authenticated web sessions).

-Bob  

The 3.5 tree of KDE is no longer being actively maintained. Can you please run these tests on a system running KDE 4.3 beta 2? This would help make sure that the issue is still present and needs dealt with. Also, please file it under KIO in KDE’s bugzilla.

/me takes his KDE developer hat off now…

Gary L. Greene, Jr.
IT Operations
Minerva Networks, Inc.
Cell: (650) 704-6633
Phone: (408) 240-1239