Skip to content

Instantly share code, notes, and snippets.

@emmanuelrosa
Created October 5, 2025 17:04
Show Gist options
  • Save emmanuelrosa/bbe99e2b8084b0b1d3039cd8e4f5c59d to your computer and use it in GitHub Desktop.
Save emmanuelrosa/bbe99e2b8084b0b1d3039cd8e4f5c59d to your computer and use it in GitHub Desktop.
Amazin Maya Installer 4 Linux
#!/usr/bin/env bash
# ami4linux.bash - Awesome Maya Installer 4 Linux
set -e
FEDORA_RELEASE="42"
CONFIG_DIR_PATH="$HOME/.config/ami4linux"
CONFIG_FILE="ami4linux.env"
CONFIG_FILE_PATH="$CONFIG_DIR_PATH/$CONFIG_FILE"
CHECKPOINT_FILE_PATH="$CONFIG_DIR_PATH/checkpoint"
CONTAINER_NAME_FILE_PATH="$CONFIG_DIR_PATH/container-name"
checkpoint=""
mk_checkpoint () {
echo -n "$1" > "$CHECKPOINT_FILE_PATH"
checkpoint="$1"
}
# Check for host dependencies
if [ "$CONTAINER_ID" == "" ]; then
which distrobox
which uuidgen
which xdg-mime
which xdg-open
fi
if [ "$DISPLAY" == "" ]; then
echo "No X11 detected. Maya depends on X11."
exit
fi
if [ ! -f "$CONFIG_FILE_PATH" ]; then
mkdir -p "$CONFIG_DIR_PATH"
cat << EOF > "$CONFIG_FILE_PATH"
# The following configuration entries are paths to the extracted Maya archive files.
# ami4linux does not extract the archives!
# Path to the extracted file Autodesk_Maya_2026_2_Update_Linux_64bit.tgz
EXTRACTED_MAYA_ARCHIVE="$HOME/Downloads/Maya"
# Path to the extracted file AdskIdentityManager-UCT-Installer.tar.gz
EXTRACTED_IDENTITY_ARCHIVE="$HOME/Downloads/AdskIdentityManager"
# Path to the extracted file AdskLicensingInstaller-15.7.1.13908.tar.gz
EXTRACTED_LICENSING_ARCHIVE="$HOME/Downloads/AdskLicensingInstaller"
# Uncomment the following line to configure the container for NVIDIA GPUs.
# NVIDIA=1
# Uncomment the following line to acknowledge you have finished configuring ami4linux.
# FINISHED=1
EOF
mk_checkpoint "START"
echo "Please edit the configuration file $CONFIG_FILE_PATH and then run this script again to continue."
exit
fi
source "$CONFIG_FILE_PATH"
checkpoint="$(cat $CHECKPOINT_FILE_PATH)"
if [ "$FINISHED" == "" ]; then
echo "Please finish editing the configuration file $CONFIG_FILE_PATH and then run this script again to continue."
exit
fi
if [ "$checkpoint" == "START" ]; then
container_name="$(uuidgen | cut -d "-" -f 1)-maya-2026"
nvidia_flag=""
if [ "$NVIDIA" == "1" ]; then
nvidia_flag="--nvidia"
fi
distrobox create $nvidia_flag --yes --no-entry -n $container_name -i quay.io/fedora/fedora-toolbox:$FEDORA_RELEASE --init --additional-packages "systemd systemd-pam pipewire-libs"
echo -n "$container_name" > "$CONTAINER_NAME_FILE_PATH"
mk_checkpoint "CREATED_CONTAINER"
fi
container_name="$(cat $CONTAINER_NAME_FILE_PATH)"
if [ "$CONTAINER_ID" == "" ]; then
echo "Please enter the Maya distrobox container using the command: distrobox enter $container_name"
echo "Then, run this script again to continue."
exit
fi
# if [ "$checkpoint" == "CREATED_CONTAINER" ]; then
# sudo dnf install epel-release -y
# mk_checkpoint "INSTALLED_EPEL"
# fi
if [ "$checkpoint" == "CREATED_CONTAINER" ]; then
sudo dnf install audiofile-devel alsa-lib gtk2 libffi libglvnd-opengl libmng libpng15 libpq libva libvdpau libXp libXmu libxkbcommon libXpm libXtst mesa-libGLU pcre2-utf32 xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi libxkbfile libpostproc-free webkit2gtk4.0 pcre2-utf16 -y
mk_checkpoint "INSTALLED_DEPS"
fi
if [ "$checkpoint" == "INSTALLED_DEPS" ]; then
sudo dnf group install rpm-development-tools -y
mk_checkpoint "INSTALLED_RPM_DEV_TOOLS"
fi
if [ "$checkpoint" == "INSTALLED_RPM_DEV_TOOLS" ]; then
sudo dnf install https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/x86_64/os/Packages/o/openssl1.1-1.1.1n-1.fc36.x86_64.rpm -y
mk_checkpoint "INSTALLED_OPENSSL"
fi
if [ "$checkpoint" == "INSTALLED_OPENSSL" ]; then
echo "The Maya installation will begin now."
echo "After installing Maya DO NOT start it. Instead, exit the (GUI) installer."
echo "Press ENTER to continue."
read
pushd "$EXTRACTED_MAYA_ARCHIVE"
chmod u+x ./Setup
./Setup
popd
mk_checkpoint "INSTALLED_MAYA"
fi
if [ "$checkpoint" == "INSTALLED_MAYA" ]; then
pushd "$EXTRACTED_LICENSING_ARCHIVE"
chmod u+x ./install.sh
sudo ./install.sh
popd
mk_checkpoint "INSTALLED_LICENSING"
fi
if [ "$checkpoint" == "INSTALLED_LICENSING" ]; then
pushd "$EXTRACTED_IDENTITY_ARCHIVE"
chmod u+x ./Setup
./Setup
popd
mk_checkpoint "INSTALLED_IDENTITY"
fi
if [ "$checkpoint" == "INSTALLED_IDENTITY" ]; then
pushd $(mktemp -d)
cat > webkit2gtk3.spec <<'SPEC'
Name: webkit2gtk3
Version: 1
Release: 0
Summary: Dummy Provides: webkit2gtk3 for Autodesk Licensing
License: Public-Domain
Provides: webkit2gtk3
%description
Empty placeholder so rpm -q webkit2gtk3 returns success.
%files
SPEC
rpmbuild -bb --define "_rpmdir $(pwd)" webkit2gtk3.spec
sudo rpm -i --nodeps --force x86_64/webkit2gtk3-1-0.x86_64.rpm
popd
mk_checkpoint "INSTALLED_DUMMY_WEBKIT"
fi
if [ "$checkpoint" == "INSTALLED_DUMMY_WEBKIT" ]; then
sudo dnf remove xdg-utils -y
sudo ln -s /usr/lib64/libtiff.so.6 /usr/autodesk/maya2026/lib/libtiff.so.5
sudo ln -s /usr/bin/distrobox-host-exec /usr/local/bin/xdg-open
mk_checkpoint "CREATED_SYMLINKS"
fi
if [ "$checkpoint" == "CREATED_SYMLINKS" ]; then
distrobox-export --app com.autodesk.AdskIdentityManager
mk_checkpoint "EXPORTED_APPS"
fi
mk_checkpoint "FINISHED_CONTAINER_SETUP"
if [ "$CONTAINER_ID" != "" ]; then
echo "The Maya distrobox container is ready. Please exit the container and run this script again to continue."
exit
fi
if [ "$checkpoint" == "FINISHED_CONTAINER_SETUP" ]; then
xdg-mime default com.autodesk.AdskIdentityManager.desktop x-scheme-handler/adskidmgr
fi
echo "Finished installing Maya!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment