A great way to Learn Linux is by working with it directly! In the spirit of hands-on #Linux Learning, in this video you’ll be walked through the process of setting up a remote desktop in the cloud. You’ll be able to connect to it from an X2go client whenever you need it. This is a fun project for those looking for a more practical way to learn.
Build your own cloud desktop
What you’ll need:
- A Linux Cloud instance, preferably with at least 4GB of RAM
- X2Go client installed (Windows, macOS, or Linux)
Links:
- XQuartz (macOS users only)
- X2Go client
Disclaimer
Two common sponsors of Learn Linux TV (Akamai and CrowdSec) were mentioned during this video. However, this video is 100% non-sponsored. These services were mentioned only because the author actually uses them. Neither were made aware of their mention while this video was being produced.
Commands used
In this section, you’ll find notes pertaining to commands and such that were used within the video.
Security
Install the unattended upgrades package:
sudo apt install unattended-upgrades
Adjust configuration for unattended upgrades:
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
Enable automatic reboot:
Find the line:
//Unattended-Upgrade::Automatic-Reboot "false";
Uncomment by changing it to:
Unattended-Upgrade::Automatic-Reboot "true";
Also uncomment:
Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
Set a time for the automatic reboot to happen:
// Unattended-Upgrade::Automatic-Reboot-Time "02:00";
Change to (and adjust with your desired time):
Unattended-Upgrade::Automatic-Reboot-Time "04:00";
Verify automatic updates are fully enabled:
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
Ensure both are set to 1.
Install crowdsec
Add the repository:
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
Install Crowdsec:
sudo apt install crowdsec
systemctl status crowdsec
Install the firewall bouncer for Crowdsec:
sudo apt install crowdsec-firewall-bouncer-iptables
systemctl status crowdsec-firewall-bouncer
systemctl start crowdsec-firewall-bouncer
Install the Mate desktop
sudo apt install mate-desktop-environment
Enable required DBUS support
nano ~/.profile
Add:
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
Install X2go server
sudo add-apt-repository ppa:x2go/stable
sudo apt-get install x2goserver x2goserver-xsession
And that should do it! Install the X2Go client on your local computer and attempt connecting to your remote desktop.