in the file .bashrc in my home directory. This I have done. It has no effect. When I issue the command notebook() at the sage: prompt, the notebook still starts up in Safari. I have to kill Safari and then start Firefox manually (where I have set my home page to be http://localhost:8000).
I am running Sage 4.8 on Mac OS X 10.6.8.I have been using Safari as my default browser, but I am getting discouraged because Safari crashes frequently.All of my bookmarks and ways of browsing the web are in Safari, so I want to keep Safari as my default browser,but I am switching to Firefox when using Sage.According to the Sage document http://www.sagemath.org/doc/reference/sagenb/notebook/notebook_object.htmlI can override the default browser by putting export SAGE_BROWSER="firefox"
This works for me:
export SAGE_BROWSER='open -a /Applications/Firefox.app'
(Change this to the path to the firefox app, if necessary.) The documentation apparently needs to be fixed, at least as far as OS X is concerned.
Oh, a few more things, in case people are reading this who aren't that familiar with the Terminal app and bash: you can give the command
export SAGE_BROWSER='open -a /Applications/Firefox.app'
at the shell prompt and it will have immediate effect, so you can test it right away. Second, if you instead change .bashrc, you should start a new terminal window for the changes to take effect. You can test whether it has done anything by typing 'export' and seeing if SAGE_BROWSER is listed with the appropriate setting.
To clarify this, I believe that the man page says that .bash_profile is checked for a login shell, and that .bashrc is checked for a non-login, interactive shell.
I'm not at a 10.6 system right now to verify that, but it is the case on 10.7, and I have my "profile/rc" set up with that assumption on both 10.6 and 10.7.
Justin
--
Justin C. Walker, Curmudgeon at Large
Director
Institute for the Enhancement of the Director's Income
-----------
Nobody knows the trouble I've been
-----------
> To clarify this, I believe that the man page says that .bash_profile is checked for a login shell, and that .bashrc is checked for a non-login, interactive shell.
>
> I'm not at a 10.6 system right now to verify that, but it is the case on 10.7, and I have my "profile/rc" set up with that assumption on both 10.6 and 10.7.
Thanks, Mr. Curmudgeon ;-)
That is indeed what I read in the man page, but my intuitive sense is that Terminal should open a "non-login, interactive shell" — after all, I am able to start entering UNIX commands interactively, and the shell does not prompt for a login. But when I actually try it out, the contents of .bashrc have no effect in Terminal/bash, but the contents of .bash_profile are processed. I conclude that something about a deeper understanding of Mac OS X and/or UNIX is eluding me.
Jim
I think your confusion is in the use of the term "login".
Terminal starts a login shell for each window/tab that it opens, so your intuition needs a little polishing :-} Think of Terminal as a glorified xterm, in that all the windows belong to one Terminal, rather than each xterm owning one window.
Login shells are represented (e.g., in 'ps' listings) with a leading "-" in the command name; and if you check a full "ps" listing, you'll see that the "parent" shell in each window (i.e., for each (pseudo)tty) has such a tag, and typically, no others do.
HTH
Justin
--
Justin C. Walker
Curmudgeon-at-large
--
Network, n., Difference between work
charged for and work done
> Terminal starts a login shell for each window/tab that it opens, so your intuition needs a little polishing :-} Think of Terminal as a glorified xterm, in that all the windows belong to one Terminal, rather than each xterm owning one window.
Thanks, Justin, for helping with the polishing. I'm learning more about Terminal than I ever wanted to know — I just want to get on with using Sage to solve the problem I'm working on.
Jim