2
0

dtprofile.src 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. XCOMM ##########################################################################
  2. XCOMM #
  3. XCOMM # .dtprofile
  4. XCOMM #
  5. XCOMM # user personal environment variables
  6. XCOMM #
  7. XCOMM # Common Desktop Environment (CDE)
  8. XCOMM #
  9. XCOMM # (c) Copyright 1996 Digital Equipment Corporation.
  10. XCOMM # (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
  11. XCOMM # (c) Copyright 1993,1994,1996 International Business Machines Corp.
  12. XCOMM # (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
  13. XCOMM # (c) Copyright 1993,1994,1996 Novell, Inc.
  14. XCOMM # (c) Copyright 1996 FUJITSU LIMITED.
  15. XCOMM # (c) Copyright 1996 Hitachi.
  16. XCOMM #
  17. XCOMM # SYSPROFILE COMMENT START
  18. XCOMM #
  19. XCOMM # ************** DO NOT EDIT THIS FILE **************
  20. XCOMM #
  21. XCOMM # CDE_INSTALLATION_TOP/config/sys.dtprofile is a factory-default file
  22. XCOMM # and will be unconditionally overwritten upon subsequent installation.
  23. XCOMM # Before making changes to the file, copy it to the configuration
  24. XCOMM # directory, CDE_CONFIGURATION_TOP/config.
  25. XCOMM #
  26. XCOMM # The sys.dtprofile file is copied to $HOME/.dtprofile the first
  27. XCOMM # time a user logs into the desktop. Any lines in sys.dtprofile
  28. XCOMM # located between "SYSPROFILE COMMENT START" and "SYSPROFILE COMMENT END"
  29. XCOMM # are filtered out during the copy.
  30. XCOMM #
  31. XCOMM # SYSPROFILE COMMENT END
  32. XCOMM #
  33. XCOMM # $TOG: dtprofile.src /main/5 1999/03/30 10:32:43 mgreess $
  34. XCOMM #
  35. XCOMM ##########################################################################
  36. XCOMM ##########################################################################
  37. XCOMM #
  38. XCOMM # Your $HOME/.dtprofile is read each time you login to the Common Desktop
  39. XCOMM # Environment (CDE) and is the place to set or override desktop
  40. XCOMM # environment variables for your session. Environment variables set in
  41. XCOMM # $HOME/.dtprofile are made available to all applications on the desktop.
  42. XCOMM # The desktop will accept either sh or ksh syntax for the commands in
  43. XCOMM # $HOME/.dtprofile.
  44. XCOMM #
  45. XCOMM ##########################################################################
  46. XCOMM ##########################################################################
  47. XCOMM #
  48. XCOMM # Random stdout and stderr output from apps started by Session Mgr or
  49. XCOMM # by actions via front panel or workspace menu can be directed into
  50. XCOMM # the user's $HOME/.dt/sessionlogs directory. By default this output
  51. XCOMM # is not recorded. Instead it is sent off to /dev/null (Unix's "nothing"
  52. XCOMM # device).
  53. XCOMM #
  54. XCOMM # If this random application output is wanted (usually only wanted for
  55. XCOMM # debugging purposes), commenting out following "dtstart_sessionlogfile"
  56. XCOMM # lines will send output to your $HOME/.dt/sessionlogs directory.
  57. XCOMM #
  58. XCOMM # Alternatively, can change "/dev/null" to "/dev/console" to see this
  59. XCOMM # debugging output on your console device. Can start a console via the
  60. XCOMM # Workspace programs menu or via Application Mgr's Desktop Tools
  61. XCOMM # "Terminal Console" icon.
  62. XCOMM #
  63. XCOMM ##########################################################################
  64. echo "This session log file is currently disabled." > $dtstart_sessionlogfile
  65. echo "To enable logging, edit $HOME/.dtprofile and" >> $dtstart_sessionlogfile
  66. echo "remove dtstart_sessionlogfile=/dev/null line." >> $dtstart_sessionlogfile
  67. export dtstart_sessionlogfile="/dev/null"
  68. XCOMM ##########################################################################
  69. XCOMM #
  70. XCOMM # By default, the desktop does not read your standard $HOME/.profile
  71. XCOMM # or $HOME/.login files. This can be changed by uncommenting the
  72. XCOMM # DTSOURCEPROFILE variable assignment at the end of this file. The
  73. XCOMM # desktop reads .profile if your $SHELL is "sh" or "ksh", or .login
  74. XCOMM # if your $SHELL is "csh".
  75. XCOMM #
  76. XCOMM # The desktop reads the .dtprofile and .profile/.login without an
  77. XCOMM # associated terminal emulator such as xterm or dtterm. This means
  78. XCOMM # there is no available command line for interaction with the user.
  79. XCOMM # This being the case, these scripts must avoid using commands that
  80. XCOMM # depend on having an associated terminal emulator or that interact
  81. XCOMM # with the user. Any messages printed in these scripts will not be
  82. XCOMM # seen when you log in and any prompts such as by the 'read' command
  83. XCOMM # will return an empty string to the script. Commands that set a
  84. XCOMM # terminal state, such as "tset" or "stty" should be avoided.
  85. XCOMM #
  86. XCOMM # With minor editing, it is possible to adapt your .profile or .login
  87. XCOMM # for use both with and without the desktop. Group the statements not
  88. XCOMM # appropriate for your desktop session into one section and enclose them
  89. XCOMM # with an "if" statement that checks for the setting of the "DT"
  90. XCOMM # environment variable. When the desktop reads your .profile or .login
  91. XCOMM # file, it will set "DT" to a non-empty value for which your .profile or
  92. XCOMM # .login can test.
  93. XCOMM #
  94. XCOMM # example for sh/ksh
  95. XCOMM #
  96. XCOMM # if [ ! "$DT" ]; then
  97. XCOMM # #
  98. XCOMM # # commands and environment variables not appropriate for desktop
  99. XCOMM # #
  100. XCOMM # stty ...
  101. XCOMM # tset ...
  102. XCOMM # DISPLAY=mydisplay:0
  103. XCOMM # ...
  104. XCOMM # fi
  105. XCOMM #
  106. XCOMM # #
  107. XCOMM # # environment variables common to both desktop and non-desktop
  108. XCOMM # #
  109. XCOMM # PATH=$HOME/bin:$PATH
  110. XCOMM # MYVAR=value
  111. XCOMM # export MYVAR
  112. XCOMM # ...
  113. XCOMM #
  114. XCOMM # example for csh
  115. XCOMM #
  116. XCOMM # if ( ! ${?DT} ) then
  117. XCOMM # #
  118. XCOMM # # commands and environment variables not appropriate for desktop
  119. XCOMM # #
  120. XCOMM # stty ...
  121. XCOMM # tset ...
  122. XCOMM # setenv DISPLAY mydisplay:0
  123. XCOMM # ...
  124. XCOMM # endif
  125. XCOMM #
  126. XCOMM # #
  127. XCOMM # # environment variables common to both desktop and non-desktop
  128. XCOMM # #
  129. XCOMM # setenv PATH $HOME/bin:$PATH
  130. XCOMM # setenv MYVAR value
  131. XCOMM # ...
  132. XCOMM #
  133. XCOMM # Errors in .dtprofile or .profile (.login) may prevent a successful
  134. XCOMM # login. The login process scans .dtprofile and .profile (.login)
  135. XCOMM # for errors (using the '-n' option to the shell). It avoids running
  136. XCOMM # them if errors are found and prints the errors to the
  137. XCOMM # $HOME/.dt/startlog file. However, his process is not fool proof
  138. XCOMM # as some shells are better at finding errors thant others.
  139. XCOMM # If after you login, your session startup terminates and you
  140. XCOMM # are presented with the login screen, this might be the cause. If this
  141. XCOMM # happens, select the Options->Sessions->Failsafe Session item on the
  142. XCOMM # login screen, login and correct the error. The $HOME/.dt/startlog and
  143. XCOMM # $HOME/.dt/errorlog files may be helpful in identifying errors.
  144. XCOMM #
  145. XCOMM ##########################################################################
  146. XCOMM
  147. XCOMM If $HOME/.profile (.login) has been edited as described above, uncomment
  148. XCOMM the following line.
  149. XCOMM
  150. XCOMM DTSOURCEPROFILE=true