I am currently writing a number of shell scripts which will run both on an Amazon Workspaces Linux instance and elsewhere on other Linux hosts (e.g. Amazon Linux EC2 instances).
I would like to have certain Bash variable values configured differently depending on whether or not a given script is being run on a WorkSpaces instance.
Given this, I was wondering if there is a way of checking at the OS level whether the host is an Amazon WorkSpace or not?
Although possibly not fail proof, one method of identifying whether a Linux host is one of the Amazon Linux WorkSpaces hosts is to look for the presence of the
/usr/share/icons/amazon-workspaces
directory where the icon assets for MATE window manager theme are stored.