Crouton: Default web browser icons trusty with xfce fail to execute.

Created on 2 Jun 2015  路  22Comments  路  Source: dnschneid/crouton

When clicking the web browser icon you will get an error "failure to connect to default web browser (or input/output error)"
You can solve it by doing the following in linux: "Application Menu -> Settings -> Preferred Applications" You will get a screen where you can set the default webbrowser by default it is set to "Debian sensible browser" click on that and choose "other" then type in the input field "netsurf" without the quotes. Close the window by clicking the close button.
Thanks to @EvanDawesome to notice this.

bug

Most helpful comment

This issue is not fixed, yet. I still want to fix the problem and get the default browser to work. After trying the first suggestion of setting the prefered browser, I got different error details.

Same error "Failed to execute default Web Browser." Details changed from "Input/output error." to (after making changes to prefered browser) "Failed to execute child process "netsurf" (No such file or directory)."

All 22 comments

Oh just noticed. We only need to set environment variable BROWSER=netsurf. Then the "/usr/bin/sensible-browser" will work correctly.

But if you look at the implementation of sensible-browser (it's a shell script), it should be falling back on x-www-browser, which I thought we set...

Hmm seems something is wrong, croutonurlhandler steals the show:

sudo update-alternatives --config x-www-browser
There are 2 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser).

  Selection    Path                              Priority   Status
------------------------------------------------------------
* 0            /usr/local/bin/croutonurlhandler   15        auto mode
  1            /usr/bin/netsurf-gtk               10        manual mode
  2            /usr/local/bin/croutonurlhandler   15        manual mode

That's intended. If you have the extension/xiwi installed, Chromium OS should handle URLs. If the error message happens when working with croutonurlhandler, then we need to figure out where that interaction is breaking down.

I need to read a bit about the update-alternatives, first time I come across never had to use it before. If I set the selection to 1 so netsurf-gtk then the default web browser icons on xfce desktop will open netsurf, else they want to start croutonurlhandler which gives the error message. BTW this is on xorg and no xiwi installed.

extension target is installed though, right?

Yep extension is installed.

Yeah, so going through croutonurlhandler is correct; it's just not working via alternatives/sensible. Does running croutonurlhandler https://www.google.com work from your terminal?

Yes that workes.

To be complete here is croutonversion output:

crouton: version 1-20150519153807~master:30cf02c9
release: trusty
architecture: amd64
xmethod: xorg
targets: xfce,extension
host: version 7077.20.0 (Official Build) dev-channel falco 
kernel: Linux localhost 3.8.11 #1 SMP Thu May 28 23:17:45 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
freon: yes

And sensible-browser https://www.google.com doesn't work?

That works in the way that it calls croutonhandler. So opens google in chromeos.

So some way that xfce is using /usr/share/xfce4/helpers/debian-sensible-browser.desktop probably breaks...

So, if I understand correctly by default croutonurlhandler should be used when clicking on the default web browser icon when using XMETHOD xiwi and xorg? If so then the answer is simple it doesn't pass a url/path. At least that is why it fails. The start command from the desktop icon is now exo-open --launch WebBrowser %u If I change that to exo-open --launch WebBrowser https://www.google.com It will open a new tab on chromeos.

Sorry, I totally misinterpreted the issue at hand. If you click a URL in an application or click a URL shortcut on your desktop, it properly launches in Chromium OS? So the only issue is the browser icon, in which case croutonurlhandler just needs to default to launching the new tab page/home page.

Yes, I think chrome://newtab/ should be the link to revert to in croutonurlhandler, but if I pass that to croutonurlhandler it will open about:blank. Not really what we want. It works when I use the link on chromeos directly. It opens my homepage.

I think we need to use the chrome.tabs API instead of the generic window one to open the URL. In particular, if you special-case an empty URL, you can pass nothing to tabs.create (literally, an empty object) and it will open the appropriate new tab page for you.

Awesome!! I changed in the Properties->Command the %u to chrome://newtab/ and now it opens a new tab in ChromeOS browser :)
Thank you for the fix

I am having the same issue with a fresh install as of today. Where is the context for changing "Properties->Command" noted by Izantal?

@jacobgerlach right click on the icon and choose Properties, in there I click on properties in the general tab of the launcher. Command is in there

Okay I _think_ this is mostly fixed by the switch to using tabs.create (which happened a while ago (bb1bf8a3)).

Is the remaining issue here that %u will not result in any parameters to croutonurlhandler? In that case, we need to make croutonurlhandler trigger a blank page (or chrome://newtab) when given no parameters.

This issue is not fixed, yet. I still want to fix the problem and get the default browser to work. After trying the first suggestion of setting the prefered browser, I got different error details.

Same error "Failed to execute default Web Browser." Details changed from "Input/output error." to (after making changes to prefered browser) "Failed to execute child process "netsurf" (No such file or directory)."

Same error "Failed to execute default Web Browser." Details changed from "Input/output error

I am also facing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aarwdc picture aarwdc  路  5Comments

El-t0ro picture El-t0ro  路  4Comments

Taylormsz picture Taylormsz  路  5Comments

jvschiavo picture jvschiavo  路  4Comments

shichuzhu picture shichuzhu  路  5Comments