Bug 162500

Summary: krunner opens URLs as local file
Product: [Plasma] krunner Reporter: Elias Probst <mail>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: christian.nitschkowski, futilite
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: The new krunner showing the item for mydomain.com
Proposed fix

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