Set up Linux-based labs with a Desktop interface

Deliver training with Linux Desktop labs

Michael Sverdlik avatar
Written by Michael Sverdlik
Updated over a week ago

Note: You may try and create an image using other Linux distributions with other desktop environments than those specified below, but due to the large variety of Linux distributions and desktop interfaces, we may not be able to officially support them. Having said that, our customers have been able to run their own setups using Strigo. Examples of other configurations can be found here.

If you wish to deliver your training using a Linux-based desktop, you've come to the right place. There are two steps you must follow to achieve that:

  1. Make sure you have a properly configured lab image.

  2. Set up the lab interface to show a desktop interface instead of the default terminal interface.

Make sure you have a properly configured lab image

Below is a detailed explanation of both methods for achieving this:

Using our preview images

The AMI IDs provided below are Strigo preview images that were pre-configured to support the desktop functionality on a Linux-based image. The current configuration provides an Ubuntu 20.04 LTS with the XFCE desktop environment with minimal pre-installed applications.

To be able to use a Linux desktop, do the following:

  1. Add a new resource to your lab, click the Image button, and make sure to select the Custom tab. Use one of the following AMI IDs below:
    eu-west-1: ami-0218d273a8162ca46
    eu-west-2: ami-0df1c46ed9aada2c0
    eu-west-3: ami-0111b3ff5f6efcd9c
    us-west-1: ami-090b1ccae8b1e7168
    us-west-2: ami-00e1065e593d8b1cc

    us-east-1: ami-09f2d9424660182f4

    us-east-2: ami-050bc0bd97ed2089f
    ap-southeast-1: ami-0ba434ea9e380b0c1
    ap-northeast-1: ami-0279d794583a88419

  2. In the username field, use ubuntu.

  3. Click the Edit Interfaces button and select Desktop under the default interface section.

  4. Proceed as usual with configuring the rest of the class.

Note: You can use the aforementioned images as a base for your own custom images. Alternatively, if you would like to prepare a totally new custom image by following the instructions below.

Creating your image from scratch

Supported configurations

Due to the great variability in the Linux world, Strigo only officially supports a very narrow set of configurations:

  • Ubuntu 20.04 LTS

  • XFCE 4 Desktop environment

  • xrdp server

On an Ubuntu 20.04 server image run the following as root:

#!/bin/bash -e

apt-get update -y
apt-get upgrade -y

apt-get install -y xfce4 xfce4-goodies xrdp
echo "xfce4-session" > /home/ubuntu/.xsession
cat <<EOF > /home/ubuntu/.xsessionrc
export XDG_SESSION_DESKTOP=xubuntu
export XDG_DATA_DIRS=/usr/share/xfce4:/usr/share/xubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/usr/share
export XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg

chown ubuntu:ubuntu /home/ubuntu/.xsessionrc /home/ubuntu/.xsession

apt-get autoremove -y
apt-get clean -y

User requirements

The above snippet assumes that the username that will be used to connect to the running instance over RDP is ubuntu.

This user must be allowed to execute commands with sudo without being prompted for password.

For users that are familiar with Packer we also provide a public repository with all of the required configuration ready to run.

Set up the lab interface

In order for the desktop to show up inside the training environment, you will need to change the default interface for Linux-based images from Terminal to Desktop. You can do that using the Edit Interface functionality in your lab resources area. Learn more about how to do that here.

Did this answer your question?