Skip to main content
p. 343

13.6 Startup File Pitfalls

Avoid these pitfalls in startup files:

  • Don’t put any kind of graphical command in a shell startup file. Not all shells run in graphical environments.
  • Don’t set the DISPLAY environment variable in a shell startup file. We haven’t looked at graphical environments yet, but this can cause your graphical session to misbehave.
  • Don’t set the terminal type in a shell startup file.
  • Don’t skimp on descriptive comments in default startup files.
  • Don’t run commands in a startup file that print to the standard output.
  • Never set LD_LIBRARY_PATH in a shell startup file (see Section 15.1.3).