#5108 closed defect (fixed)
Web browser not opened / not configurable
Reported by: | richlv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 14.01 |
Component: | Core | Version: | latest |
Keywords: | Cc: | Dakon, RicoZ |
Description (last modified by )
both and 3208 and 3312 fail to open browser with jre 1.6.0_20 on opensuse. this happens both with urls from the initial news page and with ctrl+i/ctrl+h keys.
no error is printed in the console. changing browser url in java control panel does not help.
this might be something with local configuration, but i've tried all options i could think of, and a kind person in #java directd me to application developers :)
Attachments (0)
Change History (24)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
I reported a similar problem with another application using gnome-open in Fedora (http://bugzilla.redhat.com/show_bug.cgi?id=544119). It turns out that gnome-open only supports http:// URLs if the gvfs package is installed, by default they only guarantee to handle file:// URLs.
I believe the desktop-agnostic way to open a URL is to call xdg-open from the FreeDesktop.org Portland project http://portland.freedesktop.org/wiki/. I have seen some other applications trying xdg-open, htmlview, gnome-open, exo-open, kfmclient etc in turn until they find one which works.
comment:3 by , 15 years ago
May I throw in another suggestion:
Desktop.getDesktop.browse(uri) http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse%28java.net.URI%29
It does require java 1.6, but otherwise seems to work quite well in abstracting desktop specific ways of accessing the default browser.
Not sure if it is applicable, but thought I'd mention it never-the-less.
comment:4 by , 15 years ago
additional note - if gvfs is missing, gnome-open exit code is 1. if all else fails and gnome-open is called, non-zero exit code should result in next alternative being tried
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
could it be detailed in which solution was used ?
i'm currently quite confused as to what josm is doing to call a browser (at least previously moving gnome-open to gnome-open2 opened opera for me as expected, now it just always gets me firefox :) )
(sorry for reopening, afraid that the question might get missed otherwise)
comment:7 by , 14 years ago
I used the suggestion by anonymous. I have Opera as default browser on Ubuntu and it opens without problems.
comment:8 by , 14 years ago
i have a terrible suspicion that this might be something gnome-centric. i tried all of the available options i could find (kde, java), but it always keeps on opening in firefox.
now, xdg-open does properly obey my default browser setting.
looks like Desktop.getDesktop.browse is not really properly implemented...
comment:9 by , 14 years ago
according to one of the answers here http://stackoverflow.com/questions/879938/workaround-for-no-default-browser-on-linux : "It looks like Desktop.browse() ultimately calls XDesktopPeer.browse() on *ix. That method is implemented by calling gnome_url_show. That probably works fine in some cases, but xdg-open is the cross-platform solution"
so it looks like java solution is a bit of a "wtf-braindead", and should be avoided if anything but gnome is targeted...
follow-up: 11 comment:10 by , 14 years ago
Yes I only tested gnome and assumed it would work on windows and mac os. It seems we are still not done here.
comment:11 by , 14 years ago
Replying to bastiK:
Yes I only tested gnome and assumed it would work on windows and mac os. It seems we are still not done here.
At least it works now under Linux. I have som gnome-core componets installed but use KDE on archlinux x86_64 and it works with firefox, where as before some weeks I clicked the link an nothing happend. Yes, xdg-open should be used, but I use sun-java (1.6.0_21) as default now.
comment:12 by , 14 years ago
Fabi2, you could have renamed gnome-open to something else, or installed gnome-vfs - that should have made it working with latest stable as well. for me renaming gnome-open didn't break anything, but josm started opening pages in opera as expected ;)
comment:14 by , 12 years ago
stupid trac. lost my comment again.
on opensuse 12.3 with openjdk-1.7.0.6 and kde i have opera set as the default browser, but it still opens firefox.
apparently, /usr/share/applications/defaults.list still points to firefox.desktop. changing two lines helps :
x-scheme-handler/http=opera-browser.desktop
x-scheme-handler/https=opera-browser.desktop
no josm restart needed
comment:17 by , 12 years ago
Cc: | added |
---|
comment:18 by , 11 years ago
Summary: | web browser not opened with jre 1.6.0_20 → Web browser not opened / not configurable |
---|
comment:20 by , 11 years ago
Cc: | added |
---|
follow-up: 22 comment:21 by , 11 years ago
I am not sure if #9531 is a true duplicate - I am asking for an unspectacular JOSM-specific configuration option where I can set
"browser: firefox %s"
or something similar. I would use that even if gnome-open and kde-open would work perfectly.
comment:22 by , 11 years ago
Replying to RicoZ:
I am not sure if #9531 is a true duplicate - I am asking for an unspectacular JOSM-specific configuration option where I can set
"browser: firefox %s"
or something similar. I would use that even if gnome-open and kde-open would work perfectly.
Well in #9531 you did ask for either respect $BROWSER-env or setting the browser manually. This ticket is about using the proper environment variable (xdg-open).
comment:24 by , 11 years ago
Milestone: | → 14.01 |
---|
ok, turned out to be (partially) local setup.
on this machine, kde is used. according to http://gis.638310.n2.nabble.com/Change-default-browser-td4379858.html, josm anyway tries gnome-open first.
renaming gnome-open allows to open web pages just fine from josm.
so this request would be to use kfmclient is kde is used (of course, if that is possible to detect in java)