Q100412: How to create Nuke shortcuts with extra flags

Follow

SUMMARY

This article explains how to create Desktop shortcuts for launching Nuke with additional flags, such as --safe for safe mode.

MORE INFORMATION

When launching Nuke, it can be beneficial to use various command flags to provide additional functionality. These can vary from things such as safe mode, which disables all plug-ins and customizations for troubleshooting purposes, to launching in terminal mode, which allows you to enter Python commands without launching the GUI.

The full list of command flags and their use cases can be found in our Online Help here: Command Line Operations

The most common way to launch Nuke with addition flags is by opening a Terminal/Command Prompt window, and running the Nuke launch command with the flags applied. This method is great if you only need to do it occasionally, but if you regularly need to launch in terminal mode for example or launch with certain flags, then it can become a nuisance having to enter the same command every time.

Instead, you can create a Desktop shortcut that includes the relevant command with flags, and is accessible on your machine as a clickable icon.

METHOD

Select the operating systems below for steps to create a shortcut on the Desktop which launches Nuke 15.1v2 in safe mode. You can change the --safe flag for any combination of other command flags that you require when launching Nuke. 

Windows

1) Right-Click the Desktop and select New > Shortcut.

2) Enter the full path to the Nuke executable, with the --safe flag afterwards, as shown below:

3) Press Next.

4) Give the shortcut an appropriate name and press Finish.

5) When you double click the shortcut, Nuke 15.1v2 should open in safe mode.

macOS

1) Open a text editor and create a new empty file.

2) Add the following code into the empty file. The second line consists of the full path to the Nuke application, with the --safe flag appended:

#!/bin/bash
/Applications/Nuke15.1v2/Nuke15.1v2.app/Contents/MacOS/Nuke15.1 --safe

3) Save the file to your Desktop with an appropriate name, for example "Nuke 15.1v2 Safe Mode.app". If you save the file with no file extension, then Nuke will open with a Terminal window. If you save the file with a .app extension, then Nuke will open without a Terminal window.

4) Open a new Terminal window, and change directory to your Desktop, using the command:
cd ~/Desktop

5) Run the following command in the Terminal window, changing "Nuke 15.1v2 Safe Mode.app" for the name of your shortcut:

chmod 744 "Nuke 15.1v2 Safe Mode.app"

6) When you double click the shortcut, Nuke 15.1v2 should open in safe mode.

Linux - CentOS 7

1) Open a text editor and create a new empty file.

2) Add the following code into the empty file. Line 4 consists of the full path to Nuke 15.1v2, with the --safe flag added:

[Desktop Entry]
Name=Nuke 15.1v2 Safe Mode
Comment=
Exec="/usr/local/Nuke15.1v2/Nuke15.1" -b --safe %f
Terminal=false
MimeType=application/x-nuke;
Icon=/usr/local/Nuke15.1v2/plugins/icons/NukeApp48.png
Type=Application
Categories=Graphics;2DGraphics;RasterGraphics;FLTK;

3) Save the file with an appropriate name, for example, "Nuke 15.1v2 Safe Mode.desktop" to the /usr/share/applications directory. This will create a shortcut that can be found in the Search bar of the OS.

You may also wish to copy this file to your Desktop, or other convenient location, as it can be used to launch Nuke from there as well.

4) When you double click the "Nuke 15.1v2 Safe Mode.desktop" file, or find it through the Search bar of the OS, Nuke should now launch in safe mode.

More information about creating shortcuts for Linux can be found in the following article:
Q100521: Creating a desktop shortcut on Linux operating systems

 

FURTHER READING

Additional information and example flags you could apply to your Nuke shortcut can be found in the articles linked below:

Q100038: Launching Nuke/NukeX/NukeStudio/Hiero in safe mode
Q100112: Launching Nuke in verbose mode and isolating potential customisations causing issues
Q100117: Launching Nuke with limited number of threads (-m flag)
Q100225: Launching Nuke in Performance Profiling mode (-P flag)
Q100378: How to disable the Frame Server for Nuke, Nuke Studio and Hiero

EXAMPLE FILES

We're sorry to hear that

Please tell us why