This guide will cover how to setup a basic VNC connection to a Solaris 11 machine. There is also an optional step to allow for persistent VNC connections.
Configure GDM to include ‘[security] DisallowTCP=false’ and ‘[xdmcp] Enable=true’.
$ sudo gedit /etc/gdm/custom.conf
# GDM configuration storage
Configure X-Server to accept remote connections.
$ sudo svccfg -s application/x11/x11-server
svc:/application/x11/x11-server> setprop options/tcp_listen = boolean: true
Configure the VNC service (you could change the ‘-geometry 1280×720’ to whatever resolution you would like).
$ sudo svccfg -s xvnc-inetd
svc:/application/x11/xvnc-inetd> setprop inetd_start/exec = astring: "/usr/bin/Xvnc -geometry 1280x720 -inetd -query localhost -once securitytypes=none"
svc:/application/x11/xvnc-inetd> setprop inetd/wait = boolean: true
** The line highlighted red is optional – only do this if you want your VNC connection to persist (as well as any potential security issues)
Disable and the re-enable the GDM and VNC-inetd services for the changes to take effect.
$ su root
# svcadm disable gdm xvnc-inetd; svcadm enable gdm xvnc-inetd
Point your favourite VNC client at your Solaris server and test if it accepts your VNC connection – you should be presented with a Username/Password login screen.
If you performed the optional step to make your connections persist – close your favourite VNC client and then reconnect – if you remained logged in you have a persistent connections.