Click to See Complete Forum and Search --> : PATH enviroment setting
It seems like whatever I read is either too simple or too complex regarding the PATH enviroment setting.
I went thru the qt2 designer manual. The user interface compiler, uic, is found in the absolute path
/home/mike/usr/lib/qt2/bin/uic
to compile I use this.
I produced both a header and implementable file
extension/ no errors
When I went to g++ compile I get an error, I think because I'm not finding the files I want to compile using g++.
How can I set the PATH enviroment so that I can execute qt2 bin files without using absolute pathnames
BTW
I'm a hobbiest, own system, with su privledges
TIA
Mike Re-v
in whatever script you want when you log in add this:
PATH=$PATH:whatever/path/you/want/to/add
export PATH
OR
export PATH=$PATH:whatever/path/you/want/to/add
I know I'm as dense as concrete.
Are you saying add the Export command at a command line interpreter prompt?
$
#
using the bash shell
or is it export in the beginning of a txt file or program
like a #!/usr/bin/python hook?
Thanks
MIke Re-v
Just did a PATH=$PATH:/whatever/path/you/want/to/add
at the #su on prompt worked perfectly
Thank you.
Question
I typed env at the prompt and wow where did that come from?
What file am I addressing when I do a env builtin command at the command line prompt? This file could be changed so that I don't have to run the PATH command every time?
TIA
MIke Re-v
bwkaz
10-09-2002, 09:32 PM
It didn't come (directly) from a file, rather, it came from bash's process space (the memory it takes up).
To change it permanently, you change some of the files that bash executes when it starts up, to do that export, so that it gets set in all your shells.
Personally, I think the easiest way is to add the export to both /etc/profile and /etc/bashrc. That way, it doesn't matter whether this shell is a first login shell, or one started later -- they execute different files. It also doesn't matter who you're logging in as, since because these files are in /etc, they apply to all users.
However, there's a chance that root's personal ~/.bashrc or ~/.profile or ~/.bash_profile will undo your changes (by doing an export PATH=/bin:/usr/bin:/sbin:/usr/sbin or something). If this happens on your system, just add your path to the colon-separated paths that root should be using -- of course, this only applies if you'll want to execute these programs as root.