Deploying Linux Desktops and Applications with Amazon AppStream 2.0

Overview

I suppose its impossible to keep up with every AWS announcement, even for some of your favorite services. I can’t really even remember how I came across this but on November 16, 2021, AWS announced that, “Amazon AppStream 2.0 adds support for Amazon Linux 2. With this launch, you can now stream Linux applications and desktops to your users…” and I had been kicking myself that I found out, a month later, because I really like AppStream. As soon as I could, I started digging into AppStream’s new capability. The process to provide Linux resources through AppStream is basically the same as that of Windows….1) Create an Image, 2) Deploy a Fleet, and 3) Create a Stack and assign users. The biggest difference is that Linux images do not use a GUI Image Assistant as do Windows images. Linux systems use the AppStreamImageAssistant command to add applications and create images.

Creating a Linux Image

To provide Linux desktops/applications via AppStream, one must start by creating a Linux image. To get you started, AWS has shared, at the time of this writing, (6) AppStream images based on Amazon Linux 2. You can choose to build a custom image from a General purpose, Graphics, or Graphics Pro base.

Figure 1: AppStream – Linux base images

Once the Image Builder has been created, wait for the Status to change to Running and click Connect

Figure 2: Connect to the Image Builder

Once I was able to connect to my Linux image, I installed applications locally to run them directly from the desktop and I installed the Citrix WorkSpace App to run applications published from a Citrix server farm. With my applications “installed” onto the image, I was ready to create the new Linux AppStream image. To do so, I used the following command: sudo AppStreamImageAssistant create-image –name TestLinuxDesktop –display-name TestLinuxDesktop

When using the AppStreamImageAssistant create-image command, only the –name option is required. Assuming the command is correct, a Success message like the one shown below will be displayed. Shortly after the success notification, the AppStream image builder will disconnect and within the AppStream service dashboard, the image will display a Status of Snapshotting. Once the Status is Stopped, proceed to build the necessary AppStream Fleet and Stack to provide users with access to the new Linux AppStream environment.

Figure 3: AppStreamImageAssistant create-image Example

WHAT!!! – When building the Fleet, I did not see my Linux image…

In this case, I was interested in publishing a Desktop, not applications but when attempting to deploy a new Fleet, I was surprised that my shiny new AppStream image was nowhere to be found. What happened?

As it turns out, I did not see my Linux image as an option for the fleet because I had not add an application to the AppStream Application Catalog.

Adding an Application to the AppStream Application Catalog

Adding an application to the catalog is also done using the AppStreamImageAssistant command, but with the add-application option. For this command, the –name and –absolute-app-path options are required though others may also be beneficial. A sample command with other optional options is shown below:

sudo AppStreamImageAssistant add-application \
–name=”Chromium” \
–absolute-app-path=”/usr/lib64/chromium-browser/chromium-browser” \

–display-name=”Chromium” \
–absolute-icon-path=”/usr/share/icons/hicolor/256×256/apps/chromium-browser.png” \
–absolute-manifest-path=”/tmp/chromium-manifest.txt”

Once this step was completed, I was able to use the Linux image to build a new Fleet and Stack. This issue with AppStream applications is not limited to Linux. I’ve seen the same behavior when publishing Windows desktops through AppStream but with Windows, you cannot create an image until an application is added using the Image Assistant.

amazon 
NNAppStream 2.0 
Choose your app to get started 
All Catalogs 
Chromium 
AS-LinuxDesktops 
Desktop 
Learn More Terms AppStream Client 
O Powered by Amazon AppStream 2.0 
aws
Figure 4: AppStream Catalogs
Recycle Bin 
Google 
Chrome 
Visual Studio 
Feedback 
Micros... 
Connect 
Applications Chromium Web Browser 
db-clcOI - Remote Desktop Connection 
2.0 
Mon 02:20 
Citrix Workspace 
citrlk 
C A Not secure 
StoreFront 
Group Policy Management 
Window 
File 
Help 
Edit 
Selection 
1 
View 
Go 
Rur 
I Google Chrome - Downlc x 
storefront.djblab.ad/Citrix/DB-StoreWeb/ 
HOME 
00 
oo 
APPS 
Untitled I - LibreOffice Writer 
File Edit View Insert Format 
Default Paragraph Style 
Sules 
Table 
Form 
Tools 
Liberation Serif 
v 12 pt 
O 
You are running version 7.2 of LibreOffice for the first time. Do you want to learn what's new? 
Welcome David Ball! 
Favorites 
Command Prompt 
Google Chrome 
Remote Desktop 
Connection 
v/ St.c,v we.came page on SKartup 
LibreOffice Writer 
Rballd31@gmaiLcom v 
Visual Studio Code 
Data 
pro 
SSH 
Seria 
Abou 
Pagelof 
amazon 
AppStream 
8 words, 
59 characters 
Running LibreOffice from on Linux 
Default Page Style 
@oAo 
Libreoffice Calc 
No Notifications
Figure 5: An AppStream Linux Desktop connecting to Citrix applications

A Helpful Link

To deep dive into the Linux image creation process, I suggest you review the following AWS tutorial. It provides a great overview and all the instructions one needs to get a basic AppStream Linux image up and running. Give it a shot and let us know what you think!

Leave a Reply

Your email address will not be published. Required fields are marked *