=^.^=

Solaris 11 Quick-and-Dirty VNC Server

karma

Install the graphical desktop if it is not already available (i.e. fresh installation) then reboot:
# pkg install solaris-desktop ... # shutdown -i6 -g0 -y

Use vncpasswd to set the password used to access VNC desktops or you will be prompted to provide one when launching the server:
$ vncpasswd

Manually start the VNC server for a one-off session as the presently logged in user:
$ /usr/bin/vncserver

...or configure VNC for persistent access:

Enable XDMCP (X Display Manager Control Protocol) to permit logins to GDM (GNOME Display Manager) from remote terminals. Edit /etc/gdm/custom.conf to reflect:
[xdmcp] Enable=true

Restart GDM:
# svcadm restart gdm

Enable the Xvnc inetd service:
# inetadm -e xvnc-inetd

If you try connecting now you may encounter a situation where you are constantly redirected to the beginning of the login process upon successfully logging in which is crazymaking, to say the least. If you encounter this simply reboot the system:
# reboot

Now you may connect from a remote client:
$ vncviewer hostname[:port]

Include :port only if connecting to a running instance of vncserver (a port number will be shown in stdout after launch, sequentially starting at :1) otherwise inetd will launch Xvnc and load the GDM login interface.

It should be noted that your connection will not be encrypted by default. This is an unacceptable risk if you will be using VNC over anything but the same wired layer 2 network (arguably an unnecessary risk even then). This can be remedied on most vncviewer clients with the -via flag. From the TigerVNC for linux man page:

       -via gateway
              Automatically create encrypted TCP tunnel to the gateway machine before connection, connect to the host through that tunnel (TigerVNC-specific). By default,  this  option  invokes
              SSH  local  port  forwarding,  assuming  that SSH client binary can be accessed as /usr/bin/ssh. Note that when using the -via option, the host machine name should be specified as
              known to the gateway machine, e.g.  "localhost" denotes the gateway, not the machine where vncviewer was launched. The environment variable VNC_VIA_CMD can  override  the  default
              tunnel command of /usr/bin/ssh -f -L "$L":"$H":"$R" "$G" sleep 20.  The tunnel command is executed with the environment variables L, H, R, and G taken the values of the local port
              number, the remote host, the port number on the remote host, and the gateway machine respectively.

For example:
$ vncviewer -via ip-address ip-address

Comments

There are no comments for this item.