Remote Access with VNC

Revision as of 23:01, 12 April 2018 by Sam (talk | contribs) (Started article)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Virtual Network Computing (VNC) enables you to control a remote computer via a graphical desktop (as opposed to a remote shell access). VNC is platform-independent and lets you access the remote machine from any operating system.

openSUSE Leap supports two different kinds of VNC sessions: One-time sessions that "live" as long as the VNC connection from the client is kept up, and persistent sessions that "live" until they are explicitly terminated.

Note: Session Types

A machine can offer both kinds of sessions simultaneously on different ports, but an open session cannot be converted from one type to the other.

Important: Supported Display Managers

A machine can reliably accept VNC connections only if it uses a display manager that supports the XDMCP protocol. While gdm, lxdm, or lightdm support XDMCP, the KDE 5 default display manager sddm does not support it. When changing the default display manager, remember to log out of the current X session and restart the display manager with

 tux > sudo systemctl restart xdm.service

The vncviewer Client

To connect to a VNC service provided by a server, a client is needed. The default in openSUSE Leap is vncviewer, provided by the tigervnc package.

Connecting Using the vncviewer CLI

To start your VNC viewer and initiate a session with the server, use the command:

 tux > vncviewer thinkserver.freddythechick.uk:1

Instead of the VNC display number you can also specify the port number with two colons:

 tux > vncviewer thinkserver.freddythechick.uk::5901

Note: Display and Port Number The actual display or port number you specify in the VNC client must be the same as the display or port number picked by the vncserver command on the target machine. See Section 4.4, "Persistent VNC Sessions" for further info.

Connecting Using the vncviewer GUI

By running vncviewer without specifying --listen or a host to connect to, it will show a window to ask for connection details. Enter the host into the VNC server field like in Section 4.1.1, "Connecting Using the vncviewer CLI" and click Connect.

Notification of Unencrypted Connections

The VNC protocol supports different kinds of encrypted connections, not to be confused with password authentication. If a connection does not use TLS, the text "(Connection not encrypted!)" can be seen in the window title of the VNC viewer.

Remmina: the Remote Desktop Client

Remmina is a modern and feature rich remote desktop client. It supports several access methods, for example VNC, SSH, RDP, or Spice.

Installation

To use Remmina, verify whether the remmina package is installed on your system, and install it if not. Remember to install the VNC plugin for Remmina as well:

 sudo zypper in remmina remmina-plugin-vnc

Main Window

Run Remmina by entering the remmina command.

The main application window shows the list of stored remote sessions. Here you can add and save a new remote session, quick-start a new session without saving it, start a previously saved session, or set Remmina's global preferences.

Adding Remote Sessions

To add and save a new remote session, click + in the top left of the main window. The Remote Desktop Preference window opens.

Complete the fields that specify your newly added remote session profile. The most important are:

Name
Name of the profile. It will be listed in the main window.

Protocol
The protocol to use when connection to the remote session, for example VNC.

Server
The IP or DNS address and display number of the remote server.

User name, Password
Credentials to use for remote authentication. Leave empty for no authentication.

Color depth, Quality
Select the best options according to you connection speed and quality.

Select the Advanced tab to enter more specific settings.

Tip: Disable Encryption

If the communication between the client and remote server is not encrypted, active Disable encryption, otherwise the connection fails.

Select the SSH tab for advanced SSH tunneling and authentication options.

Confirm with Save. Your new profile will be listed in the main window.

Starting Remote Sessions

You can either start a previously saved session, or quick-start a remote session without saving the connection details.

Quick-starting Remote Sessions

To start a remote session quickly without proper adding and saving connection details, use the drop-down box and text field at the top of the main window.

Select the communication protocol from the drop-down box, for example 'VNC', then enter the VNC server DNS or IP address followed by a colon and a display number, and confirm with Enter.

Opening Saved Remote Sessions

To open a specific remote session, double-click it from the list of sessions.

Remote Sessions Window

Remote sessions are opened in tabs of a separate window. Each tab hosts one session. The toolbar on the left of the window helps you manage the windows/sessions, such as toggle fullscreen mode, resize the window to match the display size of the session, send specific keystrokes to the session, take screenshots of the session, or set the image quality.

Editing, Copying and Deleting Saved Sessions

To edit a saved remote session, right-click its name in the Remmina's main window and select Edit. Refer to Section 4.2.3, "Adding Remote Sessions" for the description of the relevant fields.

To 'copy a saved remote session, right-click its name in the Remmina's main window and select Copy. In the Remote Desktop Preference window, change the name of the profile, optionally adjust relevant options, and confirm with Save.

To Delete a saved remote session, right-click its name in the Remmina's main window and select Delete. Confirm with Yes in the next dialog.