On 8 November 2016 at 17:16, Reuben Thomas <[email protected]> wrote: > On 8 November 2016 at 17:11, Ryan Culpepper <[email protected]> wrote: > >> On 11/07/2016 03:25 PM, 'Reuben Thomas' via Racket Developers wrote: >> >>> A couple of questions: >>> >>> 1. Why is xdg-open commented out in all-unix-browsers? (These days it >>> should be possible to put this first, and also to remove gnome-open, >>> long-obsolete.) In particular, xdg-open does support file: URLs. >>> >> >> xdg-open does not support queries in file URLs. For example, `raco docs >> db` opens the following URL: "file:///somewhere/doc/search/index.html?q=db". >> Calling xdg-open on that URL fails with the error "error opening >> location... no such file or directory". > > > Thanks, I'll take that back to the xdg-utils list, and prepare a simple > PR to add chromium-browser. >
Attached, a patch to improve the browser list. See the commit log for details. I've also submitted bug #98648 to bugs.freedesktop.org, about xdg-open. -- http://rrt.sc3d.org -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/CAOnWdoiAgP2tNqBLarzxmbhHB%3Dq0F6suX4_ia2v36WcFtt%3DfUA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
From 75f31f15f0221a69b67be301d3ea2426b2e1c798 Mon Sep 17 00:00:00 2001 From: Reuben Thomas <[email protected]> Date: Wed, 9 Nov 2016 00:57:08 +0000 Subject: [PATCH] sendurl: overhaul browser list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove “ancient browsers” netscape and mosaic. Remove non-browsers (xdg-open, gnome-open), because we really want a browser, and they don’t understand file URLs with queries. Add chromium-browser. Add default browser finders x-www-browser and sensible-browser (Debian & derivatives). --- pkgs/net-lib/net/sendurl.rkt | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/pkgs/net-lib/net/sendurl.rkt b/pkgs/net-lib/net/sendurl.rkt index 10adaa5..2639af1 100644 --- a/pkgs/net-lib/net/sendurl.rkt +++ b/pkgs/net-lib/net/sendurl.rkt @@ -23,22 +23,17 @@ ;; all possible unix browsers, filtered later to just existing executables ;; order matters: the default will be the first of these that is found (define all-unix-browsers - '(;; common browsers - ;; xdg-open - firefox google-chrome galeon opera mozilla konqueror seamonkey epiphany + '(;; default browser launchers + sensible-browser x-www-browser + ;; common browsers + chromium-browser firefox google-chrome galeon opera mozilla konqueror seamonkey epiphany ;; known browsers camino skipstone ;; broken browsers (broken in that they won't work with plt-help) - ;; this is a configurable thing that is deprecated, but better - ;; than gnome-open (because it works) + ;; this is a configurable thing that is deprecated htmlview - ;; gnome-open could be high, but the problem is that it doesn't - ;; handle file:// URLs with a query string. - gnome-open ;; dillo does not have javascript dillo - ;; ancient browsers - netscape mosaic )) ;; : any -> bool @@ -205,14 +200,14 @@ ;; finally, deal with the actual browser process [else (case browser - [(xdg-open gnome-open firefox konqueror dillo htmlview google-chrome) + [(sensible-browser x-www-browser firefox konqueror dillo htmlview google-chrome chromium-browser) (simple)] ;; don't really know how to run these - [(camino skipstone mosaic) (simple)] + [(camino skipstone) (simple)] [(galeon) (if (eq? 'browser-default separate-window?) (simple) (w/arg (if separate-window? "-w" "-x")))] [(epiphany) (if separate-window? (w/arg "--new-window") (simple))] - [(mozilla seamonkey netscape) (try-remote)] + [(mozilla seamonkey) (try-remote)] [(opera) ;; opera starts a new browser automatically (browser-run exe "-remote" -- 2.7.4
