LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2007, 04:08 AM   #1
baosheng
Member
 
Registered: Oct 2004
Location: Lubbock, TX, USA
Distribution: Ubuntu 7.10
Posts: 74

Rep: Reputation: 15
can't set environment variable


hi guys,

I found a strange problem. I set an environment variable in /etc/profile

But when the computer rebooted, this variable hasn't been set. I have to manually use "source" command to set it. And the "source" could work.

How could this happen? And how to fix it?

Here is the shell log:
forrest@flavia:/forrest/work/cs/image/prj/leaf/distrib$ export | grep LD_LIBRARY_PATH
forrest@flavia:/forrest/work/cs/image/prj/leaf/distrib$ source /etc/profile
forrest@flavia:/forrest/work/cs/image/prj/leaf/distrib$ export | grep LD_LIBRARY_PATH
declare -x LD_LIBRARY_PATH="/home/forrest/vbox-ose-1.3.8/out/linux.x86/release/bin:/forrest/work/cs/image/prj/leaf/distrib/v75/runtime/glnx86:/forrest/work/cs/image/prj/leaf/distrib/v75/sys/os/glnx86:/forrest/work/cs/image/prj/leaf/distrib/v75/sys/java/jre/glnx86/jre1.5.0/lib/i386/native_threads:/forrest/work/cs/image/prj/leaf/distrib/v75/sys/java/jre/glnx86/jre1.5.0/lib/i386/server:/forrest/work/cs/image/prj/leaf/distrib/v75/sys/java/jre/glnx86/jre1.5.0/lib/i386"

I am using Ubuntu 7.04 beta.

Thanks.
 
Old 04-02-2007, 04:12 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
there's nothgin to "fix" that's perfectly correct behaviour. pesonally i'd be a little concerned if that was possible... if you wish to make any persistent changes, edit your ~/.bashrc or a similar file to make it make the change each time you log in.
 
Old 04-03-2007, 12:20 AM   #3
baosheng
Member
 
Registered: Oct 2004
Location: Lubbock, TX, USA
Distribution: Ubuntu 7.10
Posts: 74

Original Poster
Rep: Reputation: 15
i just wonder why i have to "source" it manually. it is uneccessary.
 
Old 04-03-2007, 01:53 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982Reputation: 1982
well you do that as it's not done automatically as you've not configured it as such. when you have done it correctly, it'll not neeed manually sourcing.
 
  


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
How to set an environment variable royeo Linux - Newbie 1 12-01-2006 12:59 AM
How to set a value of environment variable? ukrainet Linux - Newbie 1 12-28-2004 04:33 AM
Set Environment Variable lloyd_stevens Linux - Software 1 07-30-2003 12:38 PM
how to set CC environment variable mr.moto General 2 12-18-2001 01:02 AM
how do you set the environment variable CC? mr.moto Linux - General 0 12-17-2001 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:08 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration