# Shotgun Launch Nuke : License Issue

**URL:** <https://community.shotgridsoftware.com/t/shotgun-launch-nuke-license-issue/3251>\
**Category:** Pipeline Integrations\
**Created:** [October 4, 2019, 2:37pm UTC](https://community.shotgridsoftware.com/t/shotgun-launch-nuke-license-issue/3251 "2019-10-04T14:37:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![he.sun](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@he.sun](https://community.shotgridsoftware.com/u/he.sun)\
**Post date:** [October 4, 2019, 2:37pm UTC](https://community.shotgridsoftware.com/t/shotgun-launch-nuke-license-issue/3251/1 "2019-10-04T14:37:53Z")

</div>

Shotgun Launch Nuke Non-Commercial, other than licensed Nuke. Is there a way we could force Shotgun to Launch licensed Nuke or Nuke X instead of picking up the Non-Commercial all the time ?

Reason for failure: A suitable license does not exist.

## RLM LICENSE DIAGNOSTICS

nuke\_i : No license for product (-1)  
License Path:  
C:\Users[username]\FoundryLicensing\04d9f504cd4c;C:\Program Files\The Foundry\RLM;C:\ProgramData\The Foundry\RLM;C:\Program Files (x86)\The Foundry\RLM;C:\Users\he.sun\FoundryLicensing;C:\ProgramData\The Foundry\RLM

---

<div class="post-metadata">

**Author:** ![tannaz](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/tannaz/32/32_2.png) [@tannaz](https://community.shotgridsoftware.com/u/tannaz)\
**Post date:** [October 4, 2019, 8:22pm UTC](https://community.shotgridsoftware.com/t/shotgun-launch-nuke-license-issue/3251/2 "2019-10-04T20:22:06Z")

</div>

Hello – I’m not an expert in Nuke license issues, but I wonder if maybe you can set the `FOUNDRY_LICENSE_FILE` environment variable to point to the license file that you want to use? [(More info in Foundry’s documentation.)](https://learn.foundry.com/nuke/8.0/content/user_guide/configuring_nuke/nuke_environment_variables.html)

You could set this variable in the `before_app_launch` core hook, which runs right before Nuke is launched.

---

<div class="post-metadata">

**Author:** ![Ross\_Macaluso](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ross_macaluso/32/873_2.png) [@Ross\_Macaluso](https://community.shotgridsoftware.com/u/Ross_Macaluso)\
**Post date:** [October 4, 2019, 11:17pm UTC](https://community.shotgridsoftware.com/t/shotgun-launch-nuke-license-issue/3251/3 "2019-10-04T23:17:36Z")

</div>

If you have a physical license file that you want to point to than what @tannaz said is exactly what you want.

However if you have a server that is hosting the license, and you have multiple floating licenses, than you want to look into pointing the ‘foundry\_LICENSE’ environment variable to port@server. This can be done during a startup script when a user logs in, or part of a setEnv phase called from a launcher script, or the before\_app\_launch if you are always inside a shotgun environment… there’s many ways to handle this just depends how your place of work is setup.

---

<div class="post-metadata">

**Author:** ![he.sun](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@he.sun](https://community.shotgridsoftware.com/u/he.sun)\
**Post date:** [October 5, 2019, 7:53am UTC](https://community.shotgridsoftware.com/t/shotgun-launch-nuke-license-issue/3251/4 "2019-10-05T07:53:16Z")

</div>

OK. We have floating license, so need to set env port@server. Can you be more specific about step to set it up please ? where is `before_app_launch` core hook located for example

---

<div class="post-metadata">

**Author:** ![Ross\_Macaluso](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ross_macaluso/32/873_2.png) [@Ross\_Macaluso](https://community.shotgridsoftware.com/u/Ross_Macaluso)\
**Post date:** [October 10, 2019, 7:05pm UTC](https://community.shotgridsoftware.com/t/shotgun-launch-nuke-license-issue/3251/5 "2019-10-10T19:05:46Z")

</div>

the before\_app\_launch hook is located in the tk-multi-launchapp shotgun app,

I have no idea how your shotgun config is setup… but generally speaking… you will have a shotgun project with the following folders inside cache, config, install… if you don’t have a central install for all your apps also known as a shared\_install which is no longer the default then your current shotgun installed apps will be located inside the “install” folder.

go inside that folder, and double click on “tk-multi-launchapp”, inside there you will see a version folder (the current installed version), inside that folder you will see a “hooks” folder, go in there and you will see “before\_app\_launch” DONT EDIT THAT .py FILE!

so… thats where its located… but now you need to make a lot of decisions…I strongly suggest you start reading:  
[Administrating Hooks](https://support.shotgunsoftware.com/hc/en-us/articles/219033178-Administering-Toolkit#App%20level%20hooks)

[tk-multi-launchapp](https://github.com/shotgunsoftware/tk-multi-launchapp/wiki/Documentation)

There are several embedded links on that page that also highlight hook editing, and managing your project configs.

The general goal is you will copy that before\_launch\_app hook into your project “@configRoot/configs/hooks/” under a “tk-multi-launchapp” that will need to be created, then inside “@configRoot/env/includes” you will see a “app\_launchers\_yml” inside there you can define the new location for your “before\_launch\_app” hook for each piece of software you want to set ENV variables for.

If you are using the new config\_default2 it looks like these hook locations are set inside “@configRoot/env/includes/settings” and then there will be a “.yml” called “tk-multi-launchapp.yml”

[ConfigDefault2](https://github.com/shotgunsoftware/tk-config-default2/tree/master/env/includes/settings)

Example from config\_default:  
app\_launchers\_yml:  
These are what the settings look like by default.  
launch\_maya:  
defer\_keyword: ‘’  
engine: tk-maya  
extra: {}  
hook\_app\_launch: default  
hook\_before\_app\_launch: default  
icon: ‘{target\_engine}/icon\_256.png’  
linux\_args: ‘’  
linux\_path: ‘@maya\_linux’  
location:  
version: v0.7.6  
type: app\_store  
name: tk-multi-launchapp  
mac\_args: ‘’  
mac\_path: ‘@maya\_mac’  
menu\_name: Launch Maya 2015  
versions:   
windows\_args: ‘’  
windows\_path: ‘@maya\_windows’

you want to change  
hook\_before\_app\_launch: default  
to:  
assuming you have put the new before\_launch\_app.py into “@configRoot/hooks/tk-multi-launchapp”  
“{config}/tk-multi-launchapp/before\_app\_launch.py”

Hope this helps… It’s a lot of information…anyone that has more info, feel free to add on :D;  
-Ross
