Accessing a VM Through Virtual Network Computing (VNC)

You can access the services and resources that an Oracle SOA Cloud Service VM provides by logging into the VM through VNC.

You can use any VNC client utility to access a VM. For example, if you are using Windows, you might use RealVNC or TightVNC; if you are using Linux, you might use the vncviewer utility included with your Linux distribution.

By default, the port used by the VNC server on a Oracle SOA Cloud Service VM is not directly accessible through the Internet. An SSH tunnel enables access to the VNC server port on your local machine. An SSH tunnel also ensures that VNC communication is using a secure channel.

In order create a VNC session on a VM, you must first identify the public IP address of the VM and connect to it with SSH, as described in Accessing a VM Through a Secure Shell (SSH).

  1. SSH to the VM and switch to the oracle user:
    sudo su - oracle
    

    Note:

    The oracle VM user has regular OS user permissions. It is intended to be used to start and stop Oracle products that have been installed on the VM, or to run other Oracle applications and utilities on the VM.
  2. Disable the desktop screensaver lock for this user:
    gconftool-2 -s -t bool /apps/gnome-screensaver/lock_enabled false
    
    This Linux property controls whether or not the desktop prompts you for the user’s password when in screensaver mode.
  3. Start the VNC server on the VM:
    vncserver :1 -nolisten tcp -localhost -geometry 1680x1050
    

    Note:

    The VNC server is not directly accessible from clients outside of this VM. An SSH tunnel will be used to enable external and secure access to the VNC server.

    By default, the listen port for VNC session :1 is 5901, session :2 is 5902, and so on.

    If your local machine has a smaller display resolution, use a different geometry setting such as 1024x768.

  4. When prompted, enter a password for this VNC session.
  5. Disconnect from the VM.
  6. Create an SSH tunnel to localhost:5901 on the VM.
    ssh -i path_to_private_key -L 5901:localhost:5901 opc@VM_IP_address -N
    

    For example:

    ssh -i /home/myuser/id_rsa -L 5901:localhost:5901 opc@111.111.111.111 -N
    
  7. Launch your VNC client application and connect to localhost:5901.
  8. When prompted, enter the password that you previously configured for this VNC session.
You can use VNC to work with any resource accessible from the VM, including graphical applications. For example, you can launch the Fusion Middleware Configuration Wizard application on the Administration Server VM.

Note:

After your VNC work is complete, you can perform a <ctrl> C to shut down the SSH tunnel.

Note:

To terminate the VNC server on the VM, run vncserver —kill :1.