Environment Variable Question

I am trying to solve a cluster of issues that stem from flame no longer working when launched from the command line on mac in our environment.

Is there some way to set things like environment variables in the app when launched from the icon? I have some python hooks that no longer work because they are dependent on environment variables that I can no longer set because I can’t launch from the command line. Is there a python hook spot that sort of sets the table for the rest of the app when it launches?

This used to work for me when I needed it.

Oh right, there we go.

I’m currently sitting here doing unsetenv over and over again and launching flame via terminal and watching it crash. If I get sick of that I’ll move on to just getting stuff to work through the icon and that.

Thanks!

What about aliases? I’m not sure if this will fix your problem with your env variables, but you can launch flame from terminal using aliases. I don’t use MacOS since a long time. But I used to setup aliases to launch flame from terminal in the same way that in linux (adding the alias in bashrc file). The difference is MacOs uses zsh and there is no a zshrc file by default. But there is no problem in create a new one (.zshrc file in home folder).

The basic form is :

alias flame=‘/opt/Autodesk/<flame_version>/bin/startApplication’

… replacing <flame_version> to get the actuall and full path.

But it needs update after every update version.

A more refined form is:

alias flame=‘LATEST_VERSION=$(ls -td /opt/Autodesk/flame* | head -1);$LATEST_VERSION/bin/./startApplication;’

typing “flame” will launch last flame version installed. This sh code is for bash and linux. I can’t guarantee it works because there are slight differences for bash script between linux and mac version, but I would say that it should work.

After edit zshrc file , type:

source .zhsrc

…to aply changes, or logout / login

1 Like

Yeah, my problem isn’t how to launch flame via terminal, it’s how to launch flame via terminal and not have it crash mysteriously when you load a project off a linux box.

That is still unsolved, but thanks to the previous post reminding me where to add environment variables I managed to add enough of our pipeline into the icon launch to get my python hook scripting to work again.

Thanks!