Ask Your Question
2

change default web browser

asked 12 years ago

anonymous user

Anonymous

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?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 12 years ago

calc314 gravatar image

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

Preview: (hide)
link

Comments

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

kcrisman gravatar imagekcrisman ( 12 years ago )

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 ( 12 years ago )
1

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 ( 12 years ago )
1

answered 12 years ago

Ivan Andrus gravatar image

updated 12 years ago

If you are using the GUI Sage.app, 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.

Preview: (hide)
link

Comments

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

kcrisman gravatar imagekcrisman ( 12 years ago )

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 12 years ago

Seen: 4,288 times

Last updated: Oct 23 '12