Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using Emacs on a Linux system I click:

Scala>Browser Scala API

which produces a terminal window with this message:

/usr/bin/xterm: Can't execvp lynx: No such file or directory

How do I inform Emacs that the correct web browser to use is Chrome?

share|improve this question
3  
Duplicate of stackoverflow.com/questions/4506249/… – Ulrich Dangel Jun 5 '12 at 20:52

Based on a meta discussion, I'm copying Trey Jackson's accepted answer as well as Alan Turing's "google-chrome"-specific answer here:


Trey Jackson's answer

Emacs 23.2 doesn't directly support chrome, but it does support a "generic" browser, and something like this should work:

(setq browse-url-browser-function 'browse-url-generic
      browse-url-generic-program "chromium-browser")

You don't mention your OS, but if it's Windows or Mac, you can try:

(setq browse-url-browser-function 'browse-url-default-windows-browser)
(setq browse-url-browser-function 'browse-url-default-macosx-browser)

And, if that doesn't work, there are other folks who have implemented 'browse-url-chrome. Google turned up the following links:


Alan Turing's answer

As @Trey suggests, you can set it to a generic browser bu instead of "chromium-browser" use "google-chrome", like this:

(setq browse-url-browser-function 'browse-url-generic
      browse-url-generic-program "google-chrome")

That worked for me with Emacs 23.2 and Chrome 12. Though it might be Chrome 13 by the time I'm done writing this answer ;-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.