11.12.2024

How to install & configure Gnome on Oracle Linux 8.6

Introduction

Gnome is a free desktop environment, it acts as a desktop for Linux operating systems. It has been developed since 1997 for Unix systems mit is still being updated and maintained by programmer. In my publication I will demonstrate how to install & configure Gnome.

You can create a server in Serverspace with pre-installed operation system  Linux Oracle.

Getting started

I'm pre-logged on the server, I enter privileged mode, so that I don't have to run commands through "sudo" every time.

su

Before installing a graphical shell on your server, update your programs by typing the command.

yum update

After refresh programsinstall GUI on machine.

yum groupinstall "Server with GUI"

The installation could take up to 15 minutes.

After installing GUIchange default settings as a graphical shell.

systemctl set-default graphical

To accept changes reload your machine.

reboot

Configure the configuration file

After restarting machine we have to edit the parameter in the config file using a text editor of your choice.

nano/etc/gdm/custom.conf

 

Installing GUI server

Install the required packages.

yum install -y tigervnc-server tigervnc-server-module

After setup the VNC serverwe should create password for remote connection.

vncpasswd

At this commandyou can create pass only for viewing remote screencreate if u need.

This way the user has no rights to access the server but has rights to view the operation screen.

Configuring GUI

To connect remotely via VNC you must first specify which users are allowed to connect by entering the username in the configuration file.

Modify the config file with a text editor.

nano /etc/tigervnc/vncserver.users

I give access for my profileyou could change for your username.

Note: Don't forget to save the configuration file before quitting!

You have an option to change your resolution of remote connection.

Modify the argument file.

nano /etc/tigervnc/vncserver-config-defaults

The parameter "geometry" is responsible for the screen resolution of the remote desktop.

Also in this configuration file you can change the name of the session, I changed it to "serverspace" for the test.

Reboot the system configuration files.

systemctl daemon-reload

Launch and test

Start your GUI server with using port as we choose.

systemctl enable --now vncserver@:your port number.service

To check the status of our GUI server we need to run the command

systemctl status vncserver@:your port number.service

As we can notice Xvnc is listening 5901-port which sows that it is up and running.

I will demonstrate the connection using the program "VNC Viewer".

 

Specify the IP address of your server + the port you specified when you started the VNC server.

Use new created password for remote accessif you enter a "view onlythat you cant change server settings.

After you connect to vnc, you have to enter the password of the user you are connecting with, in my publication the password is the root user.

The optional security features

VNC sends the traffic unencrypted and this only makes you less secure because if the traffic is not secure the intruder can use this against you by intercepting the connection and get hold of certain data.

To avoid this, you can protect yourself by creating a unique connection and giving instead of our ip address, the name of the local machine, so the attacker will not know the ip address of the server we connect to.

The whole connection process will be done under Windows 10.
Since I use ssh authentication via keys I previously created them on my computer using the command.

ssh-keygen -t ed25519

Created openssh key "SshKey" which will be located in the directory "C:\" to connect to the server remotely.

Specify the created public key in the configuration file of the allowed clients to connect.

nano ~/.ssh/authorized_keys

Create a unique connection using "powershell".

ssh -L 5901:localhost:5901 -i .\SshKey root@ip_of_your_server

After unique connection, open the VNC client and specify localhost:port instead of the ip of the server.

localhost:5901

After that login the same way you did before, using the created VNC password.

The connection is now successful!

Output

At this publication I show you how to install, start and configure your VNC remote connect server, and how you can secure it.

Besides the vnc server, there is an alternative in the form of "xrdp" which allows you to use the Windows "rdp" protocol to connect to Linux servers.