You already get the server login credentials
Once your server is deployed, the login credentials are usually sent to your registered email. You can also get server login information, including username, password, and port in the Database Mart control panel, please refer to guide on how to manage servers in Database Mart control panel.
Please refer to the guide How to Connect to a Linux Server Remotely to log in to your Remote Linux Server. Next, input your login password as prompted.
As the following several operations require the root permission, we will switch to the root user first using the command below.
sudo -i
After that, issue the commands below to update your list of packages, followed by installing Xfce and the xfce4-goodies pacakge, which includes additional software and artwork that are related to the Xfce desktop.
apt update apt install xfce4 xfce4-goodies
Before the installation, you are often prompted to confirm the disk space this operation will use. Input "y" to continue the installation.
During the installation, you will be prompted to choose a default display manager - gdm3 or Lightdm - for Xfce. Choose either one and press enter to continue.
After the Xfce installation, install the VNC server - TightVNC by running the following command.
apt install tightvncserver
Next, run vncserver to start a VNC (Virtual Network Computing) desktop. You will be required to set a VNC access password then. Specify your password twice as prompted and press enter.
vncserver
You are given another option for set a view-only password for VNC access after the above step. As the name suggests, it is a password that allows the user to only view the remote screen and restrict mouse and keyboard input from clients who authenticated with the view-only password. The view-only password is not required. If you need one, type "y" and create a password. Otherwise, hit "n" and press enter.
If you need to change your password or add a view-only password later, you can run the following command.
vncpasswd
First, stop the running VNC server instance.
vncserver -kill :1
Next, we will modify the configuration file called "xstartup." Before this step, it's recommended to back up the original configuration file.
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
Then, use your prefered editor to modify the "xstartup" configuration file. Here we use the nano editor.
nano ~/.vnc/xstartup
Add the following lines to the file.
#!/bin/bash xrdb $HOME/.Xresources startxfce4 &
Use the "chmod" command to change the perssion of the file and make it executable.
chmod +x ~/.vnc/xstartup
After that, restart the VNC server.
vncserver -localhost
Search for VNC viewer in the browser and click into the site. Here, we use the Real VNC as an example.
Choose Windows desktop and click Donwload VNC Viewer.
Once the file is downloaded, double-click it to start the installation. First, select the language you would like to use during the installation and click OK. Then, click Next to start the installation process.
Read the license agreement carefully and check to accept the terms, followed by clicking Next.
In the Custom Setup window, choose the feature you'd like to install and customize the location where you prefer to keep the file. Then click next to continue.
In this window, click Install to begin the VNC Viewer installation.
By default, VNC does not utilize secure protocols for communication. To enhance the security of your VNC connection, it is recommended to establish an SSH tunnel before connecting. In this example, we are using PuTTy to connect to the Linux server and create an SSH tunnel by right-clicking on the top of the terminal windows, followed by clicking Change Settings...
In the left panel of the PuTTy Reconfiguration windows, go to Connection > SSH > Tunnels. Configure the Source port 59000, and Destination as localhost:5901, then click Add and Apply.
Once the tunnel is running, use a VNC client to connect to localhost:59000.
You will be prompted to input the VNC access password, which you have set in step 2.
Once the password passes the authentication, you will see the default Xfce desktop as follows.
You can now control your remote Linux server via VNC