Skip to content

Instantly share code, notes, and snippets.

@avoidik
Last active May 22, 2024 17:49
Show Gist options
  • Save avoidik/0be4d08b8e9d2437adc7908069edd866 to your computer and use it in GitHub Desktop.
Save avoidik/0be4d08b8e9d2437adc7908069edd866 to your computer and use it in GitHub Desktop.
How to install Citrix Workspace app onto Raspbian or Ubuntu Arm64

Citrix Workspace

In this manual I assume that we'll be using usb audio handset instead of hdmi audio output

Step

Check available architectures first

$ dpkg --print-architecture
arm64
$ dpkg --print-foreign-architectures
armhf

Add armhf if foreign architectures list is empty

sudo dpkg --add-architecture armhf
sudo apt-get update

Install required dependencies

sudo apt-get install \
  libc++1-13:armhf \
  libunwind-13:armhf \
  libcanberra-gtk-module:armhf \
  libcanberra-gtk3-module:armhf \
  libwebkit2gtk-4.0-37:armhf

Download Linux armhf deb package from here https://www.citrix.com/downloads/workspace-app/linux/workspace-app-for-linux-latest.html

Install it

sudo dpkg -i icaclient_aa.bb.cc.dd_armhf.deb

In some cases you can install missing packages using sudo apt-get install --fix-broken

Also install murrine theme

sudo apt-get install gtk2-engines-murrine:armhf

This will fix ugly UI and prevent errors like this

(wfica:48086): Gtk-WARNING **: 15:54:38.500: Unable to locate theme engine in module_path: "murrine"

Link and rehash trusted CA certificates

sudo ln -s /etc/ssl/certs/*.pem /opt/Citrix/ICAClient/keystore/cacerts/
sudo /opt/Citrix/ICAClient/util/ctx_rehash

Enable pulseaudio support for all users (make sure this flag is in the file), otherwise ALSA will be in use

$ nano /opt/Citrix/ICAClient/config/module.ini
[ClientAudio]
AudioRedirectionV4=True

Enable microphone and set medium audio quality for current user only (make sure this flag is in the file)

$ nano ~/.ICAClient/wfclient.ini
[WFClient]
AllowAudioInput=True
EnableAudioInput=true
AudioBandWidthLimit=1

Here AudioBandWidthLimit can be one of the following:

  • 0 specifies the bandwidth as high and means the Vorbis codec is used
  • 1 specifies the bandwidth as medium and means the Speex codec is used
  • 2 specifies the bandwidth as low and means the Speex codec is used

Note: If you want to change the default for all Citrix Workspace app users, modify the module.ini configuration file in the $ICAROOT/config directory (e.g. /opt/Citrix/ICAClient/config/module.ini).

Note: If an entry in All_Regions.ini is set to a specific value, the value for that entry in module.ini isn't used. The values in All_Regions.ini take precedence over the value in module.ini

Note: If the $HOME/.ICAClient/wfclient.ini file does not exist, wfica creates it by copying $ICAROOT/config/wfclient.template. When you change this template file, the changes are applied to all the Citrix Workspace app users.

Note: To apply configuration changes for a user, modify the wfclient.ini file in the user's $HOME/.ICAClient directory. The settings in this file apply to future connections for that user.

Note: The value set in wfclient.ini takes precedence over the value in module.ini.

Install pulseaudio volume control

sudo apt install pavucontrol

Prioritize usb audio

echo "options snd-usb-audio index=0" | sudo tee /etc/modprobe.d/alsa-base.conf

On Ubuntu it's also recommended to set tsched flag to 0, just open /etc/pulse/default.pa file and append tsched=0 to the load-module module-udev-detect line

Adjust /boot/config.txt file

# dtparam=audio=on
dtoverlay=vc4-kms-v3d,noaudio
max_framebuffers=2
gpu_mem=128
disable_splash=1

On Ubuntu someone has recommended to use vc4-fkms-v3d instead, personally for me vc4-kms-v3d works much better, I also faced no video output on HDMI port issue, I was able to resolved it by setting hdmi_force_hotplug=1 and config_hdmi_boost=4 flags

Reboot and check audio output

aplay -l
pactl list sinks short
pactl list cards short
aplay -Dplughw:0,0 -fcd /usr/share/sounds/alsa/Front_Center.wav

Run Citrix Workspace check

sudo /opt/Citrix/ICAClient/util/workspacecheck.sh

If something went wrong with the audio output

journalctl --list-boots --no-pager
journalctl --boot 0 --no-pager --user -xeu pulseaudio.service
rm -f ~/.asoundrc

Hide citrixlog user from the login session

$ cat /etc/lightdm/users.conf

Append citrixlog to hidden-users list in this file

Alternatively, add the citrixlog user to AccountsService as follows

cat <<-'EOF' | sudo tee /var/lib/AccountsService/users/citrixlog
[User]
SystemAccount=true
EOF
sudo systemctl restart accounts-daemon.service

Now connect to Citrix VDI as usual using your favorite web-browser

Extra

To enable windowed-mode by default (for current user only)

$ cat ~/.ICAClient/wfclient.ini
[Thinwire3.0]
DesiredHRES=1600
DesiredVRES=900
UseFullScreen=False
TWIMode=Off
$ cat ~/.ICAClient/All_Regions.ini
[Virtual Channels\Seamless Windows]
TWIMode=Off
[Virtual Channels\Keyboard]
TransparentKeyPassthrough=Remote

[Virtual Channels\Thinwire Graphics]
DesiredHRES=1600
DesiredVRES=900
UseFullScreen=False
TWIFullScreenMode=0

If you see something like this

FIPS violation detected at crypto/evp/digest.c:219, reason: SHA-1 hash algorithm is not allowed in FIPS mode.

This error means that one or more trusted CA certificate uses SHA-1 as a signature algo by default, which is considered insecure due to potential collisions. You can find them all at once:

for cert in /opt/Citrix/ICAClient/keystore/cacerts/*.pem ; do if openssl x509 -text -noout -in $cert | grep -q 'sha1With' ; then echo $cert ; fi ; done

References

https://docs.citrix.com/en-us/citrix-workspace-app-for-linux/configure-xenapp.html

@avoidik
Copy link
Author

avoidik commented Mar 20, 2023

Adding the libunwind-12 library dependency for llvm-12

Starting with the 2111 release, a new dependency called the libunwind-12 library is added for llvm-12. However, by default, it does not exist in the original repository. Install the libunwind-12 library manually in the repository using the following steps:

Install

# bionic
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
cat <<'EOF' | tee -a /etc/apt/sources.list.d/llvm.list > /dev/null
deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main
deb-src https://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main
EOF
sudo apt-get update -y
sudo apt-get install libunwind-12
# jammy
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/llvm.gpg
cat <<'EOF' | tee -a /etc/apt/sources.list.d/llvm.list > /dev/null
deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/jammy/ llvm-toolchain-jammy main
deb-src [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/jammy/ llvm-toolchain-jammy main
EOF

Reference

https://docs.citrix.com/en-us/citrix-workspace-app-for-linux/configure-xenapp.html#adding-the-libunwind-12-library-dependency-for-llvm-12

@m0jek
Copy link

m0jek commented Jan 25, 2024

Thank you for sharing this gist. I have Citrix Workspace working on my Raspberry Pi 5 now. I am using Ubuntu 23.10 for RPi 5 as its kernel compiled for 4k pages while as RaspberryPi OS uses 16k pages, and I didn't feel like building a new kernel.

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