System Administration Guide: Virtualization Using the Solaris Operating System

About Xvnc

Virtual network computing (VNC) is a remote control software product that allows you to view and fully interact with one computer desktop, the Xvnc server, by using the VNC viewer on another computer desktop. The two computers do not have to be running the same type of operating system. VNC provides a guest domain graphical login.

By default, consoles for HVM guests are graphics consoles. You can use VNC to view a Windows guest domain from a Solaris dom0. You only need to set the address and password for VNC to work with HVM guests. HVM installs may specify either VNC (--vnc) or Simple DirectMedia Layer (SDL) (--sdl) for graphics support. You can later configure the OS to use the serial console as the main console.

Use the vncpasswd command to set the password used to access VNC desktops. The password is stored on the server. For more information, see vncpasswd(1).

Xvnc displays to a VNC viewer over the network. The VNC server display number is the same as the X server display number. For example, snoopy:2 refers to display 2on machine snoopy for both VNC and an X server.

For the latest information on VNC setup, see .

ProcedureHow to Set Up VNC to Provide a Solaris Guest Graphical Login with CDE

  1. Become superuser, or assume the appropriate role.

  2. Enable XDMCP connections:.


    # svccfg -s cde-login
    svc:/application/graphical-login/cde-login> setprop dtlogin/args=""
    
  3. (Optional) If you are not running vncviewer locally on the control domain, set X11-server to listen to the tcp port:


    # svccfg -s x11-server
    svc:/application/x-11/x11-server> setprop options/tcp_listen=true
    

    The VNC listen facility should be used with caution due to security considerations.

  4. Enable the Xvnc inetd services.


    # svcadm enable xvnc-inetd
    
  5. Connect from another machine and verify that you see the login screen and can log in to a desktop session.


    # vncviewer domU:0
    

ProcedureHow to Set Up VNC to Provide a Solaris Guest Graphical Login with GDM

  1. Become superuser, or assume the appropriate role.

  2. Enable XDMCP for GDM:


    # printf '[xdmcp]\nEnable=true\n' >>/etc/X11/gdm/custom.conf
    # svcadm restart gdm
    
  3. Make sure that GDM is running:


    # svcadm enable -s gdm
    
  4. Set the X11-server to listen to the tcp port:


    # svccfg -s x11-server
    svc:/application/x-11/x11-server> setprop options/tcp_listen=true
    
  5. Enable the Xvnc inetd services:


    # svcadm enable xvnc-inetd
    
  6. Connect from another machine and verify that you see the login screen and can log in to a desktop session.


    # vncviewer domU:0
    

ProcedureHow to Start VNC at System Boot

This procedure starts VNC at system boot from the dtlogin, displaying the dtlogin login screen.

  1. Become superuser, or assume the appropriate role.

  2. 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 astring: "/usr/X11/bin/Xvnc"
    
    
    svccfg -s application/x11/x11-server:display1 addpropvalue options/server_args astring: '"SecurityTypes=None"'
  3. 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
  4. Connect from another machine and verify that you see the login screen and can log in to a desktop session.


    # vncviewer domU:0
    

ProcedureHow to Start a GNOME Session

  1. Use the following to start the GNOME session.


    # /bin/sh
    # mkdir <your homedir>/.vnc
    # echo "#!/bin/sh\n/usr/bin/dbus-launch /usr/bin/gnome-session" > <your homedir>/.vnc/xstartup

ProcedureHow to View the VNC Man Pages

You can use the man command to view the man pages.


Note –

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

  1. View the MANPATH:


    echo $MANPATH
    /usr/share/man:/usr/dt/man:/usr/openwin/share/man
  2. If necessary, add the path to the X11 man pages.


    setenv MANPATH /usr/share/man:/usr/dt/man:/usr/openwin/man:/usr/X11/man