Solaris & OpenWindows User's Guide 

Solaris User's Guide << Solaris 2.6 User Collection http://docs.sun.com:80/ab2/coll.8.39/SSUG/@Ab2TocView/43
File Manager
Text Editor
Multimedia Mail Tool
Calendar Manager
Command Tool, Shell Tool, and Console Window
Clock
Calculator
Performance Meter
Print Tool
Audio Tool
Tape Tool
Image Tool
Snapshot
Icon Editor
Binder
Customizing the Solaris Environment
Utilities
Using the AnswerBook Software
Solaris Troubleshooting
OpenWindows User's Guide << Solaris 7 User Collection http://docs.sun.com:80/ab2/coll.8.40/SSUG/@Ab2TocView/5 For Solaris 7

Home session of CDE 

Info 

Location 
They are saved in "~/.dt/sessions/home/" folder
The main file is  ~/.dt/sessions/home/dt.session
Update Each time when home session is updated, CDE will cp home to home.old 
(under ~/.dt/sessions) and create a new "home" folder.  So, link home to my
~/bin/tdat will not work.
-geometry 
The -geometry is only refered from top-left. When I changed them to -##, the
locations are weird.
Caution 

Always use command with absolute path for -cmd parameter.

vm command 

I still can't figure out how to make vm work. At least the following don't:

dtsmcmd -hints "-geometry 959x499+116+116 -state IconicState -workspaces \"ws0 \" -cmd \"ViewMan \"" -screen 0 -cmd "/bin/csh -c '/usr/atria/bin/cleartool setview -exec /clearlib/admin/tools/ViewMan.pl DEFAULT_VIEW'"
dtsmcmd -hints "-geometry 959x499+116+116 -state IconicState -workspaces \"ws0 \" -cmd \"ViewMan \"" -screen 0 -cmd "/bin/csh -c vm"

forget it!

Neither the command:

dtsmcmd -hints "-geometry 959x499+116+116 -state IconicState -workspaces \"ws0 \" -cmd \"ViewMan \"" -screen 0 -cmd "/bin/csh -c 'unsetenv PERL5LIB; /usr/atria/bin/cleartool setview -exec /clearlib/admin/tools/ViewMan.pl DEFAULT_VIEW'"

which proved to be working under bash.

documented on: 2000.03.04

netscape & emacs-server 

dtsmcmd -hints "-geometry 688x485+370+75 -state IconicState -workspaces \"ws0 ws1 ws2 ws3 \" -cmd \"/opt/corp/tools/netscape-4.72/bin/sparc-solaris2.6/netscape.unstripped -geometry 688x485+370+75 \"" -screen 0 -cmd "/opt/corp/tools/netscape-4.72/bin/sparc-solaris2.6/netscape.unstripped -geometry 688x485+370+75"
dtsmcmd -hints "-geometry 81x35+366+99 -state IconicState -workspaces \"ws0 ws1 ws2 ws3 \" -cmd \"emacs -f server-start \"" -screen 0 -cmd "emacs -f server-start"

CDE: Common Desktop Environment 

To Set Personal Environment Variables 

Personal environment variables can be set in the script file HomeDirectory/.dtprofile.

  1. Edit HomeDirectory/.dtprofile

  2. Add lines to the file to set the environment variable

The desktop will accept either sh or ksh syntax for the commands in this file. The commands should only be those that set environment variables, not any that perform terminal I/O, ex. “tset” or “stty”.

Note By default, the files HomeDirectory/.profile and HomeDirectory/.login are NOT read by the desktop, as they may contain terminal I/O based command inappropriate for a graphical interface. These files ARE read if the last line of .dtprofile is uncommented; the line reads DTSOURCEPROFILE=true.

The desktop automatically sets the following environment variables for each user:

DISPLAY       set to the value of the first field in the Xservers file
EDITOR        set to the desktop default editor
HOME         set to the user's home directory (from /etc/passwd)
KBD_LANG     set to the value of $LANG for some languages (see
               Xsession)
