Changeset 99e8a229
- Timestamp:
- 01/14/2005 07:11:02 AM (20 years ago)
- 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
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
general.ent
r0fb1ed2 r99e8a229 1 <!ENTITY day "1 3">1 <!ENTITY day "14"> 2 2 <!ENTITY month "01"> 3 3 <!ENTITY year "2005"> -
postlfs/config/profile.xml
r0fb1ed2 r99e8a229 18 18 help create an environment. Each file has a specific use and 19 19 may affect login and interactive environments differently. The files in 20 the <filename class="directory">/etc</filename> directory generally provide global21 settings. If an equivalent file exists in your home directory it may20 the <filename class="directory">/etc</filename> directory generally provide 21 global settings. If an equivalent file exists in your home directory it may 22 22 override the global settings. 23 23 </para> … … 26 26 <filename>/bin/login</filename>, by reading the <filename>/etc/passwd</filename> 27 27 file. This shell invocation normally reads <filename>/etc/profile</filename> 28 and its private equivalent <filename>~/.bash_profile</filename> upon startup.</para> 28 and its private equivalent <filename>~/.bash_profile</filename> upon 29 startup.</para> 29 30 30 31 <para>An interactive non-login shell is normally started at the command-line … … 46 47 interactive login shell.</para> 47 48 48 <para>To the standard files, we also add <filename>/etc/bashrc</filename>49 which is called from the user's <filename>~/.bashrc</filename> for50 system wide initialization ofnon-login shells.</para>49 <para>To the standard files, <filename>/etc/bashrc</filename> is called from 50 the user's <filename>~/.bashrc</filename> for system wide initialization of 51 non-login shells.</para> 51 52 52 53 <para>For more information see <command>info bash</command> -- … … 54 55 Shells.</emphasis></para> 55 56 56 <sect2 >57 <sect2 id="etc-profile-profile"> 57 58 <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> 58 62 59 63 <para>Here is a base <filename>/etc/profile</filename>. This file starts by … … 131 135 done 132 136 133 # Now to clean up after ourselves137 # Now to clean up 134 138 unset pathremove pathprepend pathappend 135 139 … … 137 141 <command>EOF</command></userinput></screen> 138 142 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> 149 directory, where the individual initialization scripts are placed.</para> 140 150 141 151 <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"> 144 155 <title><filename>/etc/profile.d/dircolors.sh</filename></title> 156 <indexterm zone="postlfs-config-profile etc-profile.d-dircolors.sh"> 157 <primary 158 sortas="e-etc-profile.d-dircolors.sh">/etc/profile.d/dircolors.sh</primary> 159 </indexterm> 145 160 146 161 <para>This script uses the <filename>~/.dircolors</filename> and … … 148 163 directory listing. They control colorized output of things like <command>ls 149 164 --color</command>. The explaination of how to initialize these files is at the 150 end of this section. </para> 151 165 end of this section.</para> 152 166 153 167 <screen><userinput><command>cat > /etc/profile.d/dircolors.sh << "EOF"</command> … … 164 178 </sect3> 165 179 166 167 <sect3> 180 <sect3 id="extrapaths.sh"> 168 181 <title><filename>/etc/profile.d/extrapaths.sh</filename></title> 182 <indexterm zone="postlfs-config-profile extrapaths.sh"> 183 <primary 184 sortas="e-etc-profile.d-extrapaths.sh">/etc/profile.d/extrapaths.sh</primary> 185 </indexterm> 169 186 170 187 <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 189 uncomment the last section to put a dot at the end of your path. This will 190 allow executables in the current working directory to be executed without 191 specifiying a ./, however you are warned that this is generally considered a 192 security hazard.</para> 175 193 176 194 <screen><userinput><command>cat > /etc/profile.d/extrapaths.sh << "EOF"</command> … … 199 217 </sect3> 200 218 201 <sect3 >219 <sect3 id="readline.sh"> 202 220 <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 223 sortas="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> 227 configuration file. If the user does not have individual settings, it uses the 228 global file.</para> 206 229 207 230 <screen><userinput><command>cat > /etc/profile.d/readline.sh << "EOF"</command> … … 214 237 </sect3> 215 238 216 <sect3 >239 <sect3 id="tinker-term.sh"> 217 240 <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 243 sortas="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 247 color.</para> 220 248 221 249 <screen><userinput><command>cat > /etc/profile.d/tinker-term.sh << "EOF"</command> … … 233 261 </sect3> 234 262 235 <sect3 >263 <sect3 id="umask.sh"> 236 264 <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 267 sortas="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. 271 Here the default group write permissions are turned off for system users and when 272 the user name and group name are not the same.</para> 241 273 242 274 <screen><userinput><command>cat > /etc/profile.d/umask.sh << "EOF"</command> … … 250 282 </sect3> 251 283 252 <sect3 >284 <sect3 id="X.sh"> 253 285 <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 288 sortas="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> 292 and <envar>PKG_CONFIG_PATH</envar> variables are also updated.</para> 257 293 258 294 <screen><userinput><command>cat > /etc/profile.d/X.sh << "EOF"</command> … … 266 302 </sect3> 267 303 268 <sect3 >304 <sect3 id="titlebars.sh"> 269 305 <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 308 sortas="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. 312 The 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 315 primary prompt.</para> 275 316 276 317 <screen><userinput><command>cat > /etc/profile.d/xterm-titlebars.sh << "EOF"</command> … … 283 324 </sect3> 284 325 285 <sect3 >326 <sect3 id="i18n.sh"> 286 327 <title><filename>/etc/profile.d/i18n.sh</filename></title> 328 <indexterm zone="postlfs-config-profile i18n.sh"> 329 <primary 330 sortas="e-etc-profile.d-i18n.sh">/etc/profile.d/i18n.sh</primary> 331 </indexterm> 287 332 288 333 <para>This script shows how to set some environment variables necessary for … … 327 372 <command>EOF</command></userinput></screen> 328 373 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 375 categories. For better control, you may prefer to set values individually for 376 all categories listed in the output of the <command>locale</command> 377 command.</para> 332 378 333 379 <para>The <envar>G_FILENAME_ENCODING</envar> variable tells applications … … 341 387 <title><filename>Other initialization values</filename></title> 342 388 343 <para>Other initialization can easily be added to the <filename>profile</filename>344 by adding additional scripts to the389 <para>Other initialization can easily be added to the 390 <filename>profile</filename> by adding additional scripts to the 345 391 <filename class='directory'>/etc/profile.d</filename> directory.</para> 346 392 </sect3> … … 348 394 </sect2> 349 395 350 <sect2 >396 <sect2 id="etc-bashrc-profile"> 351 397 <title><filename>/etc/bashrc</filename></title> 398 <indexterm zone="postlfs-config-profile etc-bashrc-profile"> 399 <primary 400 sortas="e-etc-bashrc-profile">/etc/bashrc</primary> 401 </indexterm> 402 352 403 <para>Here is a base <filename>/etc/bashrc</filename>. Comments in the 353 404 file should explain everything you need.</para> … … 393 444 </sect2> 394 445 395 396 <sect2> 446 <sect2 id="bash_profile-profile"> 397 447 <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> 398 451 399 452 <para>Here is a base <filename>~/.bash_profile</filename>. If you want each … … 445 498 </sect2> 446 499 447 <sect2 >500 <sect2 id="bashrc-profile"> 448 501 <title><filename>~/.bashrc</filename></title> 502 <indexterm zone="postlfs-config-profile bashrc-profile"> 503 <primary sortas="e-AA.bashrc-profile">~/.bashrc</primary> 504 </indexterm> 449 505 450 506 <para>Here is a base <filename>~/.bashrc</filename>. The comments and … … 474 530 475 531 476 <sect2 >532 <sect2 id="bash_logout-profile"> 477 533 <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> 478 537 479 538 <para>This is an empty <filename>~/.bash_logout</filename> that can be used as … … 494 553 495 554 496 <sect2 >555 <sect2 id="etc-dircolors-profile"> 497 556 <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> 498 563 499 564 <para> If you want to use the <filename>dircolors</filename> capability, then 500 565 run the following command. The <filename class="directory">/etc/skel</filename> 501 566 setup 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, just503 change the output file name on the following command and assure the567 <filename>~/.dircolors</filename> file when a new user is set up. As before, 568 just change the output file name on the following command and assure the 504 569 permissions, owner, and group are correct on the files created and/or copied. 505 570 </para> … … 514 579 <para>Finally, Ian Macdonald has written an excellent collection of tips and 515 580 tricks 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 582 url="http://www.caliban.org/bash/index.shtml"> 583 http://www.caliban.org/bash/index.shtml</ulink>.</para> 518 584 </sect2> 519 585 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.