Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Chapter 3 Troubleshooting Login and Session Startup Problems

This chapter describes the Solaris CDE startup files and possible Solaris CDE startup problems, and suggests solutions to startup problems.

Login Startup Files

When the Solaris CDE Login Manager authenticates the user, it calls the following script to start the desktop:

/usr/dt/bin/Xsession

The first user-specific file that Xsession calls is HomeDirectory/.dtprofile.

The first time a new user logs into Solaris CDE, a .dtprofile file is copied into the user's home directory. By default, the file does nothing. However, it does contain many comments on how it might be edited. The user can edit this file to add user-specific environment variables.


Note –

Like the Xsession script that calls .dtprofile, this file uses the ksh syntax.


One useful edit is to uncomment the last line of the .dtprofile file:

DTSOURCEPROFILE=true

This line allows the user's HomeDirectory/.login (for csh users) or the HomeDirectory/.profile (for other shell users) to be sourced as part of the startup process.

Error Log Locations

Choose Failsafe Session from the Solaris CDE Login screen's Option menu to bypass the normal Xsession startup to look at error logs and fix possible user dot file problems. Table 3–1 shows the error logs and their locations.

Table 3–1 Error Log Locations

Location 

Error Log 

/var/dt/Xerrors

Solaris CDE login window system errors prior to user login

HomeDirectory/.dt/startlog

Solaris CDE startup errors during Xsession, .dtprofile, .login, or .profile

HomeDirectory/.dt/errorlog

Solaris CDE errors after Xsession startup

HomeDirectory/.dt/sessionlogs

Directory of session logs for Session Manager and Window Manager errors

Some errors are also displayed in the System Console window. If the System Console window is not running, the fallback console log file name is wscon with the time/display code concatenated. For example:

/usr/tmp/wsconAAAa004EE:0.0

User Startup Files

To source the .login (for csh users) or the .profile (for sh or ksh users) file, uncomment the last line in the .dtprofile file to read:

DTSOURCEPROFILE=true

In most cases this is all that is necessary. However, in some cases you need to modify the .login or .profile file because it may contain commands that will not work with the Solaris CDE Login Manager. If there is a problem with one of the commands, it usually relates to the file expecting a terminal keyboard input source such as stty, tset, or any “wait for input” commands.


Caution – Caution –

If .dtprofile is set to source a .login or .profile file that has problem commands in it that crash the shell, desktop startup will fail. Consequently, no desktop will appear. Instead, you will see the Solaris CDE login screen redisplay. Startup errors from .login or .profile will usually be noted in HomeDirectory/.dt/startlog. Use a failsafe login session or a command line login to debug problem commands in .login or .profile.


For more information on problems and their possible solutions, review the .dtprofile file. In general, problem commands are related to terminal information and control.

Solaris CDE Startup Examples

This section provides examples of how you might edit the following user startup files:

The Solaris CDE startup process defines a shell variable named DT in the .login or.profile script so that checking can be done during the Solaris CDE startup process. This prevents terminal-related commands such as tty and stty from executing. Refer to the following script examples:

.login (C shell)

	if ( ! ${?DT} ) then
		stty erase `^h`
	endif

.profile (sh or ksh)

	if [ ! “$DT” ]; then
		stty erase `^h`
	fi

The extra syntax around DT prevents warnings from the C shell when DT is not defined. DT is not defined when the user logs in from a conventional text-based console login prompt. See the HomeDirectory/.dtprofile file for more information about setting up dot files.


Note –

You specify Solaris CDE tty settings in .Xdefaults.


The user's .Xdefaults file is sourced for user-specific resources during the Solaris CDE startup. For example, ttyModes ensures that the user's favorite tty settings are used in terminal emulation windows like dtterm and xterm. The following line shows a typical ttyModes setting in the .Xdefaults file:

*ttyModes: erase ^H intr ^C kill ^U start ^Q stop ^S susp ^Z`


Note –

Favorite Solaris CDE resources differ from default settings.


The Desktop Window Manager's placement of icons is an example of default settings. In this case the following line in the .Xdefaults file shows the default icon placement setting:

Dtwm*iconPlacement: right top