Ignore:
Timestamp:
08/22/2003 03:37:27 PM (21 years ago)
Author:
Larry Lawrence <larry@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 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, 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, v5_0, v5_0-pre1, v5_1, v5_1-pre1, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
0108c1d
Parents:
71f73f0f
Message:

Added Bill's patch to postlfs

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/config/profile.xml

    r71f73f0f rcfc2a54  
    66referred to as just "the shell") uses a collection of startup files to
    77help create an environment to run in.  Each file has a specific use and
    8 may affect login and interactive environments differently.</para>
    9 
    10 <para>An interactive login shell is started after a successful login by
    11 <filename>/bin/login</filename> by reading the
     8may affect login and interactive environments differently.  The files in
     9the <filename>/etc</filename> directory generally provide global
     10settings. If an equivalent file exists in your home directory it may
     11override the global settings.
     12</para>
     13
     14<para>An interactive login shell is started after a successful login, using
     15<filename>/bin/login</filename>, by reading the
    1216<filename>/etc/passwd</filename> file.  An
    1317interactive non-login shell is started at the command line (e.g.
     
    2125Shells.</emphasis></para>
    2226
    23 <para>The following files are needed to make sure that the correct
    24 environment is read for each of the ways the shell can be invoked:
    25 <filename>/etc/profile</filename>, <filename>/etc/bashrc</filename>,
     27<para>The following files are used to make sure that the correct
     28environment is established for each of the ways the shell can be invoked:
     29<filename>/etc/profile</filename> and its private equivalent
    2630<filename>~/.bash_profile</filename>, and
    27 <filename>~/.bashrc</filename>.  The file
    28 <filename>~/.bash_logout</filename> is not used for an invocation of the
    29 shell.  It is read by the shell when a user logouts of the system.  The
    30 files <filename>/etc/profile</filename> and
     31<filename>/etc/bashrc</filename> (unofficial) and its private equivalent
     32<filename>~/.bashrc</filename>.
     33</para>
     34
     35<para>
     36The file <filename>~/.bash_logout</filename> is not used for an
     37invocation of the shell.  It is read by the shell when a user logs out
     38of the system.</para>
     39
     40<para>The files <filename>/etc/profile</filename> and
    3141<filename>~/.bash_profile</filename> are read when the shell is invoked
    32 as a interactive login shell.  The file <filename>~/.bashrc</filename>
     42as an interactive login shell.  The file <filename>~/.bashrc</filename>
    3343is read when the shell is invoked as an interactive non-login
    34 shell.</para>
     44shell and it reads <filename>/etc/bashrc</filename> if it exists</para>
     45
     46<para>Also useful are the <filename>/etc/dircolors</filename> and
     47<filename>~/.dircolors</filename> files called from
     48<filename>/etc/profile</filename>. They control colorized output of
     49things like <emphasis>ls --color</emphasis>.
     50</para>
    3551
    3652<para>Here is a base <filename>/etc/profile</filename>.  Comments in the
     
    141157
    142158<para>Here is a base <filename>~/.bash_profile</filename>.  Comments in
    143 the file should explain everything you need.</para>
     159the file should explain everything you need.  If you want each new user
     160to have this file automatically provided, just change the output of the
     161next command to <filename>/etc/skel/.bash_profile</filename> and check the
     162permissions after the command is run. You can then copy
     163<filename>/etc/skel/.bash_profile</filename> to the home directories of
     164already existing users, including root, and set the owner and group
     165appropriately.
     166</para>
    144167
    145168<screen><userinput><command>cat &gt; ~/.bash_profile &lt;&lt; "EOF"</command>
     
    168191
    169192<para>Here is a base <filename>~/.bashrc</filename>.  Comments in the
    170 file should explain everything you need.</para>
     193file should explain everything you need.  The comments and
     194instructions for using <filename>/etc/skel</filename> for
     195<filename>.bash_profile</filename> above also apply here. Only the
     196target file names are different.</para>
    171197
    172198<screen><userinput><command>cat &gt; ~/.bashrc &lt;&lt; "EOF"</command>
     
    205231<command>EOF</command></userinput></screen>
    206232
    207 <para>If you want to use the <filename>/etc/dircolors</filename> or
    208 <filename>~/.dircolors</filename> files called from
    209 <filename>/etc/profile</filename>, then run the following:
    210 <userinput>/bin/dircolors -p > /etc/dircolors</userinput> or
    211 <userinput>/bin/dircolors -p > ~/.dircolors</userinput> respectively.
    212 The file in the <filename>/etc</filename> directory should be used for
    213 global settings and if one exists in your home directory then it will
    214 overwrite the global settings.  It might be a good idea to create a base
    215 <filename>.dircolors</filename> file and place it in the
    216 <filename>/etc/skel</filename> directory for new users.</para>
     233<para>
     234If you want to use the <filename>dircolors</filename> capability
     235then run the following command. The <filename>/etc/skel</filename> setup
     236steps seen above also can be used here to provide a
     237<filename>.dircolors</filename> file when a new user is set up. As
     238before, just change the output file name on the following command and
     239assure the permissions, owner and group are correct on the files created
     240and/or copied.
     241</para>
     242
     243<para>
     244<userinput><command>/bin/dircolors -p > /etc/dircolors</command></userinput>
     245</para>
    217246
    218247<para>Ian Macdonald has written an excellent collection of tips and
Note: See TracChangeset for help on using the changeset viewer.