Changeset 99e8a229


Ignore:
Timestamp:
01/14/2005 07:11:02 AM (20 years ago)
Author:
Randy McMurchy <randy@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 12.2, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gimp3, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/for-12.3, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/spidermonkey128, xry111/test-20220226, xry111/xf86-video-removal
Children:
a3045a1
Parents:
0fb1ed2
Message:

Added index tags to the postlfs-profile instructions

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3281 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • general.ent

    r0fb1ed2 r99e8a229  
    1 <!ENTITY day          "13">
     1<!ENTITY day          "14">
    22<!ENTITY month        "01">
    33<!ENTITY year         "2005">
  • postlfs/config/profile.xml

    r0fb1ed2 r99e8a229  
    1818help create an environment.  Each file has a specific use and
    1919may affect login and interactive environments differently.  The files in
    20 the <filename class="directory">/etc</filename> directory generally provide global
    21 settings. If an equivalent file exists in your home directory it may
     20the <filename class="directory">/etc</filename> directory generally provide
     21global settings. If an equivalent file exists in your home directory it may
    2222override the global settings.
    2323</para>
     
    2626<filename>/bin/login</filename>, by reading the <filename>/etc/passwd</filename>
    2727file.  This shell invocation normally reads <filename>/etc/profile</filename>
    28 and its private equivalent <filename>~/.bash_profile</filename> upon startup.</para>
     28and its private equivalent <filename>~/.bash_profile</filename> upon
     29startup.</para>
    2930
    3031<para>An interactive non-login shell is normally started at the command-line
     
    4647interactive login shell.</para>
    4748
    48 <para>To the standard files, we also add <filename>/etc/bashrc</filename>
    49 which is called from the user's <filename>~/.bashrc</filename> for
    50 system wide initialization of non-login shells.</para>
     49<para>To the standard files, <filename>/etc/bashrc</filename> is called from
     50the user's <filename>~/.bashrc</filename> for system wide initialization of
     51non-login shells.</para>
    5152
    5253<para>For more information see <command>info bash</command> --
     
    5455Shells.</emphasis></para>
    5556
    56 <sect2>
     57<sect2 id="etc-profile-profile">
    5758<title><filename>/etc/profile</filename></title>
     59<indexterm zone="postlfs-config-profile etc-profile-profile">
     60<primary sortas="e-etc-profile-profile">/etc/profile</primary>
     61</indexterm>
    5862
    5963<para>Here is a base <filename>/etc/profile</filename>. This file starts by
     
    131135done
    132136 
    133 # Now to clean up after ourselves
     137# Now to clean up
    134138unset pathremove pathprepend pathappend
    135139
     
    137141<command>EOF</command></userinput></screen>
    138142
    139 <para>Now create the <filename class='directory'>/etc/profile.d</filename> directory.</para>
     143<sect3 id="etc-profile.d"><title>The /etc/profile.d directory</title>
     144<indexterm zone="postlfs-config-profile etc-profile.d">
     145<primary sortas="e-etc-profile.d">/etc/profile.d</primary>
     146</indexterm>
     147
     148<para>Now create the <filename class='directory'>/etc/profile.d</filename>
     149directory, where the individual initialization scripts are placed.</para>
    140150
    141151<screen><userinput><command>install --directory --mode=0755 --owner=root --group=root /etc/profile.d</command></userinput></screen>
    142 
    143 <sect3>
     152</sect3>
     153
     154<sect3 id="etc-profile.d-dircolors.sh">
    144155<title><filename>/etc/profile.d/dircolors.sh</filename></title>
     156<indexterm zone="postlfs-config-profile etc-profile.d-dircolors.sh">
     157<primary
     158sortas="e-etc-profile.d-dircolors.sh">/etc/profile.d/dircolors.sh</primary>
     159</indexterm>
    145160
    146161<para>This script uses the <filename>~/.dircolors</filename> and
     
    148163directory listing. They control colorized output of things like <command>ls
    149164--color</command>.  The explaination of how to initialize these files is at the
    150 end of this section.  </para>
    151 
     165end of this section.</para>
    152166
    153167<screen><userinput><command>cat &gt; /etc/profile.d/dircolors.sh &lt;&lt; "EOF"</command>
     
    164178</sect3>
    165179
    166 
    167 <sect3>
     180<sect3 id="extrapaths.sh">
    168181<title><filename>/etc/profile.d/extrapaths.sh</filename></title>
     182<indexterm zone="postlfs-config-profile extrapaths.sh">
     183<primary
     184sortas="e-etc-profile.d-extrapaths.sh">/etc/profile.d/extrapaths.sh</primary>
     185</indexterm>
    169186
    170187<para>This script adds several useful paths to the <envar>PATH</envar> and
    171 <envar>PKG_CONFIG_PATH</envar> environment variables.  If you want, you can uncomment
    172 the last section to put a dot at the end of your path. This will allow executables in the
    173 current working directory to be executed without specifiying a ./, however
    174 you are warned that this is generally considered a security hazard.</para>
     188<envar>PKG_CONFIG_PATH</envar> environment variables.  If you want, you can
     189uncomment the last section to put a dot at the end of your path. This will
     190allow executables in the current working directory to be executed without
     191specifiying a ./, however you are warned that this is generally considered a
     192security hazard.</para>
    175193 
    176194<screen><userinput><command>cat &gt; /etc/profile.d/extrapaths.sh &lt;&lt; "EOF"</command>
     
    199217</sect3>
    200218
    201 <sect3>
     219<sect3 id="readline.sh">
    202220<title><filename>/etc/profile.d/readline.sh</filename></title>
    203 
    204 <para>This script sets up the default <filename>inputrc</filename> configuration file.
    205 If the user does not have individual settings, it uses the global file.</para>
     221<indexterm zone="postlfs-config-profile readline.sh">
     222<primary
     223sortas="e-etc-profile.d-readline.sh">/etc/profile.d/readline.sh</primary>
     224</indexterm>
     225
     226<para>This script sets up the default <filename>inputrc</filename>
     227configuration file. If the user does not have individual settings, it uses the
     228global file.</para>
    206229
    207230<screen><userinput><command>cat &gt; /etc/profile.d/readline.sh &lt;&lt; "EOF"</command>
     
    214237</sect3>
    215238
    216 <sect3>
     239<sect3 id="tinker-term.sh">
    217240<title><filename>/etc/profile.d/tinker-term.sh</filename></title>
    218 
    219 <para>Some applications need a specific <envar>TERM</envar> setting to support color.</para>
     241<indexterm zone="postlfs-config-profile tinker-term.sh">
     242<primary
     243sortas="e-etc-profile.d-tinker-term.sh">/etc/profile.d/tinker-term.sh</primary>
     244</indexterm>
     245
     246<para>Some applications need a specific <envar>TERM</envar> setting to support
     247color.</para>
    220248
    221249<screen><userinput><command>cat &gt; /etc/profile.d/tinker-term.sh &lt;&lt; "EOF"</command>
     
    233261</sect3>
    234262
    235 <sect3>
     263<sect3 id="umask.sh">
    236264<title><filename>/etc/profile.d/umask.sh</filename></title>
    237  
    238 <para>Setting the <command>umask</command> value is important for security. Here
    239 we turn off the default group write permissions for system users and when the
    240 user name and group name are not the same.</para>
     265<indexterm zone="postlfs-config-profile umask.sh">
     266<primary
     267sortas="e-etc-profile.d-umask.sh">/etc/profile.d/umask.sh</primary>
     268</indexterm>
     269 
     270<para>Setting the <command>umask</command> value is important for security.
     271Here the default group write permissions are turned off for system users and when
     272the user name and group name are not the same.</para>
    241273
    242274<screen><userinput><command>cat &gt; /etc/profile.d/umask.sh &lt;&lt; "EOF"</command>
     
    250282</sect3>
    251283
    252 <sect3>
     284<sect3 id="X.sh">
    253285<title><filename>/etc/profile.d/X.sh</filename></title>
    254 
    255 <para>If <application>X</application> is installed, we also update the <envar>PATH</envar>
    256 and <envar>PKG_CONFIG_PATH</envar> variables.</para>
     286<indexterm zone="postlfs-config-profile X.sh">
     287<primary
     288sortas="e-etc-profile.d-X.sh">/etc/profile.d/X.sh</primary>
     289</indexterm>
     290
     291<para>If <application>X</application> is installed, the <envar>PATH</envar>
     292and <envar>PKG_CONFIG_PATH</envar> variables are also updated.</para>
    257293
    258294<screen><userinput><command>cat &gt; /etc/profile.d/X.sh &lt;&lt; "EOF"</command>
     
    266302</sect3>
    267303
    268 <sect3>
     304<sect3 id="titlebars.sh">
    269305<title><filename>/etc/profile.d/xterm-titlebars.sh</filename></title>
    270  
    271 <para>This script shows an example of a different way of setting the prompt.  The normal
    272 variable, <envar>PS1</envar>, is supplemented by <envar>PROMPT_COMMAND</envar>.
    273 If set, the value of <envar>PROMPT_COMMAND</envar> is executed as a command prior to
    274 issuing each primary prompt. </para>
     306<indexterm zone="postlfs-config-profile titlebars.sh">
     307<primary
     308sortas="e-etc-profile.d-titlebars.sh">/etc/profile.d/titlebars.sh</primary>
     309</indexterm>
     310
     311<para>This script shows an example of a different way of setting the prompt.
     312The normal variable, <envar>PS1</envar>, is supplemented by
     313<envar>PROMPT_COMMAND</envar>. If set, the value of
     314<envar>PROMPT_COMMAND</envar> is executed as a command prior to issuing each
     315primary prompt.</para>
    275316 
    276317<screen><userinput><command>cat &gt; /etc/profile.d/xterm-titlebars.sh &lt;&lt; "EOF"</command>
     
    283324</sect3>
    284325
    285 <sect3>
     326<sect3 id="i18n.sh">
    286327<title><filename>/etc/profile.d/i18n.sh</filename></title>
     328<indexterm zone="postlfs-config-profile i18n.sh">
     329<primary
     330sortas="e-etc-profile.d-i18n.sh">/etc/profile.d/i18n.sh</primary>
     331</indexterm>
    287332
    288333<para>This script shows how to set some environment variables necessary for
     
    327372<command>EOF</command></userinput></screen>
    328373
    329 <para>The <envar>LC_ALL</envar> variable sets the same value for all locale categories. For
    330 better control, you may prefer to set values individually for all categories
    331 listed in the output of the <command>locale</command> command.</para>
     374<para>The <envar>LC_ALL</envar> variable sets the same value for all locale
     375categories. For better control, you may prefer to set values individually for
     376all categories listed in the output of the <command>locale</command>
     377command.</para>
    332378
    333379<para>The <envar>G_FILENAME_ENCODING</envar> variable tells applications
     
    341387<title><filename>Other initialization values</filename></title>
    342388
    343 <para>Other initialization can easily be added to the <filename>profile</filename>
    344 by adding additional scripts to the
     389<para>Other initialization can easily be added to the
     390<filename>profile</filename> by adding additional scripts to the
    345391<filename class='directory'>/etc/profile.d</filename> directory.</para>
    346392</sect3>
     
    348394</sect2>
    349395
    350 <sect2>
     396<sect2 id="etc-bashrc-profile">
    351397<title><filename>/etc/bashrc</filename></title>
     398<indexterm zone="postlfs-config-profile etc-bashrc-profile">
     399<primary
     400sortas="e-etc-bashrc-profile">/etc/bashrc</primary>
     401</indexterm>
     402
    352403<para>Here is a base <filename>/etc/bashrc</filename>.  Comments in the
    353404file should explain everything you need.</para>
     
    393444</sect2>
    394445
    395 
    396 <sect2>
     446<sect2 id="bash_profile-profile">
    397447<title><filename>~/.bash_profile</filename></title>
     448<indexterm zone="postlfs-config-profile bash_profile-profile">
     449<primary sortas="e-AA.bash_profile-profile">~/.bash_profile</primary>
     450</indexterm>
    398451
    399452<para>Here is a base <filename>~/.bash_profile</filename>.  If you want each
     
    445498</sect2>
    446499 
    447 <sect2>
     500<sect2 id="bashrc-profile">
    448501<title><filename>~/.bashrc</filename></title>
     502<indexterm zone="postlfs-config-profile bashrc-profile">
     503<primary sortas="e-AA.bashrc-profile">~/.bashrc</primary>
     504</indexterm>
    449505
    450506<para>Here is a base <filename>~/.bashrc</filename>.  The comments and
     
    474530 
    475531 
    476 <sect2>
     532<sect2 id="bash_logout-profile">
    477533<title><filename>~/.bash_logout</filename></title>
     534<indexterm zone="postlfs-config-profile bash_logout-profile">
     535<primary sortas="e-AA.bash_logout-profile">~/.bash_logout</primary>
     536</indexterm>
    478537
    479538<para>This is an empty <filename>~/.bash_logout</filename> that can be used as
     
    494553 
    495554 
    496 <sect2>
     555<sect2 id="etc-dircolors-profile">
    497556<title><filename>/etc/dircolors</filename></title>
     557<indexterm zone="postlfs-config-profile etc-dircolors-profile">
     558<primary sortas="e-etc-dircolors-profile">/etc/dircolors</primary>
     559</indexterm>
     560<indexterm zone="postlfs-config-profile etc-dircolors-profile">
     561<primary sortas="e-AA.dircolors-profile">~/.dircolors</primary>
     562</indexterm>
    498563
    499564<para> If you want to use the <filename>dircolors</filename> capability, then
    500565run the following command. The <filename class="directory">/etc/skel</filename>
    501566setup steps seen above also can be used here to provide a
    502 <filename>.dircolors</filename> file when a new user is set up. As before, just
    503 change the output file name on the following command and assure the
     567<filename>~/.dircolors</filename> file when a new user is set up. As before,
     568just change the output file name on the following command and assure the
    504569permissions, owner, and group are correct on the files created and/or copied.
    505570</para>
     
    514579<para>Finally, Ian Macdonald has written an excellent collection of tips and
    515580tricks to enhance your shell environment.  You can read it online at
    516 <ulink
    517 url="http://www.caliban.org/bash/index.shtml">http://www.caliban.org/bash/index.shtml</ulink>.</para>
     581<ulink
     582url="http://www.caliban.org/bash/index.shtml">
     583http://www.caliban.org/bash/index.shtml</ulink>.</para>
    518584</sect2>
    519585</sect1>
Note: See TracChangeset for help on using the changeset viewer.