Gwibber 2.30.1 does not respect gnome default browser

Bug #537201 reported by PrivateUser132781
56
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Gwibber
Confirmed
Undecided
Unassigned

Bug Description

Despite setting Chrome as my default browser in the Gnome "preferred applications" setting, Gwibber opens all links in Firefox.

Revision history for this message
PrivateUser132781 (privateuser132781-deactivatedaccount) wrote :

I should add that I'm using the daily build from the PPA on karmic. Present version is 2.29.91.

summary: - Gwibber does not respect gnome default browser
+ Gwibber 2.29 does not respect gnome default browser
Revision history for this message
Ken VanDine (ken-vandine) wrote : Re: Gwibber 2.29 does not respect gnome default browser

I can't reproduce this on Lucid. I tried setting default browsers to firefox, chromium and epiphany. Gwibber opened the correct default each time. Can you confirm other apps are honoring it?

Changed in gwibber:
status: New → Invalid
Revision history for this message
Eetu Huisman (eh) wrote :

I'm having this same problem with 2.31.1. I had Epiphany previously set as my default browser, but I switched to Chrome. Gwibber seems to know about the correct default browser since the "Gwibber Web Site" link in the About dialog opens the website with Chrome, but all links in the feeds are opened with Epiphany.

Changed in gwibber:
status: Invalid → New
Revision history for this message
zappi (thezappi) wrote :

Have this Problem only when I'm working with Xfce. When Gwibber started in Xfce, Konqueror is used as Browser, So I'm loooking a little around and found out that gwui.py is caling webbrowser.py. So I just start testing it in a Python Shell.
-----------------------------------------------
>>> import webbrowser
>>> webbrowser.open("www.heise.de")
The Result is:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/webbrowser.py", line 61, in open
    if browser.open(url, new, autoraise):
  File "/usr/lib/python2.6/webbrowser.py", line 275, in open
    success = self._invoke(args, True, autoraise)
  File "/usr/lib/python2.6/webbrowser.py", line 238, in _invoke
    stderr=inout, preexec_fn=setsid)
  File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or director
-------------------------------------------------
If I do it with the modul os, I can open a Browser this way:
-------------------------------------------------
>>> os.system('/usr/bin/firefox %s &' % "www.heise.de")
-------------------------------------------------
I do can open a Browser of my choice.

I checked export and env, Both show there is a Browser variable present:

> export | grep BROWSER
declare -x BROWSER="firefox -w"
> env | grep BROWSER
BROWSER=firefox -w

I hope that my informationen can help to bring more Light into the darkness.

Revision history for this message
Aldo Nogueira (aldo-nogueira) wrote :

In Lucid, the opposite is happening to me: my default browser is Firefox, but all links in the feeds open Chrome.

Revision history for this message
Frederik Elwert (frederik-elwert) wrote :

I’m also affected by this. Midori is my default browser, but Gwibber opens links in Opera.

@zappi: The error you are seeing might be because the lack of protocol information. Since you don’t specify 'http://', it looks for a local file called 'www.heise.de'.

I just also tried calling webbrowser.open from a python shell, and it opens a given URL ('http://www.heise.de') in my default GNOME browser (Midori). So I guess the problem is not in the webbrowser module.

Revision history for this message
Eduardo Klein (epklein) wrote :

On my Lucid (amd64) gwibber 2.30.0.1, exactly the same problem mentioned by Aldo Nogueira on 2010-05-11

Revision history for this message
Susan Stewart (hedgemage) wrote :

Same problem here on Xubuntu 10.4 using Gwibber 2.30.0.1. I do not have gnome installed, but Xubuntu is running gnome services, and other gnome apps are correctly opening links in chromium, where gwibber keeps using links2.

Revision history for this message
Captain Chaos (launchpad-chaos) wrote :

I'm on Lucid 64-bit with Gwibber 2.30.1, and here too it is opening links with Chrome, while Firefox is my default browser.

summary: - Gwibber 2.29 does not respect gnome default browser
+ Gwibber 2.30.1 does not respect gnome default browser
Changed in gwibber:
status: New → Confirmed
Revision history for this message
Captain Chaos (launchpad-chaos) wrote :

It seems to vary which browser Gwibber uses. For a couple of days it has been opening links in Firefox, but now it has reverted back to Chrome.

I did some digging, and I think I know (partly) why this is happening:

1. Gwibber sometimes uses gnome-open to open URLs (which correctly opens the Gnome default browser), but sometimes it uses x-www-open
2. x-www-open is part of the dpkg alternatives system, and opens whichever browser happens to be configured for the x-www-open command. The gnome "Preferred Applications" app does not configure the x-www-open alternative

So the workaround is to configure the x-www-open alternative to point to your preferred default browser. The easiest way to do that is to install and use galternatives.

There is still a bug in Gwibber though, and that is that it is (sometimes) using x-www-open when it should be using gnome-open.

Revision history for this message
Captain Chaos (launchpad-chaos) wrote :

The bug might be in Python by the way, since Gwibber uses webbrowser.py from the Python library. As far as I can tell (being a Python novice) that should always correctly detect gnome-open first though.

Revision history for this message
Captain Chaos (launchpad-chaos) wrote :

Ah, sorry, I've been writing x-www-open but I meant x-www-browser!

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

I can confirm 2.32.0.1 on a Karmic-upgraded-to-Maverick install does indeed open links by following /etc/alternatives/x-www-browser instead of the default Gnome browser.

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

Doing a "sudo update-alternatives --verbose --config x-www-browser" allows you to select the the browser in the alternatives system and sidestep, but not solve, the Gwibber bug.

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

Please take #13 and #14 with a grain of salt. My tests were flawed. Chrome was the default browser according to alternatives, but not for Gnome and is being invoked by Gwibber after a change to alternatives, but not a reboot.

Revision history for this message
omaralqady (omaralqady) wrote :

As "Captain Chaos" said above in #10 and #12, get 'galternatives' and make sure that the following are set to your favorite browser:
1.gnome-www-browser
2.x-www-browser

That should do it :) or at least it did it for me :)

Revision history for this message
COD (chrisod) wrote :

As of today, this bug is still present. I used the "galternatives" method mentioned above to get Gwibber to use the default client.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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