Introduction to Solaris Common Desktop Environment
http://docs.sun.com:80/ab2/@LegacyTocView?toc=SUNWab_69_4%3A%2Fsafedir%2Fspace3%2Fcoll1%2Fdt%2Fshare%2Fanswerbooks%2FC%2FSUNWdta%2Ftoc%2FCDEINTRO%3A1004;bt=Introduction+to+Solaris+Common+Desktop+Environment&Ab2Lang=C&Ab2Enc=iso-8859-1
The key features available to you within CDE are: CDE environment, desktop tools, and the CDE Development Environment.
Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide
http://docs.sun.com:80/ab2/@LegacyPageView?toc=SUNWab_69_4:/safedir/space3/coll1/dt/share/answerbooks/C/SUNWdta/toc/CDEADMIN:Contents;bt=Solaris+Common+Desktop+Environment%3A+Advanced+User%27s+and+System+Administrator%27s+Guide;ps=ps/SUNWab_69_4/CDEADMIN/Contents
shows advanced users and system administrators how to perform customizations that cannot be accomplished with the desktop user interface.
The topics include:
Customizing system initialization, login, and session initiation Troubleshooting login and session startup problems Adding applications and providing interface representations for applications and their data Configuring desktop processes, applications, and data across the network Setting up miscellaneous configurations Customizing desktop services such as window management, printing, colors, and fonts
What Is a Session?
A session is the collection of applications, settings, and resources present on the user's desktop. Session management is a set of conventions and protocols that enables Session Manager to save and restore a user's session. A user is able
to log in to the system and be presented with the same set of running applications, settings, and resources as were present when the user logged off. When a user logs in to the desktop for the first time, a default initial session is loaded. Afterward, Session Manager supports the notion of a current and a home session.
The Initial Session
When a user logs in to the desktop for the first time, Session Manager will generate the user's initial session using system default values. By default, the File Manager and Introduction to the Desktop, a help volume, will start.
Starting a Session
Session Manager is started through /usr/dt/bin/Xsession. When the user logs in using the Login Manager, Xsession is started by default.
Optionally, the user can log in using the traditional character mode (getty) login, and start Session Manager manually using tools that start an X server, such as xinit. For example: xinit /usr/dt/bin/Xsession.
When a Session Starts
When Session Manager is started, it goes through the following steps to start the user's session:
Optionally Sourcing the .profile or .login Script
Xsession is able to source a user's traditional HomeDirectory/.profile or HomeDirectory/.login scripts. By default this capability is disabled. To tell Xsession to source the .profile or .login script, set DTSOURCEPROFILE to true.
To change DTSOURCEPROFILE for all users, create an /etc/dt/config/Xsession.d script that sets the new value. To set DTSOURCEPROFILE to true for all users, create an executable sh or ksh script, for example /etc/dt/config/Xsession.d/myvars, and set DTSOURCEPROFILE as follows:
Additional Session Startup Customizations
This section covers:
+ Setting environment variables + Setting resources + Using display-dependent sessions + Running scripts at login + Recovering a back-up session
To Set Environment Variables
To set system-wide environment variables, create a file in the /etc/dt/config/Xsession.d directory that sets and exports the variable.
For example, if you create an executable ksh script, /etc/dt/config/Xsession.d/myvars, containing:
export MYVARIABLE="value"
then the variable MYVARIABLE will be set in each user's environment at the next login.
To set personal environment variables, set the variable in HomeDirectory/.dtprofile.
For example:
export MYVARIABLE="value"
sets the variable MYVARIABLE in each user's environment at the next login.
________________________________________________________________
Note - Session Manager does not automatically read the .profile or .login file. However, it can be configured to use these files; see "Optionally Sourcing the .profile or .login Script" on page 28. ________________________________________________________________
To Set Resources
To set system-wide resources, add the resources to the file /etc/dt/config/language/sys.resources. (You may have to create the file.)
________________________________________________________________
Note - .dtprofile only supports /bin/sh or /bin/ksh syntax. ________________________________________________________________
For example, if in /etc/dt/config/C/sys.resources you specify:
AnApplication*resource: value
then the resource AnApplication*resource will be set in each user's RESOURCE_MANAGER property at the next login. * To set personal resources, add the resources to the file HomeDirectory/.Xdefaults.
To Execute Additional Commands at Session Startup
Create the file HomeDirectory/.dt/sessions/sessionetc containing the commands.
Generally this file is a script and must have execute permission. Processes started in sessionetc should be run in the background.
________________________________________________________________
Note - Do not use sessionetc to start clients that are automatically restored by Session Manager. Doing so can cause multiple copies of the application to be started. You may not be able to see the copies immediately because the windows may be stacked on top of one another. ________________________________________________________________
To Execute Additional Commands at Logout
A companion file to sessionetc is sessionexit. Use sessionexit to perform some operation at session exit that is not handled by Session Manager.
Create the file HomeDirectory/.dt/sessions/sessionexit containing the commands.
Like sessionetc, this file is usually a script with execute permission.
To Investigate Session Startup Problems
Check the file HomeDirectory/.dt/startlog.
Session Manager logs each user's session startup progress in this file.
--- Thu May 4 20:04:01 ADT 2000 --- /usr/dt/bin/Xsession starting... --- could not start /usr/openwin/bin/speckeysd --- Xsession started by dtlogin --- starting /usr/dt/bin/dtsession_res -load -system --- sourcing /export/home/tong/.dtprofile... --- sourcing /usr/dt/config/Xsession.d/0010.dtpaths... --- sourcing /usr/dt/config/Xsession.d/0015.sun.env... --- sourcing /usr/dt/config/Xsession.d/0020.dtims... --- sourcing /usr/dt/config/Xsession.d/0030.dttmpdir... --- sourcing /usr/dt/config/Xsession.d/0040.xmbind... --- could not read /export/home/tong/.bash_profile --- starting /usr/dt/bin/dthello & --- starting /usr/dt/bin/dtsearchpath --- starting /usr/dt/bin/dtappgather & --- starting /usr/dt/bin/dsdm & --- session log file is /dev/null --- DTSOURCEPROFILE is 'true' (see /export/home/tong/.dtprofile) --- execing /usr/dt/bin/dtsession with a /usr/local/bin/bash login shell ... --- starting desktop on /dev/pts/2 /usr/dt/bin/ttsession[16011]: starting
PowderBlue background does not show up.
After creating .bash_profile file:
the log changed to:
--- Fri May 5 11:37:29 ADT 2000 --- /usr/dt/bin/Xsession starting... --- could not start /usr/openwin/bin/speckeysd --- Xsession started by dtlogin --- starting /usr/dt/bin/dtsession_res -load -system --- sourcing /export/home/tong/.dtprofile... --- sourcing /usr/dt/config/Xsession.d/0010.dtpaths... --- sourcing /usr/dt/config/Xsession.d/0015.sun.env... --- sourcing /usr/dt/config/Xsession.d/0020.dtims... --- sourcing /usr/dt/config/Xsession.d/0030.dttmpdir... --- sourcing /usr/dt/config/Xsession.d/0040.xmbind... --- starting /usr/dt/bin/dthello & --- starting /usr/dt/bin/dtsearchpath --- starting /usr/dt/bin/dtappgather & --- starting /usr/dt/bin/dsdm & --- session log file is /dev/null --- DTSOURCEPROFILE is 'true' (see /export/home/tong/.dtprofile) --- execing /usr/dt/bin/dtsession with a /usr/local/bin/bash login shell ... --- starting desktop on /dev/pts/2 /usr/dt/bin/ttsession[18069]: starting
l have PowderBlue background now!