August 24th  2022 - Guides

Install a VNC service to remotely access a Linux server

Virtual Network Computing or VNC is a system for viewing and controlling the desktop environment of a remote computer. This system is used to facilitate access and display of data processing** that only work from a graphical interface. It allows you to connect to a dedicated server at Aqua Ray through a graphical interface.
Here are the necessary steps for this installation.

Virtual Network Computing or VNC is a system for viewing and controlling the desktop environment of a remote computer. This system is used to facilitate access and display of data processing** that only work from a graphical interface. It allows you to connect to a dedicated server at Aqua Ray through a graphical interface.
Here are the necessary steps for this installation.

Prerequisites to start the installation

  • An operational Linux server;
  • A graphical interface installed on the server. We recommend the use of XFCE;
  • A VNC client on your workstation.

Installation of the VNC server

We recommend TigerVNC. Under Debian and derivatives, these are the packages « tigervnc-standalone-server » et « tigervnc-scraping-server »:
apt install tigervnc-standalone-server / tigervnc-scraping-server

We recommend TigerVNC. Under Debian and derivatives, these are the packages « tigervnc-standalone-server » et « tigervnc-scraping-server »:
apt install tigervnc-standalone-server / tigervnc-scraping-server

Configuration of the VNC service

For this article, we will use « oliv » to refer to the system user whose graphical session you want to use.

For this article, we will use « oliv » to refer to the system user whose graphical session you want to use.

  • First of all, make sure that « oliv » can start services that remain active after its disconnection:
    loginctl enable-linger oliv
    The following operations must be performed with « oliv ».
  • Connect to your server as « oliv »:
    ssh -l oliv addresse.du.serveur
  • Create the folder that will contain the service configuration:
    mkdir -p ~/.config/systemd/user/
  • Create the configuration file for the :
    nano ~/.config/systemd/user/x0vncserver.service

    Content should be:
    [Unit] <br>Description=Remote desktop service (VNC) <br>After=syslog.target network.target <br><br>[Service] <br>Type=forking <br>ExecStart=/usr/bin/sh -c '/usr/bin/x0vncserver -display :0 -rfbport 5900 -passwordfile /home/oliv/.vnc/passwd &' <br>Restart=on-failure <br><br>[Install] <br>WantedBy=multi-user.target
  • Create the folder that will contain the password file:
    mkdir /home/oliv/.vnc/
  • Create the file that will contain the VNC password:
    vncpasswd /home/oliv/.vnc/passwd
  • Make sure that the new configuration is taken into account by systemd :
    systemctl --user daemon-reload
  • Start the VNC server:
    systemctl --user start x0vncserver.service

The server listens on port 5900 by default. It is possible to change it from the file ~/.config/systemd/user/x0vncserver.service. Don't forget to reload the systemd configuration after each modification.

The server listens on port 5900 by default. It is possible to change it from the file ~/.config/systemd/user/x0vncserver.service. Don't forget to reload the systemd configuration after each modification.

Connection to the server in VNC

To connect to the server, enter the address of your server and the port number (5900). You will also be asked for a password, it is the one you defined before with « vncpasswd ».

To connect to the server, enter the address of your server and the port number (5900). You will also be asked for a password, it is the one you defined before with « vncpasswd ».

Contact us

Contact us

Any question ? A doubt ? A particular request ? Do not hesitate to contact us by clicking on this button below, we will answer you as quickly as possible.

Any question ? A doubt ? A particular request ? Do not hesitate to contact us by clicking on this button below, we will answer you as quickly as possible.

Did you like this article? You might also like

31
Mar

The importance of data backup for computer servers

Guides

On this World Data Backup Day, understand why it is important to backup your data? And how to do it well?

Continue
07
Feb

What are the main criteria to consider when choosing a web host?

Guides

With the increasingly common use of cloud services, businesses are regularly faced with choosing a reliable and efficient web hosting provider. However, the process is complex, there are many factors to consider to ensure that the needs of the business will be met.

Continue
31
Mar

The importance of data backup for computer servers

Guides

On this World Data Backup Day, understand why it is important to backup your data? And how to do it well?

Continue
07
Feb

What are the main criteria to consider when choosing a web host?

Guides

With the increasingly common use of cloud services, businesses are regularly faced with choosing a reliable and efficient web hosting provider. However, the process is complex, there are many factors to consider to ensure that the needs of the business will be met.

Continue
31
Mar

The importance of data backup for computer servers

Guides

On this World Data Backup Day, understand why it is important to backup your data? And how to do it well?

Continue
07
Feb

What are the main criteria to consider when choosing a web host?

Guides

With the increasingly common use of cloud services, businesses are regularly faced with choosing a reliable and efficient web hosting provider. However, the process is complex, there are many factors to consider to ensure that the needs of the business will be met.

Continue
Need assistance? Call us now!
Call us now! 01 84 04 04 05
Call us now! 01 84 04 04 05
DC Tier IV
AFNOR Certification ISO27001
AFNOR Certification HDS