LANG          set to the display's current NLS language (if any)
LC_ALL,       set to the value of $LANG
LC_MESSAGES
LOGNAME     set to the user name
MAIL          set to ``/var/mail/$USER''
PATH          set to the value of the Dtlogin ``userPath'' resource
USER          set to the user name
SHELL         set to the user's default shell (from /etc/passwd)
TERM          set to dtterm
TZ            set to the system's zone or to the value of the Dtlogin
               ``timeZone'' resource
NOTE
Errors in .dtprofile or .profile (.login) may prevent a successful
login. If so, log in via the failsafe session and correct the error. To
see errors in a failsafe session, view the $HOME/.dt/startlog file.
NOTE
If a terminal emulator is started with the -ls option, .login or
.profile will be read automatically.

To Log In to and Out of a Failsafe Session 

A failsafe session is a simple session that optionally starts a single Terminal window. It is useful when you need access to a single Terminal window to execute several commands before logging in to a desktop session.

To Log In
  1. On the login screen, Choose Session from the Options menu.

  2. Choose Failsafe Session from the Session submenu.

  3. Log in.

    To Log Out
    • Type the exit command in the Terminal window.

Cursor Key Mode 

Cursor Key Mode (see “Cursor Keys, VT220 Mode” is either Normal (the default) or Application. In Normal mode, the cursor keys move the cursor in the specified direction. In Application mode, the cursor keys generate escape sequences that the application uses for its own purpose.

Solaris Common Desktop Environment (CDE) 

The key features available to you within CDE are: CDE environment, desktop tools, and the CDE Development Environment.

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

Session 

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:
  1. Sources the HomeDirectory/.dtprofile script

  2. Sources the Xsession.d scripts

  3. Displays a welcome message

  4. Sets up desktop search paths

  5. Gathers available applications

  6. Optionally sources HomeDirectory/.profile or HomeDirectory/.login

  7. Starts the ToolTalk messaging daemon

  8. Loads session resources

  9. Starts the color server

  10. Starts the Workspace Manager

  11. Starts the session applications The following sections describe the steps listed above.

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

Session Startup log file 

1st 

--- 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.

2nd 

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!

3rd 

After removing .bash_profile file:

--- Fri May  5 12:29:23 ADT 2000
...
--- could not read /export/home/tong/.bash_profile

l don't have PowderBlue background anymore.

Initial setting for bash under X 

Symptom 

dtterm or xterm opened in CDE having bash shell as default shell don't have environment set.

I.e., all the setting in my .profile, .bash_login are not there.

Analysis 

Do the following changes:

In ~/.dtprofile:

#export dtstart_sessionlogfile="/dev/null"
export dtstart_sessionlogfile

In .profile:

echo "Executing the .profile" >> $dtstart_sessionlogfile

In .bash_login

echo "Executing the .bash_login" >> $dtstart_sessionlogfile
Tip !!

~/.dt/startlog says:

..

--- session log file is /export/home/tong/.dt/sessionlogs/iitrc.acadiau.ca_DISPLAY =:0 …

/export/home/tong/.dt/sessionlogs/iitrc.acadiau.ca_DISPLAY=:0 says:

Session log created Fri May 5 13:59:07 ADT 2000 

Executing the .bash_login Executing the .profile

Conclusion 

So, my initial setting files did get executed. But they don't get carried on into newly created window. "l" might be a proof.

Solution 

bash_profile -> bin/.bash_login
to make sure CDE session has the right configuration.

Create.bashrc: .bashrc -> bin/.bashrc

In .bashrc, make sure to setup everything if hasn't been done; whereas do nothing if they have been set.

Tip !!

Now, my nxt is work!

X11R6 for solaris2.6, where to get? 

>I got a bunch of tools that had been complied under x11R6 under solaris.
>Now I don't have x11R6 in my new environment. So when I tried to run
>those programs, I got the "No such file or directory" error for
>libraries like:

Solaris 2.6 comes with X11R6; however, the libraries that Sun ships with Solaris come with proper version numbers (minor numbers are a mistake in Solaris) and not libraries with .6.1 extensions.

You can symlink the ones you have or try to convince the person who created the binaries to ship properly linked ones. (That would do all his users a favor)

Casper

X11R6 for solaris2.6, where to get? 

echo libXaw libX11 libXext libXtst | xargsn1 | xargsi echo ln -s {}.so {}.so.6.1
echo libXmu libXt libSM libICE libXIE | xargsn1 | xargsi echo ln -s {}.so {}.so.6.0
 !! | sh -x

libXtst & libXIE are for xdpyinfo.

xterm_color works fine now, after setting

export LD_LIBRARY_PATH=/usr/openwin/lib

(won't work before that)

X11R6 for solaris2.6, where to get? 

Symptom 

$ xterm &
ld.so.1: xterm: fatal: libXaw3d.so.6.1: open failed: No such file or directory

Solution 

cd /usr/openwin/lib
ls libXaw.so libXext.so libICE.so
ln -s libXaw.so libXaw3d.so.6.1
ln -s libXext.so libXext.so.6.4
ln -s libICE.so libICE.so.6.3

Solution 

Symptom 

wish & expect is not working:

Application initialization failed: Can't find a usable init.tcl in the following directories:
/opt/public/lib/tcl8.0 /opt/gnu/lib/tcl8.0 /opt/tcl8.0/library /opt/gnu/library

Solution 

cd /opt/gnu/lib
ln -s /shared/local/lib/tcl8.0
ln -s /shared/local/lib/tk8.0

Hist 

>Here are the links that I created :
>
>/usr/openwin/lib/libX11.so.6.1 -> ./libX11.a

This will not will not work as you found out (dot-a is not a shared library but a static lib).

Link /usr/openwin/lib/libX11.so.6.1 to ./libX11.so instead etc.

bellenot

cmd:m64config 

Trying History 

Queries 

# m64config -propt

--- OpenWindows Configuration for /dev/fbs/m640 --- OWconfig: machine Video Mode: not set Depth: not set

# m64config -prconf
--- Hardware Configuration for /dev/fbs/m640 ---
ASIC: version 0x9a004754
DAC: version 0x0
PROM: version 106
Card possible resolutions:  720x400x88, 640x480x60, 640x480x72, 640x480x75
        800x600x56, 800x600x60, 800x600x72, 800x600x75, 1024x768x87
        1024x768x60, 1024x768x70, 1024x768x75, 1280x1024x75, 1280x1024x60
        1152x900x66, 1152x900x76, 1280x1024x67, 1280x800x76, 1280x1024x85
        1280x1024x76, 1152x864x75, vga, svga, 1152, 1280, 800x600
        1024x768, 1280x1024, 1152x900
Monitor possible resolutions:  720x400x70, 720x400x88, 640x480x60
        640x480x67, 640x480x72, 640x480x75, 800x600x56, 800x600x60
        800x600x72, 800x600x75, 832x624x75, 1024x768x87, 1024x768x60
        1024x768x70, 1024x768x75, 1152x870x75, 1152x900x66, 1152x900x76
        vga, svga, 1152, 800x600, 1024x768, 1152x900
Possible depths:  8, 24
Current resolution setting: 1152x900x76
Current depth: 8
# m64config -res ?
Modification 
# m64config -depth 24
m64config: Board does not support resolution none
m64config: No changes made; use "nocheck" to force change
# m64config nocheck -depth 16
m64config: Unknown option, nocheck
# m64config -dev /dev/fb -depth 24
m64config: Board does not support resolution none
m64config: No changes made; use "nocheck" to force change
# m64config -res 1152x900x76 -depth 16
m64config: Not enough memory for resolution 1152x900x76 at depth 24
m64config: No changes made; use "nocheck" to force change
# m64config -res 1024x768x75 -depth 16
  -- nok
# m64config -res 800x600x75 -depth 24
Tip !!

/etc/openwin/server/etc/OWconfig got created

# cat /etc/openwin/server/etc/OWconfig
package="SUNWm64cf"
class="XSCREENCONFIG" name="SUNWm640"
    device="/dev/fbs/m640"
    res="800x600x75"
    depth="24";

but still, colors won't work.

conculsion 

Queries 
# xdpyinfo
# m64config -res ?
# m64config -propt
Modification 
# m64config nocheck -depth 16

HELP! My CDE can't start anymore 

My CDE can't start anymore. It says something like "can not start X server on display :0". I tried to reboot but didn't solve the problem.

HELP! My CDE can't start anymore 

> Have you checked the contents of /var/dt/Xerrors or equivalent?
>
> Jefferson Ogata
$ cat /var/dt/Xerrors
m64: set_video failed, error 1
m64: set_video failed, error 1
m64: set_video failed, error 1
$ dir !$
dir /var/dt/Xerrors
-rw-r--r--   1 root     root           93 May 30 14:39 /var/dt/Xerrors

HELP! My CDE can't start anymore 

> > The last thing that I was doing was to add some font

OK, I have an HP 9000/730 running HPUX 10.20 and the last time this happened to me it was a network resolution or extended hostname error. Check your resolv.conf file and your network connection. Make sure your hostname is no longer than 8 chars long. If that's not it, it's your fonts you installed - try restarting your font server.. Hope that helps.

-Linc Fessenden

HELP! My CDE can't start anymore 

> >a) Verify if your filesystem is not 100% used, like /var (CDE create
> >some files under /var/tmp), /tmp and / (root) filesystems
>
> Another possibility is that quotas are enabled on the user's home directory
> and the user's quota is used up.

Thanks, but quotas problem can only stop a user from logging in, not stopping the *entire* X-windows system from starting.

I cleaned all files under /var/tmp and /tmp, and all suspicious files under /var and /. I even remove the /.dt directory (it will get recreated).

After reboot, the CDE (the default X-windows system for Solaris) still can't started.

> Try restarting your X font server - I seem to remember a similar problem

No, I'm not using any X font servers.

> >b) Can you logon with other user ? If you can, copy you Desktop and .dt
> >directory from other user. If not, continue reading this tips
>
> >c) Do you see (when boot) you CDE Logon prompt  ? If yes, you can change
> >yor logon language -> Select other different yours. If no, i suppose
> >that could be better deinstall and install again X11 filesets.

