Browser support on unix

105 views
Skip to first unread message

Reuben Thomas

unread,
Nov 7, 2016, 3:25:25 PM11/7/16
to Racket Developers
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.

2. chromium-browser should be added to the list.

If some developer can explain about the status of xdg-open, I'd quite happily prepare an appropriate PR.

Ryan Culpepper

unread,
Nov 8, 2016, 12:11:06 PM11/8/16
to Reuben Thomas, Racket Developers
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".

Ryan

Reuben Thomas

unread,
Nov 8, 2016, 12:16:38 PM11/8/16
to Ryan Culpepper, Racket Developers
​Thanks, I'll take that back to the xdg-utils list, and prepare a simple PR to add chromium-browser.​

Reuben Thomas

unread,
Nov 8, 2016, 8:01:21 PM11/8/16
to Ryan Culpepper, Racket Developers
​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.

--
0001-sendurl-overhaul-browser-list.patch

Reuben Thomas

unread,
Nov 9, 2016, 12:10:57 PM11/9/16
to Vincent St-Amour, Ryan Culpepper, Racket Developers
On 9 November 2016 at 17:10, Vincent St-Amour <stam...@eecs.northwestern.edu> wrote:
I'd put `chromium-browser` next to `google-chrome` in the list.

​Sounds sensible!​

Other than that, looks good to me. I'm happy to make the above change
when committing, if that works for you.

​That's fine by me, thanks.

Vincent St-Amour

unread,
Nov 9, 2016, 12:14:49 PM11/9/16
to Reuben Thomas, Vincent St-Amour, Ryan Culpepper, Racket Developers
Perfect. I'll commit your changes.

Thanks a lot for looking into this!

Vincent

Eli Barzilay

unread,
Nov 9, 2016, 6:22:40 PM11/9/16
to Reuben Thomas, Ryan Culpepper, Racket Developers
On Tue, Nov 8, 2016 at 8:01 PM, 'Reuben Thomas' via Racket Developers
<racke...@googlegroups.com> wrote:
>>
>> 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.

Openning a URL on windows had the same problem and the solution was to
generate a temporary "trampoline" html page that redirects to the actual
page (with the query part): the same code could be used for xdg.

--
((x=>x(x))(x=>x(x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!

Reuben Thomas

unread,
Nov 9, 2016, 6:24:46 PM11/9/16
to Eli Barzilay, Ryan Culpepper, Racket Developers
On 9 November 2016 at 23:22, Eli Barzilay <e...@barzilay.org> wrote:
On Tue, Nov 8, 2016 at 8:01 PM, 'Reuben Thomas' via Racket Developers
<racke...@googlegroups.com> wrote:
>>
>> 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.

Openning a URL on windows had the same problem and the solution was to
generate a temporary "trampoline" html page that redirects to the actual
page (with the query part): the same code could be used for xdg.

That's a good idea, but ​I don't think there is much point. xdg-open is meant mainly to open files. For Racket, we know we are trying to run a browser. There are other methods to do this, e.g. sensible-browser and x-www-browser.

It would be nice if xdg-open could cope (and I have filed a bug to this effect), but not necessary.

--

Vincent St-Amour

unread,
Nov 11, 2016, 12:18:32 AM11/11/16
to Reuben Thomas, Ryan Culpepper, Racket Developers
I'd put `chromium-browser` next to `google-chrome` in the list.

Other than that, looks good to me. I'm happy to make the above change
when committing, if that works for you.

Vincent
> --
> 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 racket-dev+...@googlegroups.com.
> To post to this group, send email to racke...@googlegroups.com.
> 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.

Eli Barzilay

unread,
Nov 12, 2016, 10:54:45 PM11/12/16
to Reuben Thomas, Ryan Culpepper, Racket Developers
On Wed, Nov 9, 2016 at 6:24 PM, 'Reuben Thomas' via Racket Developers
<racke...@googlegroups.com> wrote:
>
> That's a good idea, but I don't think there is much point. xdg-open is
> meant mainly to open files. For Racket, we know we are trying to run a
> browser. There are other methods to do this, e.g. sensible-browser
> and x-www-browser.

xdg-open still has an advantage of being installed more (eg, on Fedora I
don't see either of the other two things installed by default), and at
least trying to be a standard...

Reuben Thomas

unread,
Nov 14, 2016, 4:31:32 PM11/14/16
to Eli Barzilay, Ryan Culpepper, Racket Developers
On 13 November 2016 at 03:54, Eli Barzilay <e...@barzilay.org> wrote:
On Wed, Nov 9, 2016 at 6:24 PM, 'Reuben Thomas' via Racket Developers
<racke...@googlegroups.com> wrote:
>
> That's a good idea, but I don't think there is much point. xdg-open is
> meant mainly to open files. For Racket, we know we are trying to run a
> browser.  There are other methods to do this, e.g. sensible-browser
> and x-www-browser.

xdg-open still has an advantage of being installed more (eg, on Fedora I
don't see either of the other two things installed by default), and at
least trying to be a standard...

​Yes indeed. I have filed ​freedesktop bug #98648 about this.

--

Eli Barzilay

unread,
Nov 15, 2016, 9:07:26 AM11/15/16
to Reuben Thomas, Ryan Culpepper, Racket Developers
I saw that, but it's been this way for a very long time, and even if it
does get resolved quickly now, it'll be a while until it propagates.
Therefore there's value in making it work now.

Reuben Thomas

unread,
Nov 15, 2016, 9:14:19 AM11/15/16
to Eli Barzilay, Ryan Culpepper, Racket Developers
On November 15, 2016 2:07:24 PM GMT, Eli Barzilay <e...@barzilay.org> wrote:
On Mon, Nov 14, 2016 at 4:31 PM, Reuben Thomas <r...@sc3d.org> wrote:
On 13 November 2016 at 03:54, Eli Barzilay <e...@barzilay.org> wrote:

xdg-open still has an advantage of being installed more (eg, on
Fedora I don't see either of the other two things installed by
default), and at least trying to be a standard...

Yes indeed. I have filed freedesktop bug #98648 about this.

I saw that, but it's been this way for a very long time, and even if it
does get resolved quickly now, it'll be a while until it propagates.
Therefore there's value in making it work now.

We seem to be in violent agreement: getting it to work now is why I offered my patch.
--
http://rrt.sc3d.org

Vincent St-Amour

unread,
Nov 15, 2016, 11:40:18 AM11/15/16
to Eli Barzilay, Reuben Thomas, Ryan Culpepper, Racket Developers
Eli,

I looks like you have a very specific resolution in mind, which is not
coming across in email.

Could you submit a patch with what you have in mind? That would make it
clearer to everyone.

Vincent
> --
> 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 racket-dev+...@googlegroups.com.
> To post to this group, send email to racke...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/CALO-gut%3DtXykaoONGAgq2h%2B9kxVcoVw4e_AbRMCtgNtbZiFzeA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages