/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-variables.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-variables.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.7 Revision 1.8
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-variables.xml,v 1.7 2004/08/02 20:07:02 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-variables.xml,v 1.8 2004/08/30 17:44:00 neysx Exp $ -->
8 8
9<sections> 9<sections>
10<section> 10<section>
11<title>Environment Variables?</title> 11<title>Environment Variables?</title>
12<subsection> 12<subsection>
13<title>What they are</title> 13<title>What they are</title>
14<body> 14<body>
15 15
16<p> 16<p>
17An environment variable is a named object that contains information used by one 17An environment variable is a named object that contains information used by one
18or more applications. Many users (and especially those new to Linux) find this a 18or more applications. Many users (and especially those new to Linux) find this
19bit weird or unmanageable. This is however wrong: by using environment variables 19a bit weird or unmanageable. However, this is a mistake: by using environment
20one can easily change a configuration setting for one or more applications. 20variables one can easily change a configuration setting for one or more
21applications.
21</p> 22</p>
22 23
23</body> 24</body>
24</subsection> 25</subsection>
25<subsection> 26<subsection>
182For instance, when <c>gcc</c> is updated, the <path>/etc/env.d/05gcc</path> file 183For instance, when <c>gcc</c> is updated, the <path>/etc/env.d/05gcc</path> file
183is updated too without requesting any user-interaction. 184is updated too without requesting any user-interaction.
184</p> 185</p>
185 186
186<p> 187<p>
187This doesn't only benefit Portage, but also you, as user. Occasionally you might 188This not only benefits Portage, but also you, as user. Occasionally you might
188be asked to set a certain environment variable system-wide. As an example we 189be asked to set a certain environment variable system-wide. As an example we
189take the <c>http_proxy</c> variable. Instead of messing with 190take the <c>http_proxy</c> variable. Instead of messing about with
190<path>/etc/profile</path>, you can now just create a file 191<path>/etc/profile</path>, you can now just create a file
191(<path>/etc/env.d/99local</path>) and enter your definition(s) in it: 192(<path>/etc/env.d/99local</path>) and enter your definition(s) in it:
192</p> 193</p>
193 194
194<pre caption="/etc/env.d/99local"> 195<pre caption="/etc/env.d/99local">
206<title>The env-update Script</title> 207<title>The env-update Script</title>
207<body> 208<body>
208 209
209<p> 210<p>
210Several files in <path>/etc/env.d</path> define the <c>PATH</c> variable. This 211Several files in <path>/etc/env.d</path> define the <c>PATH</c> variable. This
211is not wrong: when you run <c>env-update</c>, it will append the several 212is not a mistake: when you run <c>env-update</c>, it will append the several
212definitions before it updates the environment variables, thereby making it easy 213definitions before it updates the environment variables, thereby making it easy
213for packages (or users) to add their own environment variable settings without 214for packages (or users) to add their own environment variable settings without
214interfering with the already existing values. 215interfering with the already existing values.
215</p> 216</p>
216 217
278<body> 279<body>
279 280
280<p> 281<p>
281Sometimes even stricter definitions are requested. You might want to be able to 282Sometimes even stricter definitions are requested. You might want to be able to
282use binaries from a temporary directory you created without using the path to 283use binaries from a temporary directory you created without using the path to
283the binaries themselves or editing <path>~/.bashrc</path> for those few moments 284the binaries themselves or editing <path>~/.bashrc</path> for the short time
284you need it. 285you need it.
285</p> 286</p>
286 287
287<p> 288<p>
288In this case, you can just define the <c>PATH</c> variable in your current 289In this case, you can just define the <c>PATH</c> variable in your current

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20