18.3 Connecting to VNC Desktop

You can connect to a VNC desktop on an Oracle Linux 7 system using any VNC client. The following example instructions are for the TigerVNC client. Adapt the instructions for your client.

On Linux platforms:

  1. Install the TigerVNC client (vncviewer).

    # yum install tigervnc
  2. Start the TigerVNC client and connect to a desktop.

    To connect directly to a VNC desktop, you can start the TigerVNC client and enter host:display to specify the host name or IP address of the VNC server and the display number of the VNC desktop to connect to. Alternatively, you can specify the VNC desktop as an argument for the vncviewer command. For example:

    $ vncviewer myhost.example.com:1

    To connect to a VNC desktop through an SSH tunnel, use the -via option for the vncviewer command to specify the user name and host for the SSH connection, and use localhost:display to specify the VNC desktop. For example:

    $ vncviewer -via vncuser@myhost.example.com localhost:67

    See the vncviewer(1) manual page for more information.

On Microsoft Windows platforms:

  1. Download and install the TigerVNC client (vncviewer.exe) from http://tigervnc.org.

  2. Start the TigerVNC client and connect to a desktop.

    To connect directly to a VNC desktop, start the TigerVNC client and enter host:display to specify the host name or IP address of the VNC server and the display number of the VNC desktop to connect to.

    To connect to a VNC desktop through an SSH tunnel, requires the use of an SSH client program such as PuTTY. For example:

    1. Start PuTTY and create a new SSH connection to the VNC server.

      In the PuTTY Configuration window, navigate to Session, and enter the host name or IP address and port.

    2. Enable X11 forwarding.

      In the PuTTY Configuration window, navigate to Connection, SSH, and X11, and then select Enable X11 forwarding.

    3. Create the SSH tunnel.

      In the PuTTY Configuration window, navigate to Connection, SSH, and Tunnels. In the Source port box enter the port number on the client that is to be forwarded, for example 5900. In the Destination box enter host:display to specify the host name or IP address of the VNC server and the display number of the VNC desktop to connect to. Then click Add.

    4. Save the configuration.

      In the PuTTY Configuration window, navigate to Session, enter a name for the session in the Saved sessions box and click Save.

    5. Select the saved session, click Load and then click Open, and establish an SSH connection to the VNC server host.

    6. Start the TigerVNC client, and connect to localhost:display, where display is the source port number configured in the SSH tunnel. You might have to configure the firewall on the client to permit the connection.