What I got is a error message on the white-background console, saying: "The X-server can not be started on display :0…"

The only choice for me is console login. I can log in as any user though.

Now the most important question I want to ask is "How can I start CDE manually in console without rebooting". Under Linux, I know all sorts of tricks. startx, init 5, … but for Solaris, the only thing I know is to reboot. There got to be a better way to do it.

My CDE cannot start because Netscape crashed it. I think it is just some sys-tmp files that stop it from starting, this can be easily solve if I know where the script is. But I just haven't find where the system startup script is. I tried to search for the error message within the entire /etc dir tree, then the entire / dir tree but didn't find it.

HELP! My CDE can't start anymore 

Ok, try the following to narrow down the problem:

get another box and hook it up by network (so you can telnet/ssh from that one) or by serial line (so you can login through serial line)

Do either one now.

Now log in on the console (text only) and run this command:

/usr/openwin/bin/Xsun

Its the X11 server w/o any form of CDE and stuff. If it comes up then go to step 2), if not read on:

try some commandline-args to Xsun:

-fp /usr/openwin/lib/X11/fonts/100dpi

if it now works, go to 2)

you've screwed up your X11 config seriously, You might want to deinstall some X11 packets

SUNWi*rf and your chinese fonts (SUNW*xmft i think) as well as SUNWxwcft SUNWxwfa SUNWxwfnt SUNWxwplt and SUNWxwpltx

and reinstall all of them, then re-install your patches.

2) you just messed up CDE (dt stuff) (try to restore all dt config files)

juergen

HELP! My CDE can't start anymore 

Thank you all, especially Juergen, the problem is solved.

> Now log in on the console (text only) and run this command:
>
> /usr/openwin/bin/Xsun
>
> Its the X11 server [...]

Yes, yes, it helps me locate the problem right away.

> A general rule of thumb is if you modified something and things break, undo
> the last modification.  In your case, try removing the fonts that you added
> and see if things work.

FYI, the problem does in fact related to the font. Although I rest the font path to it original value, I didn't know one of the attribute of fonts.dir get changed…

Again, thank you all!