Starting VNC
How to Set Up VNC to Provide a Solaris Guest Graphical Login
This procedure shows how to start VNC on demand from inetd, displaying the
dtlogin login screen.
Caution - When using this method, you must restart the service, which will kill all
current dtlogin sessions.
- Become superuser, or assume the Primary Administrator role.
- Enable XDMCP connections on dtlogin by removing -udpport 0 from the arguments.
# svccfg -s cde-login
svc:/application/graphical-login/cde-login> setprop dtlogin/args=""
- (Optional) If you are not running vncviewer locally on the control domain, set X11-server
to listen to the tcp port as described in Example 40-7.
The VNC listen facility should be used with caution due to security considerations.
- Restart the service.
# svccfg -s cde-login setprop 'dtlogin/args=""'
# svcadm restart cde-login
- Add xvnc service to /etc/services if it is not already there.
# printf "vnc-server\t5900/tcp\t\t\t# VNC Server\n" >> /etc/services
- Enable the Xvnc inetd service.
# svcadm -e xvnc-inetd
- Connect from another machine and verify that you see the login screen and
can log in to a desktop session.
# vncviewer hostname:0
How to Start VNC at System Boot
This procedure starts VNC at system boot from the dtlogin, displaying the dtlogin
login screen.
- Become superuser, or assume the Primary Administrator role.
- Add an instance of x11-server service called display1 for configuration, and configure it
to run Xvnc.
svccfg -s application/x11/x11-server add display1
svccfg -s application/x11/x11-server:display1 addpg options application
svccfg -s application/x11/x11-server:display1 addpropvalue options/server: "/usr/X11/bin/Xvnc"
svccfg -s application/x11/x11-server:display1 addpropvalue options/server: '"SecurityTypes=None"'
- Configure dtlogin to start it.
mkdir -p /etc/dt/config
cp /usr/dt/config/Xservers /etc/dt/config/Xservers
echo " :1 Local local_uid@none root /usr/X11/bin/Xserver :1" >> /etc/dt/config/Xservers
pkill -HUP dtlogin
- Connect from another machine and verify that you see the login screen and
can log in to a desktop session.
# vncviewer hostname:0
How to Start VNC Manually
Starting VNC manually displays the session of the user. A VNC password is
required.
Caution - A VNC password should be different from a UNIX login password. A VNC
password is not securely encoded on disk or across the network. Do
not use a valuable password.
- Start VNC manually.
% /usr/bin/vncserver -httpd
- From another machine, open a web browser.
- Go to https://hostname:5802/.
The number 5802 after the colon assumes that the VNC server said it was
starting on display :2. If another display number was listed, change 5802 to
5800 plus the display ID.
- Enter the password you provided to the vncserver script. Verify that you see
a simple desktop session in the viewer.
How to Start a GNOME Session
How to View the VNC Man Pages
You can use the man command to view the man pages.
man Xvnc
man vncviewer
man vncpasswd
Note - Live linkss to these man pages cannot be made from this book.
The MANPATH variable is normally set for you in desktop login sessions. If
the entry is not found, check your MANPATH environment variable and add the
path to the X11 man pages if necessary.
- View the MANPATH:
echo $MANPATH
/usr/share/man:/usr/dt/man:/usr/openwin/share/man
- If necessary, add the path to the X11 man pages.
setenv MANPATH /usr/share/man:/usr/dt/man:/usr/openwin/man:/usr/X11/man