LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices

Reply
 
Search this Thread
Old 06-27-2006, 01:13 PM   #1
v333k
Member
 
Registered: Apr 2004
Location: 127.0.0.1
Posts: 38

Rep: Reputation: 15
setting environment variables


Hi,
I working with Fedora Core 5 and I am trying to install QT.
I have done the installation and the next step is to update my environement variable.

I am using bash.

I looked at the online documentation and they said I need to add to my .profile the following:

PATH=/usr/local/Trolltech/Qt-4.1.4/bin:$PATH
export PATH

I did so by adding it to different places:
1. /etc/profile
2. ~/.bashrc
3. /etc/bash

when I type set, my PATH doesn't append the new string.

What should I do? I am doing exactly as I am reading and it is not working!


v333k
 
Old 06-27-2006, 01:20 PM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
After you've edited your .bash_profile or .profile, you need to use source, e.g. "source .bash_profile". Either file should be in your home directory, if not there you can create them. If you run set after that, you should see the changes.

Edit: see this post for a reason you should add it to .bash_profile instead of .bashrc.

Last edited by Nylex; 06-27-2006 at 02:09 PM.
 
Old 06-27-2006, 01:25 PM   #3
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
Simple add this line at the end of /etc/profile and relogin (Sometimes reboot might be required)
Code:
export PATH=$PATH:/usr/local/Trolltech/Qt-4.1.4/bin
It should work.
 
Old 06-27-2006, 02:03 PM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
If you use source, you don't have to reboot or login again..
 
Old 06-27-2006, 02:36 PM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
The changed path will exist in the shell where you sourced your profile, or ran "bash -l", however it won't change for other shells, such as when you click on an icon for a qt program. You need to log out and log in again to do that.
 
Old 06-27-2006, 03:15 PM   #6
v333k
Member
 
Registered: Apr 2004
Location: 127.0.0.1
Posts: 38

Original Poster
Rep: Reputation: 15
it works

Thanks! The "source" fixed it.

THanks again!

v333k
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment variables setting... simjii Suse/Novell 4 11-19-2005 07:50 PM
Setting Environment Variables rbh123 Linux - Newbie 2 10-03-2005 06:34 PM
setting environment variables jayjoh Linux - Newbie 9 07-12-2004 12:35 PM
setting environment variables durden2.0 Linux - Newbie 5 07-15-2003 01:57 PM
setting environment variables rezza Linux - Distributions 2 04-09-2003 08:21 AM


All times are GMT -5. The time now is 09:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration