<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Sorry to double write here but what does.<br><br><br><p class="line874">This file is specifically meant for system-wide
environment variable settings. It is not a script file, but rather
consists of assignment expressions, one per line. <span class="anchor" id="line-156"></span><span class="anchor" id="line-157"></span></p><p class="line867"><span class="anchor" id="line-158"></span><span class="anchor" id="line-159"></span></p><pre><span class="anchor" id="line-1-15"></span>FOO=bar <----mean?<br><br>Thanks.<br></pre><br><div><hr id="stopSpelling">From: pj.world@hotmail.com<br>To: tclug-list@mn-linux.org<br>Date: Mon, 21 Apr 2014 19:16:55 -0500<br>Subject: Re: [tclug-list] Firefox 28 on Ubuntu 10.04 [Solved]<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Thanks everyone for helping with this old post. I actually found out that /etc/environment is actually preferred for setting system wide path.<br><br>I attached a bit of reading to anyone interested. <br><br><h2 id="ecxSystem-wide_environment_variables">System-wide environment variables</h2>
<span class="ecxanchor" id="ecxline-152"></span><p class="ecxline862">A suitable file for environment variable settings that affect the system as a whole (rather than just a particular user) is <strong>/etc/environment</strong>. An alternative is to create a file for the purpose in the <strong>/etc/profile.d</strong> directory. <span class="ecxanchor" id="ecxline-153"></span><span class="ecxanchor" id="ecxline-154"></span></p><p class="ecxline867">
</p><h3 id="ecxA.2BAC8-etc.2BAC8-environment">/etc/environment</h3>
<span class="ecxanchor" id="ecxline-155"></span><p class="ecxline874">This file
is specifically meant for system-wide environment variable settings. It
is not a script file, but rather consists of assignment expressions, one
per line. <span class="ecxanchor" id="ecxline-156"></span><span class="ecxanchor" id="ecxline-157"></span></p><p class="ecxline867"><span class="ecxanchor" id="ecxline-158"></span><span class="ecxanchor" id="ecxline-159"></span></p><pre><span class="ecxanchor" id="ecxline-1-15"></span>FOO=bar</pre><span class="ecxanchor" id="ecxline-160"></span><span class="ecxanchor" id="ecxline-161"></span><p class="ecxline867"><strong>Note:</strong> Variable expansion does not work in <strong>/etc/environment</strong>. <span class="ecxanchor" id="ecxline-162"></span><span class="ecxanchor" id="ecxline-163"></span></p><p class="ecxline867">
</p><h3 id="ecxA.2BAC8-etc.2BAC8-profile.d.2BAC8.2A.sh">/etc/profile.d/*.sh</h3>
<span class="ecxanchor" id="ecxline-164"></span><p class="ecxline862">Files with the .sh extension in the <strong>/etc/profile.d</strong>
directory get executed whenever a bash login shell is entered (e.g.
when logging in from the console or over ssh), as well as by the
DisplayManager when the desktop session loads. <span class="ecxanchor" id="ecxline-165"></span><span class="ecxanchor" id="ecxline-166"></span></p><p class="ecxline862">You can for instance create the file <strong>/etc/profile.d/myenvvars.sh</strong> and set variables like this: <span class="ecxanchor" id="ecxline-167"></span><span class="ecxanchor" id="ecxline-168"></span></p><p class="ecxline867"><span class="ecxanchor" id="ecxline-169"></span><span class="ecxanchor" id="ecxline-170"></span><span class="ecxanchor" id="ecxline-171"></span></p><pre><span class="ecxanchor" id="ecxline-1-16"></span>export JAVA_HOME=/usr/lib/jvm/jdk1.7.0
<span class="ecxanchor" id="ecxline-2-3"></span>export PATH=$PATH:$JAVA_HOME/bin</pre><span class="ecxanchor" id="ecxline-172"></span><span class="ecxanchor" id="ecxline-173"></span><p class="ecxline867">
</p><h3 id="ecxOther_files-1">Other files</h3>
<span class="ecxanchor" id="ecxline-174"></span><p class="ecxline862">While <strong>/etc/profile</strong>
is often suggested for setting environment variables system-wide, it is
a configuration file of the base-files package, so it's not appropriate
to edit that file directly. Use a file in <strong>/etc/profile.d</strong> instead as shown above. (Files in <strong>/etc/profile.d</strong> are sourced by <strong>/etc/profile</strong>.) <span class="ecxanchor" id="ecxline-175"></span><span class="ecxanchor" id="ecxline-176"></span></p><p class="ecxline867"><strong>/etc/default/locale</strong> is specifically meant for system-wide <span class="u">locale</span>
environment variable settings. It's written to by the installer and
when you use Language Support to set the language or regional formats
system-wide. On a desktop system there is normally no reason to edit
this file manually. <span class="ecxanchor" id="ecxline-177"></span><span class="ecxanchor" id="ecxline-178"></span></p>The shell config file <strong>/etc/bash.bashrc</strong>
is sometimes suggested for setting environment variables system-wide.
While this may work on Bash shells for programs started from the shell,
variables set in that file are not available by default to programs
started from the graphical environment in a desktop session. <br><br>Thanks,<br><br>paul<br><br><br><br><div>> From: chewie@wookimus.net<br>> To: tclug-list@mn-linux.org<br>> Date: Wed, 26 Mar 2014 23:15:39 -0500<br>> Subject: Re: [tclug-list] Firefox 28 on Ubuntu 10.04 [Solved]<br>> <br>> Mike Miller <mbmiller+l@gmail.com> wrote:<br>> > I wonder why. Where does PATH get set? I don't see PATH in<br>> > /etc/bash.bashrc or in /etc/profile, but it is coming from<br>> > somewhere. Anyone know where?<br>> <br>> Default PATH's are generally set in your /etc/login.defs as ENV_PATH for<br>> users and ENV_SUPATH for super-users. This will set the default paths<br>> regardless of the shell you're using or how that shell was invoked.<br>> <br>> man -s5 login.defs<br>> <br>> Chad<br>> <br>> _______________________________________________<br>> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>> tclug-list@mn-linux.org<br>> http://mailman.mn-linux.org/mailman/listinfo/tclug-list<br></div> </div>
<br>_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
tclug-list@mn-linux.org
http://mailman.mn-linux.org/mailman/listinfo/tclug-list</div> </div></body>
</html>