Bug 162500 - krunner opens URLs as local file
Summary: krunner opens URLs as local file
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 163447 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-23 04:31 UTC by Elias Probst
Modified: 2009-02-02 14:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The new krunner showing the item for mydomain.com (15.01 KB, image/png)
2008-05-23 17:01 UTC, Elias Probst
Details
Proposed fix (1.23 KB, patch)
2008-05-25 10:30 UTC, Jakub Stachowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Probst 2008-05-23 04:31:47 UTC
Version:           (SVN rev. 811436) (using Devel)
Installed from:    Compiled sources

When launching the URL item shown as result (Go to http://mydomain.com) when typing mydomain.com or a similar URL into krunner, this starts Konqueror trying to open the file:///home/username/mydomain.com

Expected behaviour:
The URL launcher should really open http://mydomain.com as it is shown in krunner as the result label.
Comment 1 Brian Vuyk 2008-05-23 15:57:13 UTC
Can't reproduce on KDE 4.0.3 / Konq 4.0.3. (Kubuntu)
Comment 2 Elias Probst 2008-05-23 17:01:44 UTC
Created attachment 24916 [details]
The new krunner showing the item for mydomain.com

So this bug was probably introduced by the new krunner, which replaced the
previous one in SVN some days ago.
Attached is a screenshot showing the new krunner how it looks when entering
mydomain.com into the input field.
Comment 3 Jakub Stachowski 2008-05-25 10:30:07 UTC
Created attachment 24928 [details]
Proposed fix

For search terms like www.kde.org runner cannot rely on determineType() from
RunnerContext because it will return UnknownType. Instead it should rely on
match.data() created earlier by match().
Comment 4 Thiago Macieira 2008-05-26 15:21:34 UTC
SVN commit 812821 by thiago:

Fix opening of URLs without the leading "http://" part. Based on a
patch by Jakub S.

The matcher code already determines that this is a network location,
but it requires calling processUrl again to re-add the "http"
protocol.

BUG:162500


 M  +8 -6      locationrunner.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=812821
Comment 5 Jakub Stachowski 2008-06-07 15:44:17 UTC
*** Bug 163447 has been marked as a duplicate of this bug. ***
Comment 6 Olivier Subilia 2009-02-02 14:30:51 UTC
I'm using the brand new KDE 4.2 (kubuntu intrepid) and there is at least still a problem with urls that don't contain a dot.

Example:
localhost/mydir doensn't do anything.

The same for every custom domain name that I introduced in /etc/hosts.

Example of /etc/hosts:

127.0.0.1 localhost
127.0.0.1 myapachetest
192.168.1.2 theothercomputerofmylocalnetwork portable

you can't type 'myapachetest' or 'portable' in krunner: it doesn't do anything.

I had found a workaround that functionned in kde 4.1: typing 'myapachetest.' or 'myapachetest./mywebpage' (notice the dot) had as an effect the name being interpreted as an URL (and consequently being proposed to be open in konqueror). But with kde 4.2, this doesn't function anymore.

Would it be possible to read /etc/hosts ? Would it be possible to propose to open http://unrecognized/address every time krunner doesn't understand with what to open 'unrecognized/address' ?

Best regards

Olivier Subilia