Skip to content

Instantly share code, notes, and snippets.

@nhira
Last active June 19, 2024 01:41
Show Gist options
  • Save nhira/203cd72388e1332cccaf2d9d86742101 to your computer and use it in GitHub Desktop.
Save nhira/203cd72388e1332cccaf2d9d86742101 to your computer and use it in GitHub Desktop.
How to install Amazon Workspaces Linux Client for Fedora

Amazon WorkSpaces Linux client - RPM installation

Overview

The good news is that there is an Amazon WorkSpaces Linux client. If you happen to use Ubuntu, you can use the official instructions from the documentation. But what if you're on an rpm-friendly distribution like Fedora or CentOS?

alien to the rescue.

How to

You can use these steps to build a PCoIP client (not the 2023 WSP client) RPM from the original .deb package.

(Tested using a Lubuntu 23.10 image to build the RPM and Fedora 39 to install it.)

Get the .deb package

Download the file from the Workspaces Linux client page.

wget "https://d3nt0h4h6pmmc4.cloudfront.net/workspacesclient_focal_amd64.deb"

Create rpm

If you don't have alien, get it.

sudo apt install alien

To avoid some errors, we need to repackage manually.

sudo alien -rgv workspacesclient_focal_amd64.deb

Fedora now ships liblttng-ust0-2.13 and the package was built with 2.12, so we'll omit coreclrtraceprovider.so. See this issue for an unrelated project for a better explanation of the problem and the solution.

sudo sed -i '/"\/opt\/workspacesclient\/libcoreclrtraceptprovider.so"$/d' workspacesclient-4.7.0.4312/workspacesclient-4.7.0.4312-2.spec

Build the rpm package.

cd workspacesclient-4.7.0.4312 && \
    sudo rpmbuild --buildroot `pwd` -bb workspacesclient-4.7.0.4312-2.spec && \
    cd -

Did it work?

sudo rpm --query --info --package ./workspacesclient-4.7.0.4312-2.x86_64.rpm 

You should see output like this...

Name        : workspacesclient
Version     : 4.7.0.4312
Release     : 2
Architecture: x86_64
Install Date: (not installed)
Group       : Converted/misc
Size        : 162134366
License     : see /usr/share/doc/workspacesclient/copyright
Signature   : (none)
Source RPM  : workspacesclient-4.7.0.4312-2.src.rpm
Build Date  : Sat Nov 18 05:21:48 2023
Build Host  : lubuntu
Summary     : Amazon WorkSpaces Client for Ubuntu 20.04
Description :


(Converted from a deb package by alien version 8.95.6.)

Install

Copy over this rpm to your RPM-based host. Install it and try it out.

sudo dnf localinstall ./workspacesclient-4.7.0.4312-2.x86_64.rpm
/opt/workspacesclient/workspacesclient

Challenges

If you run into dependency errors for some packages that aren't in Fedora, you can try installing them yourself. These are not authoritative recommendations; they're just what others have found. Be careful about adding foreign packages to your installation.

# last confirmed on 24-Jun-2023 (includes libhiredis.so.0.13 and libhiredis.so.0.14)
sudo dnf install https://rpmfind.net/linux/openmandriva/4.3/repository/x86_64/main/release/lib64hiredis0.13-0.14.1-1-omv4050.x86_64.rpm

The spec also introduces an incorrect dependency error.

Error: 
 Problem: conflicting requests
  - nothing provides libbz2.so.1.0()(64bit) needed by workspacesclient-4.7.0.4312-2.x86_64 from @commandline
  - nothing provides libcurl.so.4(CURL_OPENSSL_4)(64bit) needed by workspacesclient-4.7.0.4312-2.x86_64 from @commandline
(try to add '--skip-broken' to skip uninstallable packages)

If these are the only dependencies you need, they're in the package, so we can use rpm to skip past them.

sudo rpm -ivh --nodeps ./workspacesclient-4.7.0.4312-2.x86_64.rpm

If the login doesn't render, you might be missing some packages.

sudo dnf install javascriptcoregtk4.0-devel webkit2gtk4.0-devel

If you run into a globalization related error, this invocation should help.

DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 /opt/workspacesclient/workspacesclient 
@Clifra-Jones
Copy link

@JHBoricua Just use the FlatPak. it works. Well, it does crash on exit but that's a FlatPak issue.
I use this every day without issue.

@JHBoricua
Copy link

JHBoricua commented Jun 13, 2024

I was using the Flatpak, but on Fedora 40 the latest release of the Flatpak crashes on startup. Not to mention it is unverified. There's not even a changelog for the latest update. If using Distrobox allows the use of the official package from Amazon, then IMHO it is less risky than using the Flatpak. In any case, I figured out how to make it work a few hours ago thanks to this Reddit post. Basically, I needed to also install the ubuntu-desktop package in addition to the workspaces one.

In my Fedora 40 I installed the client for ubunto 20.04 did the following:

distrobox create --image ubuntu:20.04 --name Amazon-Workspaces
distrobox enter Amazon-Workspaces
sudo apt update && sudo apt-get install --no-install-recommends ubuntu-desktop -y
wget -q -O - https://workspaces-client-linux-public-key.s3-us-west-2.amazonaws.com/ADB332E7.asc | sudo apt-key add -
echo "deb [arch=amd64] https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/amazon-workspaces-clients.list
sudo apt-get update
sudo apt install workspacesclient -y
distrobox-export --app workspacesclient

So far it's been working flawlessly. No crashes on exit either.

@OkButWine
Copy link

Late to the party but I agree that distrobox is the best way to go. The flatpak either will crash and/or be incompatible with the latest version of AWS Workspaces. Distrobox allows you to run Ubuntu and the install and run the latest version of AWS Workspaces from https://clients.amazonworkspaces.com/linux-install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment