Translations:Setting up GUI Desktop on a VM/2/en
Jump to navigation
Jump to search
Install TigerVNC server.
This software runs on your VM and allows you to use the GUI desktop you installed in step 1. remotely using a client software.
Start the vnc server
The first time you start a vnc server it will ask you to set a password. This password is used later when connecting to the vnc desktop. You don't need a view-only password. The
Test your connection by opening port
Connect using an SSH tunnel (see SSH_tunnelling). There is an example of creating an SSH tunnel to a VNC server running on a compute node of one of our clusters.
Below are instructions for connecting using an SSH tunnel for linux or mac:
Close port
Once you are finished using the remote desktop you may stop the vncserver with:
This article shows a few of these different desktops. Below are the commands to install the MATE desktop.
[name@server ~]$ sudo apt update
[name@server ~]$ sudo apt upgrade -y
[name@server ~]$ sudo apt install ubuntu-mate-desktop
During the installation of the ubuntu-mate-desktop
package it will ask you to choose the default display manager, a good option is lightdm
. Installing the ubuntu-mate-desktop
package can take a fair amount of time (something like 15-30 mins).
This software runs on your VM and allows you to use the GUI desktop you installed in step 1. remotely using a client software.
[name@server ~]$ sudo apt install -y tigervnc-common tigervnc-standalone-server
This command will install the TigerVNC server and some supporting software. For details about using VNC servers and clients see our docs on VNC.
[name@server ~]$ vncserver
-> enter a password
-> enter "n" for view-only password
vncpasswd
command can later be used to change your password.
5901
(see security groups for more information about opening ports to your VMs with OpenStack) and connecting using a VNC viewer, for example TigerVNC. However, this is not a secure connection; data sent to and from your VM will not be encrypted. This is only meant to test your server-client connection before connecting securely with an SSH tunnel (the next step). If you are confident in your ability to setup an SSH tunnel, you may skip this step.
- Open your terminal
- Type the following in your local terminal:
SSH -i filepathtoyoursshkey/sshprivatekeyfile.key -L5901:localhost:5901 ubuntu@ipaddressofyourVM
- Start your VNC viewer.
- In the VNC server field enter:
localhost:5901
. - Your GUI desktop for your remote session should now open
5901
. Once you are connected to your VNC server using an SSH tunnel, you no longer require port 5901 open so it is recommended that you remove this rule from your security groups. (see security groups for more information).
[name@server ~]$ vncserver -kill :1