TigerVNC



What About TigerVNC? The TigerVNC Project was founded by some of the former TightVNC developers, Red Hat, and The VirtualGL Project in early 2009, with the goal of providing a high-performance VNC solution based on the RealVNC 4 and X.org code bases. 2021-03-08 tigervnc 1.11.0+dfsg-1 imported into kali-rolling (Kali Repository) 2020-10-05 tigervnc 1.10.1+dfsg-9 imported into kali-rolling (Kali Repository).

Virtual Network Computing (VNC) works by capturing the display’s frame buffer and making it available across the network. This post shows you how to install TigerVNC and configure it to provide remote users access to their graphical desktop environment as if they were physically in front of the system.

  • Free to download and install. Very easy to learn and use. Simple to configure on remote.
  • TigerVNC is an implementation of the Virtual Network Computing (VNC) protocol. This article focuses on the server functionality.

For the example in this post we will use a CentOS 7 server as VNC server and a local computer with a VNC client to connect to it. It assumes that the remote system is running the OpenSSH SSH server and a graphical desktop environment such as GNOME or KDE. You can refer the post “CentOS / RHEL 7 : How to Install GUI” to install Graphical environment before proceeding.

Installing VNC server

1. Make sure you have access to a local or remote yum repository to install the required packages.

2. Install the GUI desktop package if not already installed to have a GUI access to VNC server.

3. On the VNC server, install the TigerVNC server package:

Configuring VNC server

Copy the configuration file, /lib/systemd/system/vncserver@.service, to the directory /etc/systemd/system/ following the naming of ‘vncserver_[username]@:[port].service‘. For example:

Tigervnc Client For Windows 10

Note: It is common to create different configuration files for each user. As a best practice we can add the username to the configuration file as this will help to identify which file belongs to each user. This is not required.

3. Modify the configuration files that have been created for each user (In this example we are going to use root and oracle) :
A. Replace the &ltUSER&gt placeholder with “root” user that appears in the [Service] for file “vncserver_root@:2.service” and “oracle” for file “vncserver_oracle@:3.service” with vi.

You may also use “sed” to automatically make the username replacement:

B. Add the geometry to the configuration file as well for each user. In this example we are going to add “-geometry 800×800” to the configuration file. This will be at the end of the line starting with “ExecStart”.

4. After making the modifications in step A and B the line we have modified under the configuration file should look similar to these:

For file “vncserver_root@:2.service

For File “vncserver_oracle@:3.service

The command specified in the ExecStart entry is invoked when we start the server using systemctl start; it uses runuser to run TigerVNC under the user’s account. The -l argument provides the username and -c specifies the command and its arguments that runuser will execute. The PIDFile entry specifies the directory in which the running process will keep track of its process ID.

Note: Starting with RHEL7.4 the supported server options to pass to vncserver upon invocation has been moved to a new file named ‘config’ in ~/.vnc/ directory. So there will be no need to add those option in the ExecStart line.
Tigervnc config

Configure firewalld

1. Traffic for the display’s corresponding port should be allowed by the firewall. Display 0 uses port 5900, display 1 uses port 5901, display 2 uses port 5902, and so on. If you’re using FirewallD, the predefined vnc-server service opens ports 5900-5903:

If you need additional ports or if you don’t need to open the entire range, you can open just what you need using –add-port:

2. Reload the firewall to make firewall rules effective.

3. Reload the configuration:

Start the Services and set password

1. We will now enable the vncserver service for each user on the selected port, this will also enable autostart on system boot, with the commands below:

2. Reload systemd’s configuration to make it aware of the new unit files:

3. Configure a password for each user to be used with vncserver.

4. You will need to execute “vncserver” in the command line while logged in as the user. This will automatically ask you to create a new password for the user.

Accessing VNC server with VNC viewer

You can install any VNC viewer software on your client machine to access the VNC server. I am using realVNC software on my MAC to access the VNC server. You can use any of the below VNC viewer softwares according to the OS you are using.
1. TigerVNC: http://tigervnc.org
2. TightVNC: https://www.tightvnc.com/download.php
3. RealVNC: https://www.realvnc.com/en/connect/download/viewer

Tigervnc

Use the VNC display :1 for conecting the VNV server.

There you are!!! You are now connected to the VNC server.

This page contains changes which are not marked for translation.


Home
Wikipedia

TigerVNC is a client/server software package allowing remote network access to graphical desktops.

Installation

USE flags

USE flags fornet-misc/tigervncRemote desktop viewer display system

dri3 Build with DRI3 support
drm Build with DRM support
gnutls Prefer net-libs/gnutls as SSL/TLS provider (ineffective with USE=-ssl)
java Add support for Java
libressl Use dev-libs/libressl instead of dev-libs/openssl when applicable (see also the ssl useflag)
nls Add Native Language Support (using gettextGNU locale utilities)
opengl Add support for OpenGL (3D graphics)
pam Add support for PAM (Pluggable Authentication Modules)DANGEROUS to arbitrarily flip
server Build TigerVNC server
xinerama Add support for querying multi-monitor screen geometry through the Xinerama API
xorgmodule Build the Xorg module
Data provided by the Gentoo Package Database · Last update: 2021-02-21 13:53 More information about USE flags

Emerge

Those using the package for the VNC server need to install the package with the server USE flag enabled. This can be added to the package.use file (or directory), or specified one-shot-like on the command-line:

root #USE='server' emerge --ask --update --newuse net-misc/tigervnc
Tigervnc config
Note
Setting USE='server' as displayed in the example above will emerge the package with the specified USE flags, however the flags will not be preserved upon package upgrades. Be sure to set them in package.use in order to make flags persist when applying system updates.

Tigervnc Arch

Those installing just the client can simply emerge the package:

Single Server Configuration

This configuration allows remote control of the entire Xorg X11 server.

Create the TigerVNC config file for Xorg X11

FILE/etc/X11/xorg.conf.d/40-vnc.conf

Create /etc/X11/vncpasswd

Multiple Server Configuration

Login as 'normal' user. The following steps should be take for any user who wishes to configure the VNC server for remote connection.

Set a password:

Start the server:

If desired, use a VNC client on either a local or remote machine to test the connection.

Once finished, kill the running vncserver:

Displays

Setup the displays. Substitute each 'user' value below with the name of a user who will be running the VNC server on the machine:

FILE/etc/conf.d/tigervnc

Typically the value of 0: will be used for the server's own X display. This is why the example above starts by using the :1 display handle.

Desktop environments

Each user who will be running a VNC server can configure an X startup script. This script can define which desktop environment will be used for the X server to run when connecting a client to the server. For example:

kde

FILE~/.vnc/xstartup

gnome

Tigervnc For Mac

Edit the VNC startup script: