BOINC patch 003 launches the wrong browser

Bug #353372 reported by Simon Dierl
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
boinc (Debian)
Fix Released
Unknown
boinc (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: boinc-manager

Ubuntu 9.04
boinc-6.2.18

Debian patch 003_use_sensible-browser.patch changes BOINC Manager behaviour to use sensible-browser, should wxLaunchDefaultBrowser fail (ATM, it does due to Bug #353365). Although a sensible idea for Debian (with Epiphany being the default browser), this patch is less than helpful when using Ubuntu, since Epiphany is not installed by default.
It should at least default to firefox or, ideally, use /etc/alternatives/x-www-browser.

Revision history for this message
Daniel Hahler (blueyed) wrote :

sensible-browser is from debianutils and should provide the right browser for you. If it does not, that's probably a bug.

From looking at /usr/bin/sensible-browser, it appears to try $BROWSER, x-www-browser. If $GNOME_DESKTOP_SESSION_ID is set, also /usr/bin/gnome-www-browser gets tried.

I think sensible-browser appears to be more sensible to use than x-www-browser, while using firefox specifically does not make sense as far as I can see.

The patch says btw:
"""Disclaimer: This patch is Debian-specific. Don't use it for non Debian packages.
The program "sensible-browser" is part of the essential package debianutils."""

Do you think the problem is, sensible-browser not being installed? Or defaulting to epiphany, although it's not installed?

Changed in boinc:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Lubosz Sarnecki (lubosz) wrote :

this is still an issue in jaunty 64bit.
i used the latest boinc manager version from the official website, because the one from the jaunty repo didn't connect: http://boinc.berkeley.edu/download.php (6.4.5 for Linux x64)

bmonkey@HackProHackstation:~$ sudo update-alternatives --config x-www-browser

There is only 1 program which provides x-www-browser
(/usr/bin/firefox-3.0). Nothing to configure.

bmonkey@HackProHackstation:~$ echo $BROWSER
/usr/bin/firefox

bmonkey@HackProHackstation:~$ uname -a
Linux HackProHackstation 2.6.28-12-generic #43-Ubuntu SMP Fri May 1 19:31:32 UTC 2009 x86_64 GNU/Linux

Revision history for this message
Lubosz Sarnecki (lubosz) wrote :

ah, btw, boinc opens thunderbird for me....
guys at the boinc channel on freenode point out that this is a ubuntu bug.
wxLaunchDefaultBrowser is used to open a weblink.

Revision history for this message
Daniel Hahler (blueyed) wrote :

What does "sensible-browser example.com" do for you?
(it opens the webpage using my default browser here)

If it does not, please edit the sensible-browser script and add " -e" at the end of the shebang (first line), then start it from a terminal and provide the output here.

For me it looks as follows:
$ sensible-browser example.com
+ URL=example.com
+ test -n
+ test -n :0.0
+ test -n
+ test -x /usr/bin/x-www-browser
+ exec /usr/bin/x-www-browser example.com

re "wxLaunchDefaultBrowser": AFAICS this has been patched to use the Debian/Ubuntu default browser instead (rather than the one configured in Gnome, which might be the same though, of course).

btw: debianutils is a essential package in Ubuntu, too (re my last comment).

AFAICS it should use /usr/bin/firefox ($BROWSER) for you, lubosz.
I've tried "BROWSER=konqueror sensible-browser example.com" and it used Konqueror, as expected.

Revision history for this message
rww (rww) wrote :

Hello lubosz and Simon:
We haven't heard back from you in a while. Could you please provide the information requested in Daniel's comment ( https://bugs.launchpad.net/ubuntu/+source/boinc/+bug/353372/comments/4 )? Thanks!

Revision history for this message
Joseph Stateson (josephy) wrote :

I have a different symptom but I suspect it is the same problem. Two new installs of 9.1 ubuntu and one new install of Dotsch_UX (8.1 ubuntu) do NOT launch any browser when clicking on a boincmgr project url. echo $BROWSER shows firefox at /usr/bin, preferred-browser also brings up firefox and firefox is listed as the preferred browser under system-preferences. It just does not launch. However, if I install Epiphany and set Epiphany to the default browser then boincmgr correclty launches Ephipany. Bringing up the terminal again the command echo $BROWSER still shows firefox.and sensible-browser still launches firefox.

my 2c says something is broken

Revision history for this message
Daniel Hahler (blueyed) wrote :

Can you please test "sensible-browser example.com" ?

This is what the patch is using (and this bug is about):

 void wxHyperLink::ExecuteLink (const wxString &strLink) {
- if (!wxLaunchDefaultBrowser(strLink)) {
+ wxString cmd = wxT("sensible-browser ") + strLink;
+ if (!::wxExecute(cmd, wxEXEC_ASYNC)) {
         wxString strDialogTitle = wxEmptyString;
         wxString strDialogMessage = wxEmptyString;

Revision history for this message
Joseph Stateson (josephy) wrote :
Revision history for this message
Joseph Stateson (josephy) wrote :

hmm - when I added that desktop image, my comment was erased.

I inadvertantly typed "preferred-browser" in comment 6 where I meant to put sensible-browser.

Indeed, sensible-browser brings up firefox as expected since $BROWSER is set to firefox. However, the gnome default web page is (as shown in image) epiphany and clicking on the project url button brings up epiphany instead of firefox.

If I select firefox for the default gnome browser (system - preferences - default applications), nothing get launched. The default install of ubuntu 8.1 seemingly thru 9.1 seeming does not allow firefox to be brought up with boincmgr. This was also noticed when Dotsch_UX 1.2 was built by the author.

Revision history for this message
Joseph Stateson (josephy) wrote :

Hi again :-)

I do not know what the context of patch 7 is. In looking thru the boinc trunk code
==============
void CViewProjects::OnProjectWebsiteClicked( wxEvent& event ) {
<SNIP>
    pFrame->UpdateStatusText(_("Launching browser..."));
    wxLaunchDefaultBrowser(
        m_TaskGroups[1]->m_Tasks[website_task_index]->m_strWebSiteLink
    );
    pFrame->UpdateStatusText(wxT(""));
<SNIP>
}
==============
and actually executing it, I see the frame text "Launching browser..." and see it erased almost instantly, so I know that wxLaunchDefaultBrowser was executed (or so it would seem). Boincmgr does launch epiphany, but only after I set epiphany as the default browser in gnome. Firefox is ignored and the env variable BROWSER remains firefox irregardless of what the default app assigns for the browser.

I have only the object to wxWidgets, not the source to review. Where was the patch appled that you listed in comment 7?
Maybe the bug I am trying to report needs to be submitted elsewere or is not the bug this thread is about.

Thanks!

Revision history for this message
Daniel Hahler (blueyed) wrote :

Joseph, use "apt-get source boinc" to get the source package for boinc. Then look in debian/patches (003_* is being talked about here).
Also, I could not find the code you're quoting in the current source package. "ack-grep 'Launching browser' -C3" displays some occurrences, but they all go through ExecuteBrowserLink which then calls the (patched) ExecuteLink.

btw: For me, $BROWSER is not set, even when inside Gnome. And I guess it's set for you in interactive shells only (and therefore not for boincmgr).

See also my comments with the Debian bug (order is mixed): http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537695#15

Take a look at the sensible-browser script: it checks $BROWSER first, then gnome-www-browser (in Gnome), then x-www-browser.
So you either have a wrong BROWSER env set or gnome-www-browser is used (and uses the default browser within gnome).

I still cannot see what's really wrong here.

Revision history for this message
Joseph Stateson (josephy) wrote :

My mistake - I should have downloaded the tag 6.10.43 (instead of trunk) and indeed your patch is there as well as in the apt-get source you suggested I use.

I cannot use 6.2.12 as these systems run CUDA and need latest or recommended boinc. From the boinc web site I downloaded 6.10.43 and copied the binaries over to /usr/bin, at least for the system running 9.1 For the system running Dotsch_UX I used the 6.10.17 that the author supplied. Both have the problem with launching the project url. At least the Dotch_UX does not cause other problems (see last url)

So ExecuteLink was patched - I assume that patch was in the debian code? IANE on linux, but, reading the bug description at the top I quote " this patch is less than helpful when using Ubuntu, since Epiphany is not installed by default.
It should at least default to firefox or, ideally, use /etc/alternatives/x-www-browser." That seems to be the problem - there is no default to firefox or it does not work. So what can be done to get this problem identified and fixed? The problem that I want to report is that when firefox is selected in that default app dialog, it does NOT get launched by boincmgr. In looking thru http://www.xaraxtreme.org/maillists/archive/dev/dev_052006/msg00348.html I see where vfs.keys had to be edited and Epiphany replaced with the desired browser (for email links to work). What is more interesting is that firefox is not one of the 6 or so listed browsers in that vfs.keys source.

Anyway, this is really a minor problem and can be worked around by selecting any of the other browsers listed in that default apps program. I picked Epiphany as I see it is the gnome default.

  There are much worse bugs to solve. Currently, I had to go back to 8.1 (from 9.1) because of bugs involving CUDA devices. hsee ttp://boinc.berkeley.edu/dev/forum_thread.php?id=5562

Revision history for this message
Daniel Hahler (blueyed) wrote : Re: [Bug 353372] Re: BOINC patch 003 launches the wrong browser

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> So ExecuteLink was patched - I assume that patch was in the debian code?

Yes, it's shipped with the Debian source package and gets applied when
building the binary packages.

> IANE on linux, but, reading the bug description at the top I quote
> " this patch is less than helpful when using Ubuntu, since Epiphany
> is not installed by default. It should at least default to firefox or,
> ideally, use /etc/alternatives/x-www-browser."

That's wrong, as far as I can see.

I would suggest using x-www-browser, too, but sensible-browser appears
to be a tad more sensible, taking $BROWSER and gnome-www-browser into
account.

Where does /etc/alternatives/gnome-www-browser point at?

Does starting /usr/bin/gnome-www-browser work for you?

> Anyway, this is really a minor problem and can be worked around by
> selecting any of the other browsers listed in that default apps program.

I still fail to see where the bug really is here.
I'm no gnome user, but it worked when I've tried it yesterday (and before).
We could drop the patch for Ubuntu, or use xdg-open, or x-www-browser.
But first the problem needs to get pinned down.

> There are much worse bugs to solve. Currently, I had to go back to
> 8.1 (from 9.1) because of bugs involving CUDA devices.

You're switching Ubuntu releases because of bugs in the boinc package?
You could have just installed the boinc package from 8.10 in 9.10
probably (and maybe this is what you did already).

- --
http://daniel.hahler.de/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLslq/fAK/hT/mPgARAr7jAJ95J/5mMTS4/h603LtpV4oQGbKuwACgy6Y/
q7QLbFkboGmMFuomEob/vos=
=3ZvP
-----END PGP SIGNATURE-----

Changed in boinc (Debian):
status: Unknown → New
Revision history for this message
Timmy Shih Jun Yee (shijun) wrote :

Since lubosz and Simon have not responded in a while and I've confirmed that boinc-manager correctly launches websites in my default browser (which is Firefox for me) on Lucid, I'm closing this bug.

Changed in boinc (Ubuntu):
status: Incomplete → Fix Released
Changed in boinc (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.