By default if you VNC into Solaris 10 you get a basic desktop using TWM:

To Change to CDE, comment out the last line (twm&) in ~/.vnc/xstartup and add:
#twm &
/usr/dt/bin/dtsession &
to start the Java Desktop, instead of ‘dtsession’, add ‘gnome-session’:
#twm &
#/usr/dt/bin/dtsession &
/usr/dt/bin/gnome-session &

If you get this error:
vncserver: couldn't find "xauth" on your PATH.
… edit your ~/.vnc/xstartup and update your PATH to include the following:
PATH=${PATH}:/usr/X11/bin:/usr/openwin/bin
