Ask Your Question

change default web browser

asked 2012-09-27 11:48:54 +0200

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-10-23 16:19:37 +0200

Ivan Andrus gravatar image

updated 2012-10-23 16:21:33 +0200

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 23:17:18 +0200 )edit

answered 2012-09-27 13:32:22 +0200

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 14:43:48 +0200 )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 16:04:13 +0200 )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 22:59:54 +0200 )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 11:48:54 +0200

Seen: 3,728 times

Last updated: Oct 23 '12