[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: setting environmental vars with scripts



John Taber wrote:

I try to set an environment var in a simple script like
QTDIR=/usr/local/Qt-323-Win
export QTDIR
echo $QTDIR

when I run the script it echos back the correct path but when I go to my konsole and type echo $QTDIR it is not there . However if I type the script

That's right.

commands in the konsole, then it is there. Any explanation for this ? and how I can get a script to work ?
It is working. You don't want one script affecting everything else on the system.

If you want some environment variables set for all your console/terminal sessions,
1. set them in ~/.bashrc
2. Make sure that your terminal applications all start  a "login shell."

Just how you do this depends on your terminal application and the version of it. Read relevant documents.

--

Cheers
John

-- spambait
1aaaaaaa@computerdatasafe.com.au  Z1aaaaaaa@computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/



Reply to: