Ask Your Question

change default web browser

asked 2012-09-27 04:48:54 -0500

anonymous user


I'm trying to change my default browser for notebook. I created a .bashrc file in my home directory, and added the line export SAGE_BROWSER="safari" and so far nothing has changed. I rebuilt sage, and when I go to notebook, it still opens firefox. Any ideas?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2012-09-27 06:32:22 -0500

calc314 gravatar image

Try putting your setting in .bash_profile. This is the file I've had to use to change my settings.

edit flag offensive delete link more


On Mac, you may even need to put it in `.profile` which I believe overrides all of the above...

kcrisman gravatar imagekcrisman ( 2012-09-27 07:43:48 -0500 )edit

I tried .bash and .bash_profile, and nothing is changing. I'm not sure if I'm doing this correctly though. I have an empty text file in my home directory called .bash_profile, and them I'm adding export SAGE_BROWSER="safari" through vim. I write it, quit it, and restart sage, and nothing has changed. Does this sound like the correct process? Many thanks!

ahaensch gravatar imageahaensch ( 2012-09-27 09:04:13 -0500 )edit

I think you need to get out of the terminal completely. Then, start it again to make the system re-read the `.bash_profile` file. You should be able to give the following command at a unix prompt to see the value of the variable: `echo $SAGE_BROWSER`.

calc314 gravatar imagecalc314 ( 2012-09-28 15:59:54 -0500 )edit

answered 2012-10-23 09:19:37 -0500

Ivan Andrus gravatar image

updated 2012-10-23 09:21:33 -0500

If you are using the GUI, then you will have to set the environment variable in a way other than in a shell file. See this stackoverflow question for an overview of the ways to do that.

Also, you probably want to set SAGE_BROWSER to

SAGE_BROWSER='open -a Safari'

since it has to be something that you can run from the command line.

edit flag offensive delete link more


I didn't realize that had to be that kind of command, good info!

kcrisman gravatar imagekcrisman ( 2012-10-23 16:17:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-09-27 04:48:54 -0500

Seen: 926 times

Last updated: Oct 23 '12