You are not logged in.

#1 2011-04-29 20:49:05

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Environment Variable [SOLVED]

I'm getting the following in a pop up dialog box when clicking on a link in PkgBrowser.
It's not a big deal, but I'd like to get this figured out.

Could not start external browser.
Please check your $BROWSER environment variable.

I thought I had firefox set for the BROWSER though. In a terminal, env shows:

  
BROWSER=/usr/bin/firefox

I can't find much on the Arch way of configuring environment variables. 
I did however find this: http://www.gentoo.org/doc/en/handbook/h … t=2&chap=5

This got me thinking that our wiki needs a similar page, but Arch specific...
Where could I find info to translate the Gentoo info into Arch for a new wiki page.


EDIT to add info
In Evolution, clicking on a link in an email brings it up in Firefox.

Last edited by jeff story (2011-04-30 09:54:42)


Check out my website for info on the Arch Linux Installer

Offline

#2 2011-04-30 04:55:14

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Environment Variable [SOLVED]

Take a look here:

https://wiki.archlinux.org/index.php/Ba … _variables

If your shell shows firefox as the $BROWSER, then maybe it's a problem with the pkgbrowser program.

Offline

#3 2011-04-30 10:22:16

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: Environment Variable [SOLVED]

OK,

Thanks x33a,

PkgBrowser is opening links in Firefox now.

Due to the various distro specific info I found, and the different way they do things,
I'm not sure which change actually fixed it.....

I added:

 BROWSER=/usr/bin/firefox 

to several files, some of which already had:

if [ -n "$DISPLAY" ]; then
    BROWSER=firefox
else
    BROWSER=links
fi

These are few of the files I recall adding the code too.

~/.profile
~/.bashrc
~/.bash_profile
/etc/profile
/etc/environment

I figured out tonight a log out and in was necessary to activate the changes, so I thats part of the confusion on my part.
As soon as I logged out and in, the issue was resolved........

I do have another question though.  What's the significance of the "$" in $BROWSER and is BROWSER the same?

Last edited by jeff story (2011-04-30 10:27:13)


Check out my website for info on the Arch Linux Installer

Offline

#4 2011-04-30 11:51:29

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Environment Variable [SOLVED]

My bash skills are rather poor, but anyway BROWSER is the environment variable, and the shell expands any variable following the $ sign.

But when you export a variable in .bashrc and similar files, you don't put the $ sign in that file.

for example in a terminal, you'll get the following without the $ sign

echo BROWSER
BROWSER

and with the $ sign

echo $BROWSER
/usr/bin/firefox

Offline

Board footer

Powered by FluxBB