############################################################################# ### ### .dtprofile ### ### user personal environment variables ### ### Common Desktop Environment (CDE) ### ### (c) Copyright 1993-1997 Sun Microsystems, Inc. ### (c) Copyright 1993,1994 Hewlett-Packard Company ### (c) Copyright 1993,1994 International Business Machines Corp. ### (c) Copyright 1993,1994 Novell, Inc. ### ### ### @(#)dtprofile.src 1.10 97/05/20 ### ############################################################################# ############################################################################# ### ### Your $HOME/.dtprofile is read each time you login to the Common Desktop ### Environment (CDE) and is the place to set or override desktop ### environment variables for your session. Environment variables set in ### $HOME/.dtprofile are made available to all applications on the desktop. ### The desktop will accept either sh or ksh syntax for the commands in ### $HOME/.dtprofile. ### ############################################################################# ############################################################################# ### ### Random stdout and stderr output from the desktop Session Mgr can be ### directed into user's $HOME/.dt/sessionlogs directory. By default this ### output is not recorded. Instead it is sent off to /dev/null (Unix's ### "nothing" device). ### ### If this random dtsession output is wanted (usually only wanted for ### debugging purposes), commenting out following "dtstart_sessionlogfile" ### lines will send output to your $HOME/.dt/sessionlogs directory. ### ### Alternatively, can change "/dev/null" to "/dev/console" to see this ### debugging output on your console device. Can start a console via the ### Workspace programs menu or via Application Mgr's Desktop Tools ### "Terminal Console" icon. ### ############################################################################# echo "This session log file is currently disabled." > $dtstart_sessionlogfile echo "To enable logging, edit $HOME/.dtprofile and" >> $dtstart_sessionlogfile echo "remove dtstart_sessionlogfile=/dev/null line." >> $dtstart_sessionlogfile export dtstart_sessionlogfile="/dev/null" ############################################################################# ### ### By default, the desktop will read your standard $HOME/.profile ### or $HOME/.login files. This can be changed commenting out the ### DTSOURCEPROFILE variable assignment at the end of this file. The ### desktop reads .profile if your $SHELL is "sh" or "ksh", or .login ### if your $SHELL is "csh". ### ### The desktop reads the .dtprofile and .profile/.login with a simulated ### terminal via the sdt_shell program. The sdt_shell program will create ### a controlling terminal. Shell output will be logged to the location ### $HOME/.dt/startlog. Any shell requested input will receive an end ### of file character (Control-D). ### ### This being the case .profile/.login should avoid requiring interaction ### with the user at login time. Any messages printed in these scripts will ### not be seen when you log in and any prompts such as by the "read" ### command will return an end-of-file to the calling script. ### ### With minor editing, it is possible to adapt your .profile or .login ### for use both with and without the desktop. Group user interaction ### statements not appropriate for your desktop session into one section ### and enclose them with an "if" statement that checks for absence of ### of the "DT" environment variable. When the desktop reads your .profile ### or .login file, it will set "DT" to a non-empty value for which your ### .profile or .login can test. ### ### example for sh/ksh ### ### if [ ! "$DT" ]; then ### # ### # commands and environment variables not appropriate for desktop ### # ### echo "Please enter some data:" ### read data ### ... ### fi ### ### # ### # environment variables common to both desktop and non-desktop ### # ### PATH=$HOME/bin:$PATH ### MYVAR=value ### export MYVAR ### ... ### ### example for csh ### ### if ( ! ${?DT} ) then ### # ### # commands and environment variables not appropriate for desktop ### # ### echo "Please enter some data:" ### read data ### ... ### endif ### ### # ### # environment variables common to both desktop and non-desktop ### # ### setenv PATH $HOME/bin:$PATH ### setenv MYVAR value ### ... ### ### Errors in .dtprofile/.profile/.login are logged to "$HOME/.dt/startlog". ### If after you login, an environment they should have set and exported is ### not present and this $HOME/.dtprofile file has set "DTSOURCEPROFILE=true" ### check $HOME/.dt/startlog for possible .profile/.login script error ### output. ### ############################################################################## DTSOURCEPROFILE=true