Ignore:
Timestamp:
08/08/2004 02:11:27 AM (20 years ago)
Author:
Gerard Beekmans <gerard@…>
Branches:
6.0
Children:
1dc34de7
Parents:
ef13657
Message:

Completed global edits for upcoming 6.0 release

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4001 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/profile.xml

    ref13657 r5ba3d1d  
    1111
    1212<para>The shell program <command>/bin/bash</command> (hereafter
    13 referred to as just <quote>the shell</quote>) uses a collection of startup files to
    14 help create an environment to run in.  Each file has a specific use and
    15 may affect login and interactive environments differently.  The files in
    16 the <filename class="directory">/etc</filename> directory generally provide global
    17 settings. If an equivalent file exists in your home directory it may
    18 override the global settings.
    19 </para>
     13referred to as <quote>the shell</quote>) uses a collection of startup
     14files to help create an environment to run in. Each file has a
     15specific use and may affect login and interactive environments
     16differently. The files in the <filename
     17class="directory">/etc</filename> directory provide global settings.
     18If an equivalent file exists in the home directory, it may override
     19the global settings.</para>
    2020
    21 <para>An interactive login shell is started after a successful login, using
    22 <command>/bin/login</command>, by reading the
    23 <filename>/etc/passwd</filename> file.  An
    24 interactive non-login shell is started at the command-line (e.g.,
    25 <prompt>[prompt]$</prompt><command>/bin/bash</command>).  A non-interactive
    26 shell is usually present when a shell script is running.  It is non-interactive
    27 because it is processing a script and not waiting for user input between
    28 commands.</para>
     21<para>An interactive login shell is started after a successful login,
     22using <command>/bin/login</command>, by reading the
     23<filename>/etc/passwd</filename> file. An interactive non-login shell
     24is started at the command-line (e.g.,
     25<prompt>[prompt]$</prompt><command>/bin/bash</command>). A
     26non-interactive shell is usually present when a shell script is
     27running. It is non-interactive because it is processing a script and
     28not waiting for user input between commands.</para>
    2929
    30 <para>For more information see <command>info bash</command> --
    31 <emphasis role="strong">Nodes: Bash Startup Files and Interactive
    32 Shells.</emphasis></para>
     30<para>For more information, see <command>info bash</command> -- Nodes:
     31Bash Startup Files and Interactive Shells.</para>
    3332
    3433<para>The files <filename>/etc/profile</filename> and
    35 <filename>~/.bash_profile</filename> are read when the shell is invoked
    36 as an interactive login shell.</para>
     34<filename>~/.bash_profile</filename> are read when the shell is
     35invoked as an interactive login shell.</para>
    3736
    38 <para>A base <filename>/etc/profile</filename> created below sets some
    39 environment variables necessary for native language support. By setting them
    40 properly, you get:
    41 </para>
     37<para>A base <filename>/etc/profile</filename> below sets some
     38environment variables necessary for native language support. Setting
     39them properly results in:</para>
     40
    4241<itemizedlist>
    4342<listitem><para>the output of programs translated into your native
    4443language;</para></listitem>
    45 <listitem><para>correct classification of characters into letters, digits and
    46 other classes - this is necessary for Bash to accept non-ASCII characters
    47 in command lines properly in non-English locales;</para></listitem>
    48 <listitem><para>the alphabetical sorting order correct for your
     44<listitem><para>correct classification of characters into letters,
     45digits and other classes. This is necessary for Bash to properly
     46accept non-ASCII characters in command lines in non-English
     47locales;</para></listitem>
     48<listitem><para>the correct alphabetical sorting order for the
    4949country;</para></listitem>
    50 <listitem><para>good default paper size;</para></listitem>
     50<listitem><para>appropriate default paper size;</para></listitem>
    5151<listitem><para>correct formatting of monetary, time and date
    5252values.</para></listitem>
    5353</itemizedlist>
    5454
    55 <para>This script also sets the INPUTRC environment variable that makes
    56 <application>Bash</application> and <application>Readline</application> use
    57 the <filename>/etc/inputrc</filename> file we created earlier.</para>
     55<para>This script also sets the <emphasis>INPUTRC</emphasis>
     56environment variable that makes <application>Bash</application> and
     57<application>Readline</application> use the
     58<filename>/etc/inputrc</filename> file created earlier.</para>
    5859
    5960<para>Replace <replaceable>[ll]</replaceable> below with the
    60 two-letter code for your language (e.g., <quote>en</quote>) and
    61 <replaceable>[CC]</replaceable> with the two-letter code for your country
    62 (e.g., <quote>GB</quote>). Also you may need to specify
    63 (and this is actually the preferred form) your
    64 character encoding (e.g. <quote>iso8859-1</quote>) after a dot
    65 (so that the result is <quote>en_GB.iso8859-1</quote>).
    66 Issue the following command for more information:</para>
     61two-letter code for the desired language (e.g., <quote>en</quote>) and
     62<replaceable>[CC]</replaceable> with the two-letter code for the
     63appropriate country (e.g., <quote>GB</quote>). It may also be
     64necessary to specify (and this is actually the preferred form) the
     65character encoding (e.g.  <quote>iso8859-1</quote>) after a dot (so
     66that the result is <quote>en_GB.iso8859-1</quote>).  Issue the
     67following command for more information:</para>
    6768
    6869<screen><userinput>man 3 setlocale</userinput></screen>
     
    7374<screen><userinput>locale -a</userinput></screen>
    7475
    75 <para>Now, when you are sure about your locale settings, create the
     76<para>Once the proper locale settings have been determined, create the
    7677<filename>/etc/profile</filename> file:</para>
    7778
     
    8788
    8889<note><para>The <quote>C</quote> (default) and <quote>en_US</quote>
    89 (the recommended one for US English users) locales are
     90(the recommended one for United States English users) locales are
    9091different.</para></note>
    9192
    92 <para>Setting the keyboard layout,
    93 the screen font and the locale-related environment variables
    94 are the only internationalization steps needed to support
    95 locales that use ordinary single-byte encodings and left-to-right
    96 writing direction. More complex cases (including UTF-8 based locales)
    97 require additional steps and additional patches because many applications
    98 tend to break in such conditions. Because of too little educational
    99 value for a typical reader, these steps and patches are not included
    100 in the LFS book and such locales are not supported by LFS in any way.
    101 </para>
     93<para>Setting the keyboard layout, the screen font, and the
     94locale-related environment variables are the only internationalization
     95steps needed to support locales that use ordinary single-byte
     96encodings and left-to-right writing direction. More complex cases
     97(including UTF-8 based locales) require additional steps and
     98additional patches because many applications tend to not work properly
     99under such conditions.  These steps and patches are not included in
     100the LFS book and such locales are not supported by LFS in any
     101way.</para>
     102
    102103</sect1>
     104
Note: See TracChangeset for help on using the changeset viewer.