git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug: git web--browse doesn't recognise browser on OS X

From
Christian Couder <christian.couder@gmail.com>
Date
Mar 15, 2013, 11:19 UTC
Message-ID
<CAP8UFD2oR5tnYuw7Nbe-CzGx7fw-OpAFW+reN+1Nroh1jXjfsQ@mail.gmail.com>
In-Reply-To
<CAMxBVStw-b3J_Fm9x=h3==9ebdLUkpjBSQ9-W4+zJ9N20ojfxg@mail.gmail.com>
Hi,
On Thu, Mar 14, 2013 at 12:39 PM, Timo Sand <timo.j.sand@gmail.com> wrote:
> Hi
>
> I tried to open a website by runnin 'git web--browse http://google.com'
> and it replied 'No known browser available'.

First git web--browse is a plumbing shell script to display documentation on a web browser when you type something like "git help -w log". It is not really supposed to be used directly by the user. On OS X it might be simpler to just type "open http://google.com".

That said there is the following in it to make it work on OS X:

# SECURITYSESSIONID indicates an OS X GUI login session if test -n "$SECURITYSESSIONID" \ -o "$TERM_PROGRAM" = "Apple_Terminal" ; then browser_candidates="open $browser_candidates" fi

So I guess that you don't have SECURITYSESSIONID set in your terminal and you are not using Apple Terminal.

As I am not using OS X, I have no idea how to improve the script in this case.
> I also tried with '--browser=chrome' and '--browser=google-chrome' but
> the responded with 'The browser chrome is not available as 'chrome'.'

Could you try something like: "chromium http://google.com" or "chromium-browser http://google.com" If it works, then using 'git web--browse' with '--browser=chromium' or '--browser=chromium-browser' should work.

Otherwise did you try "chrome http://google.com" and "google-chrome http://google.com"?

> I expected the command to open a new tab in my browser in each of the 3 tries.
> This has worked for my system before.
>
> OS X 10.8.2, git 1.8.2, Google Chrome 27.0.1438.7 dev

Thanks, Christian.

Previous: Timo SandNext: Timo Sand
Message 2 of 11 in “Fwd: Bug: git web--browse doesn't recognise browser on OS X”
  1. Timo SandMar 14, 2013
  2. Christian CouderMar 15, 2013
  3. Timo SandMar 22, 2013
  4. John SzakmeisterMar 22, 2013
  5. Christian CouderMar 24, 2013
  6. git-web--browse: recognize iTerm as a GUI terminal on OS XJohn Szakmeister, Mar 25, 2013
  7. Christian CouderMar 25, 2013
  8. Junio C HamanoMar 25, 2013
  9. John SzakmeisterMar 26, 2013
  10. Junio C HamanoMar 27, 2013
  11. John SzakmeisterApr 4, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.