Skip to content

Instantly share code, notes, and snippets.

@johrstrom
Last active June 7, 2021 19:35
Show Gist options
  • Save johrstrom/110242c274eea508110477dc150d26a5 to your computer and use it in GitHub Desktop.
Save johrstrom/110242c274eea508110477dc150d26a5 to your computer and use it in GitHub Desktop.
Create a AutoDesk Maya Desktop Icon for an OnDemand OSC Virtual Desktop

Instructions for Creating a desktop icon

This gist is a simple tutorial on how to create an AutoDesk Maya Desktop Icon on a linux based system.
It's primarily for users of Open Ondemand using Virutal Desktops (VDI), but could be helpful for any novice Linux user trying to figure out how to create a desktop icon from scratch.

  1. create a 'bin' directory in your home folder. You can do this through the Files explorer application with a button at top right labeled 'New Dir'.
  2. Copy and paste the 'maya.sh' shell script supplied in this gist into that newly created directory. You can download it from here and upload it, or create a new file and paste the contents in it. If you're a member of Kent St., then use the kent-st-maya.sh file instead.
  3. Copy and paste the maya.desktop file supplied in this gist to your Desktop folder (located in your home directory).
  4. Edit maya.desktop, replacing with you actual home location. For example my home is /users/PZS0714/johrstrom/. If you wish you can edit files through OnDemand's file explorer - simply navigate to the file through the File Explorer, highlight the file and press the 'Edit' button.
#!/bin/bash
module load singularity/current
module load project/kent
module load maya/2020-kent
mkdir -p $TMPDIR/Autodesk
BIND_DIRS="$TMPDIR/Autodesk:/var/opt/Autodesk"
maya_init.sh
singularity exec -B "$BIND_DIRS" $MAYA_IMG maya
[Desktop Entry]
Version=1.0
Name=Maya
GemericName=Maya
Categories=Graphics
Type=Application
Terminal=true
Encoding=UTF-8
# Here you have to change to your home directory
# If you're a member of Kent St., then use the kent-st-maya.sh file.
Exec=sh <your home here>/bin/maya.sh
#!/bin/bash
JOB_TMPDIR=$TMPDIR
BIND_DIRS="$JOB_TMPDIR:/tmp"
# set a new tmpdir bc that's what the container needs to look at
export TMPDIR="/tmp"
module load singularity/current
module load project/accad
module load maya/2020-accad
mkdir -p $JOB_TMPDIR/Autodesk
BIND_DIRS="$DIR_BINDS,$JOB_TMPDIR/Autodesk:/var/opt/Autodesk"
# init the tmpdir
TMPDIR=$JOB_TMPDIR maya_init.sh
singularity exec -B "$BIND_DIRS" "$MAYA_IMG" maya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment