Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm trying to add my Qt4.3 directory to my PATH, but I'm getting wierd results. I tried setting the two files:
Edited /etc/profile to:
if [ "`id -u`" -eq 0 ]; then
.bashrc and .bash_profile are hidden files in the users home directory. /etc would have bash_profile and bashrc (bash.bashrc on some distros).
This is stated incorrectly. It should be '# PATH=$PATH:/usr/local/Qt4.3/bin'. Then remove the comment tag (#) and the double quotes. For more information on the issue of quotes (single and double) see the bash man pages.
The first version above leaves PATH with just one folder: /usr/local/Qt4.3/bin, assuming the double quotes haven't caused problems.
The second version assigns PATH the current value of PATH plus /usr/local/Qt4.3/bin
Last edited by bigrigdriver; 09-18-2007 at 12:11 PM.
Yes I know the hash symbol is a comment, I've altered the file a bit since it didn't work just to see if it made any difference.
I tried with and without quotes, also just to see if it made a difference, but the quotes didn't seem to cause any problem.
This is what my first attempt looked like:
if [ "`id -u`" -eq 0 ]; then
# if ... fi prompt stuff
But the point is when I type echo $PATH on the command line, it looks like:
There's no X11 in my profile (!?) which led me to think that the path is being set from another script elsewhere...but where ??
I did a grep on X11, looked in home and /etc directories, only file that contains it is /etc/.login.defs (see my first post) but changing this file sort-of worked, if I was super user, path had Qt in there, but not as normal user...can't figure this out !
Then perhaps a different search query is called for in your case. Try find /etc -type f | xargs grep 'PATH' to find all references in /etc for PATH. Then track then down one by one until you find the offending case.
Maybe, the best place to define PATH is an entry in /etc/profile.d directory. Look at the other files there: you can put a similar script named qt4.sh. On my OpenSuse box I installed the Qt development package (headers and libraries) and it put qt3.sh and qt3.csh in /etc/profile.d automatically. If you have installed from source, you may have a look in the directory where you compiled and look if these scripts have been created for you. Cheers!