Updated by LinodeWritten by Linode
Apr 16, 2020 Watch Pop OS 20.04 Auto-Tiling in action: To activate automatic window tiling in Pop OS 20.04, all you need to is toggle the “Tile Windows” switch at the top right of your screen. Tiling window manager for OS X similar to xmonad. Was originally written as an alternative to fjolnir’s awesome xnomad but written in pure Objective-C. It’s expanded to include some more features like Spaces support not reliant on fragile private APIs.
Contribute on GitHubReport an Issue | View File | Edit File
Virtual network computing, or VNC, is a graphical desktop sharing system that allows you to control one computer remotely from another. A VNC server transfers keyboard and mouse events, and displays the remote host’s screen via a network connection, which allows you to operate a full desktop environment on your Linode.
This guide explains how to install a graphic desktop environment on your Linode running Ubuntu 18.04 and how to connect to it from your local computer using VNC.
Familiarize yourself with our Getting Started guide and complete the steps for setting your Linode’s hostname and timezone.
Complete the sections of our Securing Your Server guide to create a standard user account, harden SSH access and remove unnecessary network services.
Update your system.
sudo
. If you’re not familiar with the sudo
command, you can check our Users and Groups guide.Ubuntu has several desktop environments available in its repositories. The following command installs the default desktop, Unity, as well as the dependencies that are required for the graphical interface to work properly:
NoteThis will install the full Ubuntu desktop environment, including office and web browsing tools. To install the desktop without these packages, run:
During the install process, you will be asked whether or not to change a system file to the new version:
Type y then enter to use the updated version.
Install the VNC server:
The VNC server generates a display, or graphical output, identified by a number that is defined when the server starts. If no display number is defined, the server will use the lowest one available. VNC connections take place on port 5900 + display
. This guide will use a display number of 1; therefore, you will connect to remote port 5901.
The default VNC connection is unencrypted. In order to secure your passwords and data, you will need to tunnel the traffic through an SSH connection to a local port. You can use the same local port for consistency.
From your desktop, connect to your Linode with the following command. Be sure to replace [email protected]
with your username and your Linode’s hostname or IP address:
From your Linode, launch the VNC server to test your connection. You will be prompted to set a password:
Initiate your connection as per the steps in the Connect to VNC from your Desktop section.
Open PuTTY and navigate to Tunnels
under the SSH
section in the menu. Add a new forwarded port as shown below, replacing example.com
with your Linode’s IP address or hostname:
Click Add, then return to the ‘Session’ screen. Enter your Linode’s hostname or IP address and a title for your session. Click save to save your settings for future use, and then click open to initiate your SSH tunnel.
Launch the VNC server to test your connection. You will be prompted to set a password:
Initiate your connection as per the steps in the Connect to VNC from your Desktop section.
In this section, you will use a VNC client, or viewer, to connect to the remote server. A viewer is the software that draws the graphical display generated by the server and creates the output on your local computer.
While there are many options for OS X and Windows, this guide will use RealVNC Viewer.
After installing and opening the viewer, connect to the localhost through your VNC client. The format is localhost:#
, where #
is the display number we used in the Secure your VNC connection section:
You will be warned that the connection is unencrypted, but if you have followed the steps above for securing your VNC connection, your session will be securely tunneled to your Linode. To proceed, press Continue.
You will be prompted to enter the password you specified when first launching the VNC Server. See Secure your VNC Connection if you have not yet started a VNC server on your Linode.
After connecting, you will see a blank gray screen since the desktop processes have not yet been started. In the next section we will configure your Linode to launch a full desktop.
There are a variety of VNC clients available for Ubuntu desktops. You can find the list here. This guide will use Remmina, which is installed by default.
Open Remmina.
Click the button to Create a new remote desktop profile
. Name your profile, specify the VNC protocol, and enter localhost:1
in the server field. The :1
in the server field corresponds to the display number. In the password section fill in the password you specified in Secure your VNC Connection:
Press Connect.
You’ll see a blank gray screen since the desktop processes have not yet started. In the next section, we will configure your Linode to launch a full desktop.
This section will configure VNC to launch the full Unity desktop when it starts.
Once you’ve successfully connected, exit the connection. Close the VNC server:
Edit the end of your ~/.vnc/xstartup
file to match the following configuration. This starts the desktop dependencies as background processes upon starting the VNC server:
Save and exit the file. Begin another VNC session:
Connect from your local VNC client using the same steps from the previous section. You should now see the full Ubuntu Desktop:
This section is optional. Follow these steps to configure the VNC server to start automatically after reboot.
Open your crontab. If you’ve never edited it before, you may be prompted to choose a text editor:
Add @reboot /usr/bin/vncserver :1
to the bottom of the file. Your crontab should look like this:
Save and exit the file. You can test by rebooting your Linode and connecting to the VNC server.
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This guide is published under a CC BY-ND 4.0 license.