On 9/29/07, Francis Clarke  wrote:
> I wrote a script to provide a one-step opening of a SAGE notebook on a Mac.
>
> My particular problem was that I wanted to use Firefox for SAGE
> without changing my default browser.  [It would perhaps be nice if
> the notebook() command allowed the user to name which browser to use.]

The notebook command doesn't have that option, but if
you set the environment variable SAGE_BROWSER, then
the program it points to will be used instead of whatever
your default browser is.  This one line below (which should
all be on one line), will correctly set the browser to
Safari, and also ensure that no Sage library paths confuse
things:

export SAGE_BROWSER="unset LIBRARY_PATH LD_LIBRARY_PATH
DYLD_LIBRARY_PATH; open -a Safari \"[EMAIL PROTECTED]""

If you type that at the command line, then do, e.g.,
    sage -inotebook
the Sage notebook will open in Safari.

Having a 7 second sleep timeout like in your script isn't desirable,
since, e.g., if sage has recently been loaded the 7 second wait is
much too long, whereas if the system is heavily loaded, Sage could
take much longer than 7 seconds to start.  If you do the above,
Sage pops up safari right when it is ready to receive connections.

Otherwise I think your instructions are good.  Could you revise them
after trying the above?

William

>
> The solution I came up with, though a bit of a hack, is relatively
> simple.  With the thought that it might be useful to others, I've
> written a some documentation, based on inst/node11.html, explaining
> how it's done.  Source and pdf are attached.
>
> best wishes
>
> --
> Francis Clarke
> Department of Mathematics
> University of Wales Swansea
> Swansea
> SA2 8PP
>


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to