Search:  
Gentoo Wiki

TIP_Set_your_default_browser

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

Some software packages rely on your $BROWSER variable being set. This variable is a relatively new addition to the standard environment variables, and unlike $EDITOR (for example) it is not given a default value when you install Gentoo.

To test if your $BROWSER variable is set, enter the following command:

echo $BROWSER

If the name of your favourite browser doesn't appear then this variable has not been set.

One package that uses the $BROWSER variable is the Xfce desktop environment. It uses this variable to determine which program will display the online help. In this case if the variable is not set, it uses mozilla. This is fine if you have mozilla installed, but if you use firefox, it will display the message "Unable to execute mozilla. Online help is not available."

To set this variable to your chosen browser on a system-wide basis, you can add it to the bottom of /etc/env.d/99local (don't forget to do env-update). To set it for a particular user, add it to ~/.bash_profile. For example to set firefox as your default browser add the following:

export BROWSER="firefox"


Now if you echo your $BROWSER variable it should display the name 'firefox'

Retrieved from "http://www.gentoo-wiki.info/TIP_Set_your_default_browser"

Last modified: Thu, 04 Sep 2008 06:19:00 +0000 Hits: 17,485