From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#9779: No usable browser found on Lubuntu Date: Tue, 18 Oct 2011 09:57:54 +0300 Organization: JURTA Message-ID: <87r52azsj9.fsf@mail.jurta.org> References: <87mxczb480.fsf@mail.jurta.org> <73E891D0-70FD-418B-BA23-C1D272DE0B2A@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318922121 21090 80.91.229.12 (18 Oct 2011 07:15:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 18 Oct 2011 07:15:21 +0000 (UTC) Cc: 9779@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 18 09:15:17 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RG3tL-0002DL-Sn for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Oct 2011 09:15:16 +0200 Original-Received: from localhost ([::1]:56723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG3tL-0001xN-BH for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Oct 2011 03:15:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG3tI-0001x5-Jx for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 03:15:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RG3tE-0000HR-9r for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 03:15:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG3tE-0000HM-43 for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 03:15:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RG3u6-0004VZ-UM for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2011 03:16:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Oct 2011 07:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9779 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9779-submit@debbugs.gnu.org id=B9779.131892212316556 (code B ref 9779); Tue, 18 Oct 2011 07:16:02 +0000 Original-Received: (at 9779) by debbugs.gnu.org; 18 Oct 2011 07:15:23 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RG3tS-0004IF-Lp for submit@debbugs.gnu.org; Tue, 18 Oct 2011 03:15:23 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RG3tO-0004EN-Qz for 9779@debbugs.gnu.org; Tue, 18 Oct 2011 03:15:20 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id CD6D46E8054; Tue, 18 Oct 2011 00:14:22 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id F0EB5AAB4B63; Tue, 18 Oct 2011 00:14:21 -0700 (PDT) In-Reply-To: <73E891D0-70FD-418B-BA23-C1D272DE0B2A@swipnet.se> ("Jan \=\?iso-8859-1\?Q\?Dj\=E4rv\=22's\?\= message of "Tue, 18 Oct 2011 07:37:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 18 Oct 2011 03:16:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52767 Archived-At: > Chrome also goes by the name google-chrome. Since chromium and chrome > isn't the same thing and you can have both installed, > browse-url-chromium-program is not really the right name for it if it > also tries chrome. Unlike partially proprietary Chrome, Chromium is free software, so it deserves to be added to browse-url.el. I agree that we should not search for the executable "chrome" which is not free software. So below is a new patch that supports only free software version "Chromium". I propose to add it independently of xdg-open for systems that have Chromium but not xdg-open. === modified file 'lisp/net/browse-url.el' --- lisp/net/browse-url.el 2011-08-21 01:01:12 +0000 +++ lisp/net/browse-url.el 2011-10-18 06:57:02 +0000 @@ -36,6 +36,7 @@ ;; Function Browser Earliest version ;; browse-url-mozilla Mozilla Don't know ;; browse-url-firefox Firefox Don't know (tried with 1.0.1) +;; browse-url-chromium Chromium 3.0 ;; browse-url-galeon Galeon Don't know ;; browse-url-epiphany Epiphany Don't know ;; browse-url-netscape Netscape 1.1b1 @@ -230,6 +232,7 @@ (defcustom browse-url-browser-function :value browse-url-w3-gnudoit) (function-item :tag "Mozilla" :value browse-url-mozilla) (function-item :tag "Firefox" :value browse-url-firefox) + (function-item :tag "Chromium" :value browse-url-chromium) (function-item :tag "Galeon" :value browse-url-galeon) (function-item :tag "Epiphany" :value browse-url-epiphany) (function-item :tag "Netscape" :value browse-url-netscape) @@ -336,6 +341,22 @@ (defcustom browse-url-firefox-startup-ar :type '(repeat (string :tag "Argument")) :group 'browse-url) +(defcustom browse-url-chromium-program + (let ((candidates '("chromium" "chromium-browser"))) + (while (and candidates (not (executable-find (car candidates)))) + (setq candidates (cdr candidates))) + (or (car candidates) "chromium")) + "The name by which to invoke Chromium." + :type 'string + :version "24.1" + :group 'browse-url) + +(defcustom browse-url-chromium-arguments nil + "A list of strings to pass to Chromium as arguments." + :type '(repeat (string :tag "Argument")) + :version "24.1" + :group 'browse-url) + (defcustom browse-url-galeon-program "galeon" "The name by which to invoke Galeon." :type 'string @@ -913,6 +934,7 @@ (defun browse-url-default-browser (url & ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) ((executable-find browse-url-firefox-program) 'browse-url-firefox) + ((executable-find browse-url-chromium-program) 'browse-url-chromium) ((executable-find browse-url-galeon-program) 'browse-url-galeon) ((executable-find browse-url-kde-program) 'browse-url-kde) ((executable-find browse-url-netscape-program) 'browse-url-netscape) @@ -1141,6 +1164,22 @@ (defun browse-url-firefox-sentinel (proc (append browse-url-firefox-startup-arguments (list url)))))) ;;;###autoload +(defun browse-url-chromium (url &optional new-window) + "Ask the Chromium WWW browser to load URL. +Default to the URL around or before point. The strings in +variable `browse-url-chromium-arguments' are also passed to +Chromium." + (interactive (browse-url-interactive-arg "URL: ")) + (setq url (browse-url-encode-url url)) + (let* ((process-environment (browse-url-process-environment))) + (apply 'start-process + (concat "chromium " url) nil + browse-url-chromium-program + (append + browse-url-chromium-arguments + (list url))))) + +;;;###autoload (defun browse-url-galeon (url &optional new-window) "Ask the Galeon WWW browser to load URL. Default to the URL around or before point. The strings in variable