Installing a Desktop Environment
Print
Created by: Keyur Panchal
Modified on: Mon, 21 Oct, 2024 at 6:56 PM
How to install VNC on Ubuntu?
Create a security group rule for TCP on VNC ports 5900–5910 and add it to your instance. See the security group guide here.
Install a VNC server on your instance.
sudo apt install tigervnc-standalone-server -y
|
How to install a Gnome or XFCE4 desktop environment on Ubuntu for VNC?
There are multiple desktop environments available for use with VNC. Here, we explain how to install Gnome or XFCE4.
Gnome
1. Install the Gnome desktop environment on your instance.
sudo apt update && sudo apt install gnome-shell -y
|
Note: Do not install the ubuntu-gnome-desktop package. Doing so will install other unnecessary packages that will permanently break your instance.
2. Start a VNC server session (with a (barebones) gnome-shell).
vncserver :1 -xstartup gnome-shell
|
3. Connect to your desktop using the information provided by the VNC server command. For example, you should see a port number that you can connect to.
vncext: Listening for VNC connections on local interface(s), port 5901
|
XFCE4
1. In order to create a xfce4 environment, install XFCE desktop environment on your instance:
sudo apt install xfce4 -y sudo apt install xfce4-terminal -y # The update-alternatives fixes the terminal icon on the desktop sudo update-alternatives --set x-terminal-emulator /usr/bin/xfce4-terminal.wrapper |
2. Start a VNC server session:
vncserver :1 -xstartup startxfce4
|
3. Connect to your desktop using the information provided by the VNC server command. For example, you should see a port number that you can connect to.
vncext: Listening for VNC connections on local interface(s), port 5901
|
Keyur is the author of this solution article.
Did you find it helpful?
Yes
No
Send feedback Sorry we couldn't be helpful. Help us improve this article with your feedback.