Reply to topic

Problem opening URL from an application

User avatar NickElliott
Registered Member
Posts
236
Karma
3
OS
My audio player (aTunes) provides web links to articles on the web, when clicked these links used to open the target web page in my browser but now the Kate text editor opens and displays the source code of the web page.

According to the developer of aTunes nothing has changed in the app; it simply presents a URL which should be opened by the default application on my system.

I don't think I've changed anything on my system, and when I look at File Associations under System Settings I can't see anything wrong.

Can anyone help?

Thanks

Nick


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar Hans
Administrator
Posts
3125
Karma
20
OS
What's your setting in System Settings -> Default Applications -> Web Browser? Which file associations did you look at?


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

Image
10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar NickElliott
Registered Member
Posts
236
Karma
3
OS
System Settings -> Default Applications -> Web Browser is set to Opera

File Associations:
- type html (*.htm and *.html) is set to Opera
- type plain (including *.txt) is set to Kate
- there are lot's more and I'm not sure which, if any, I should change

Here's an example of a URL sent from the aTunes application:
http://www.lastfm.com/music/Eurythmics/+wiki?setlang=en


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar bcooksley
Administrator
Posts
18642
Karma
83
OS
If you try and open a similar URL through KRunner, what is the effect? Is KWrite still launched?


System Settings and Device Actions KCM maintainer
Image
User avatar NickElliott
Registered Member
Posts
236
Karma
3
OS
No, it opens the web page directly in Opera.

There's a clue, I'm guessing the problem isn't to do with KDE system settings!

aTubes is a Java application, perhaps this is something to do with it.


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar bcooksley
Administrator
Posts
18642
Karma
83
OS
Try running "xdg-open <url>" and see what happens.


System Settings and Device Actions KCM maintainer
Image
User avatar NickElliott
Registered Member
Posts
236
Karma
3
OS
This also opens the web page in Opera


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar bcooksley
Administrator
Posts
18642
Karma
83
OS
Is it possible for you to find out from the author of aTunes as to what command it invokes to launch the web browser?


System Settings and Device Actions KCM maintainer
Image
User avatar NickElliott
Registered Member
Posts
236
Karma
3
OS
Yes, I will ask, he's very helpful.

I'll let you know, thanks for you help.


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar NickElliott
Registered Member
Posts
236
Karma
3
OS
Here is the info from the developer:
Code: Select all
Desktop.getDesktop().browse(uri);
Desktop is the class java.awt.Desktop:

There doesn't seem to be anything in specific in File Associations for URI's


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar bcooksley
Administrator
Posts
18642
Karma
83
OS
Unfortunately my searching has not revealed how Java determines which application to launch under Linux. All the documentation simply says that it launches the operating system default browser, which isn't helpful here. It definitely seems to be invoking something related to KDE somehow though...

Can you see if this issue occurs under a new user?


System Settings and Device Actions KCM maintainer
Image
luebking
Registered Member
Posts
928
Karma
7
stupid question:
is it a canonocal url (not: "ubuntu" but "http://www.foo.bar/" instead "www.foo.bar") and/or a local file?
in case: it's remote and canonical, does it happen with _every_ url (because the server may hand it by the wrong type)
User avatar NickElliott
Registered Member
Posts
236
Karma
3
OS
bcooksley wrote:Unfortunately my searching has not revealed how Java determines which application to launch under Linux. All the documentation simply says that it launches the operating system default browser, which isn't helpful here. It definitely seems to be invoking something related to KDE somehow though...
You may have touched on something here, in the past when links did work they would open - not in my system default browser (Opera) - but in Firefox, or if Firefox wasn't installed they would open in Konqueror. I concluded this was a Java issue and spent a lot of time investigating but did not find a solution.


bcooksley wrote:Can you see if this issue occurs under a new user?
I will report back.


luebking wrote:is it a canonocal url (not: "ubuntu" but "http://www.foo.bar/" instead "www.foo.bar") and/or a local file?
It looks in every case to hand back "http://www.foo.bar/"


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar NickElliott
Registered Member
Posts
236
Karma
3
OS
To follow up on my previous post - when I try with a new user nothing happens at all when I select the link.


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar bcooksley
Administrator
Posts
18642
Karma
83
OS
Unfortunately I suspect we will need someone familiar with the Java codebase you are using in order to determine why this is happening. Are you using the Sun/Oracle or IcedTea Java runtime?


System Settings and Device Actions KCM maintainer
Image

 
Reply to topic

Bookmarks



Who is online

Registered users: afiestas, avishekk, Baidu [Spider], bcooksley, Bing [Bot], bjoernbalazs, brankko, colomar, Cris70, david_edmundson, einar, Exabot [Bot], ggael, Google [Bot], Heiko Tietze, joshaughnessy, ken300, koriun, La Ninje, lueck, Majestic-12 [Bot], metalbrick, mmagnusson, ooker, rossdv8, seal20, starbuck, stavallo, steltsop, steph, SysGhost, valoriez, vHanda, Yahoo [Bot]