[racket] launching DrRacket from a web browser

From: Norman Ramsey (nr at cs.tufts.edu)
Date: Sat Sep 21 20:56:11 EDT 2013

 > 10 minutes ago, Norman Ramsey wrote:
 > > I'd like to set up a web site with links that cause the server to
 > > deliver Racket source code.  Receiving such could would cause the
 > > web server to launch DrRacket.  I believe the right mechanism to use
 > > here is a MIME type ('Content-Type:' header in the HTTP protocol).
 > > 
 > > My question is whether there is an existing MIME type used for
 > > describing Racket source files and if installing the Racket system
 > > tells local web browsers about this type---or if I will have to
 > > figure out for myself how to configure this behavior?
 > On my servers I used to add "plt" to the list of filename suffixes in
 > mime.types, but after a while I switched to adding an
 > "application/plt-scheme-package plt" line.  AFAIK, it doesn't matter
 > which one you use as long as you use some "application/".

For the archives, I am having my web server deliver
application/x-racket.  Using the `xdg-mime` command
I install bindings for this MIME type to a .desktop application, and
my web browser does the right thing.  I believe that xdg-mime is
supposed to be a cross-platform tool; at the very least, it works on
multiple Linux distributions.

It would be very nice if the next major release of the Racket
installer placed a .desktop file in /usr/share/applications
(or wherever else these things are allowed to go).  I believe the
standards are described at freedesktop.org.


Posted on the users mailing list.