VNC Server in Solaris

Shaun T O'leary shaun "at" pnl.gov
Fri, 25 Aug 2000 19:35:01 +0000


Barry,

Solaris starts X servers for you without scripting- you can add an entry
to your Xservers file to start additional servers.

The Solaris Case for starting the console X server (:0) and a vnc server on display :5

cp /usr/dt/config/Xservers /etc/dt/config/Xservers

# the files in /usr/dt/config are the defaults and are used if admin modified files
# don't exist in /etc/dt/config. This file contains mostly comments- the last
# lines are the important ones:

  :0   Local local_uid "at" console root /usr/openwin/bin/Xsun :0 -nobanner

  :5   Local local_uid "at" none root /opt/vnc/bin/Xvnc :5  -httpd /opt/vnc/classes -geometry 1152x900 -rfbwait 120000 -rfbauth /opt/vnc/.vnc/passwd -rfbport 5905 -alwaysshared

(The :5 line is a single line with no newline/carrige return.  -alwaysshared and other Xvnc server
options can be taked onto this line- the ports must match for each entry :X, Xvnc :X, and -rfbport 590X)

Dtlogin generally does not like non-standard display sizes- expect problems if you use other
than the standards: 1024x768, 1152x900, 1280x1024, and 1600x1200.


The above example assumes your Xvnc binary resides in /opt/vnc/bin and the classes directory
is /opt/vnc/classes. The path to the session password is specified by the rfbauth flag- in this case,
the session password is in /opt/vnc/.vnc/passwd. To set this passwd:

/bin/csh #get a new shell so as to not muck up your environment
setenv HOME /opt/vnc #this is the directory that contains the .vnc/password path.
/opt/vnc/bin/vncpasswd
(set your passwd)
exit

If you are using an existing vncpassword you don't need to do those steps.

/etc/init.d/dtlogin reset

Will kill all running X Servers and start all servers contained in /etc/dt/config/Xservers-
each X server will have a dtlogin running, and after successfully entering a username and
password CDE or Openwindows will start. This gives you a full desktop session where
the background patterns can be set to solid grey/light grey (and those settings will also be
saved).

NOTE!! If your binaries are not local on the machine (nfs/afs/dfs mount), dtlogin MUST
start after the shared filesystem is mounted. (In my case, the default is for dtlogin to start
in /etc/rc2.d while afs starts in /etc/rc3.d- moving the link  (mv /etc/rc2.d/S99dtlogin /etc/rc3.d/S99dtlogin)
causes the dtlogin to start after the distributed filesystem...  (ignore all of this if the
binaries are local).

Using the Xservers file avoids the /tmp/.X11-unix directory permissions issues because
the Xserver is started by root (which own /tmp/.X11-unix and must have write access
there to start an Xserver). The Xserver is owned by root and the Xsession is owned by the
user that successfully logs on- as it should be. No scripting required as the native OS is
used in the proper fashion to start the server.

 Cheers,

Shaun



>
> Date: Thu, 24 Aug 2000 09:49:39 +0800
> From: Barry Fung <bfung "at" adforce-asia.com>
> Subject: VNCServer in Solaris
>
> Hi,
>
> Could someone tell me how to co figurate the vncserver as a service start
> automatically when the machine boot?
>
> Many thanks,
> ________________________________________
> Barry Fung @ HK (GMT+08:00)
> Email: bfung "at" adforce-asia.com
>



--
 voice: 509-372-4780
 fax: 509-375-6631
 Battelle PNNL, Math/1129
 P.O. Box 999, MS K1-87
 Richland, WA 99352
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------