Oracle Solaris 11 (11/11) – VNC

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.

Step 1
Configure GDM to include ‘[security] DisallowTCP=false’ and ‘[xdmcp] Enable=true’.

$ sudo gedit /etc/gdm/custom.conf

# GDM configuration storage

[daemon]

[security]
DisallowTCP=false

[xdmcp]
Enable=true

[greeter]

[chooser]

[debug]

Step 2
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
svc:/application/x11/x11-server> end

Step 3
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
svc:/application/x11/xvnc-inetd> end

** The line highlighted red is optional – only do this if you want your VNC connection to persist (as well as any potential security issues)

Step 4
Disable and the re-enable the GDM and VNC-inetd services for the changes to take effect.

$ su root
Password:
# svcadm disable gdm xvnc-inetd; svcadm enable gdm xvnc-inetd

Step 5
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.

10 thoughts on “Oracle Solaris 11 (11/11) – VNC

  1. After a fresh text install of Solaris-11 (11/11) both xvnc-inetd and gdm are not present. After installing them (# pkg install xvnc-inetd gdm) I can’t get gdm to start:
    # svcadm enable gdm
    # svcs gdm
    offline 10:24:03 svc:/application/graphical-login/gdm:default

    Any thoughts?

  2. You are missing some X packages. Do the following:

    pkg install slim_install # installs 400+ packages
    svcadm enable gdm && exit # gdm now works
    pkg uninstall slim_install # uninstalls the installer package

  3. hello … for people who perform a text install…. i am here working in a datacenter Full of SPARC and X86 machines of Oracle-SUN … if you want the GDM and VNC to function properly you can try to install the Solaris Desktop
    # pkg install slim_install
    or ..
    # pkg install solaris-desktop

    and then the gdm service will be online

  4. setprop inetd/wait = boolean: true

    this just seems to cause my xsession to load with an error. after refreshing the gdm service my machine crashes. upon reboot I’m brought to bash prompt.

    from there, changing boolean back to false and restarting the gem-inetd service will correct the crash.

    however, i am not able to have persistent sessions. any other ideas? thanks a bunch

  5. I am able to connect to vncserver :1 and higher but when I try connecting to vncserver :0 (the current session on my desktop) I get an error that “no connection could be made because the target machine actively refused it”

    I try starting vncserver :0

    I get a message that that vnc server is already running.

    I have no idea how to get this working. Have tried all different things! :(

  6. Thank You Very Much!!!
    I have spent two days searching for a solution to get the VNC server working, but none gave a straight answer as this. Luckily, I stumbled on this article. I followed the instructions and it is working beautifully.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>