Custom command for launching software

General discussions and questions.
Post Reply
vfxgeek
Posts: 27
Joined: Sun Dec 12, 2021 1:34 pm

Custom command for launching software

Post by vfxgeek »

Hi,

I'm working on Ubuntu which is not set to English, and because of that one Nuke plugin has a problem with commas and dots, and in the result it's causing an error.
A workaround is to launch Nuke with: LC_NUMERIC="C" ./Nuke12.0

To launch NukeX I have created a shell script:

Code: Select all

#!
LC_NUMERIC="C" 
./Nuke12.2 --nukex
When I launch this from terminal the Nuke plugin works correctly. But when I launch Nuke from CGRU tray software list (which points to this .sh script) the plugin still causes the error. It seems like it's ignoring the locale change command.
Why can that be?

Lukas
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Custom command for launching software

Post by timurhai »

Hi! Try to trace a script running. For example echo something:

Code: Select all

#!/bin/bash
export LC_NUMERIC="C"
echo LC_NUMERIC set to $LC_NUMERIC
./Nuke12.2 --nukex
Also add "#!/bin/bash" and "export" keywords.

For testing better to launch terminal, go to cgru root folder, setup cgru and launch nuke command.

Code: Select all

cd /opt/cgru
source ./setup.sh
nuke
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
vfxgeek
Posts: 27
Joined: Sun Dec 12, 2021 1:34 pm

Re: Custom command for launching software

Post by vfxgeek »

I've launched Keeper from terminal, to see what it's doing when launching software.
Aparrently it's not executing the shell script which I've created and set as the executable for NukeX, but simply it's running "nuke --nukex"
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Custom command for launching software

Post by timurhai »

Hi! (sorry for a long delay)

If you want afanasy and keeper (cgru) to launch your own "nuke" command, you should add it to path.
But cgru on setup (in setup.sh) adds its own "nuke" and other commands in PATH.
So you should place a script in cgru root folder line cgru/setup_custom.sh, where you can:

Code: Select all

export PATH=/path/to_your/bins:$PATH
And setup.sh will source it:
https://github.com/CGRU/cgru/blob/master/setup.sh#L29

See https://github.com/CGRU/cgru/blob/maste ... _README.sh

Another way that prefer some companies, is not use any software setup and launch scripts from cgru.
CGRU software setup and launch scripts main role is to show you how to setup, what you need to that, what environment matters.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply