Page 1 of 1

better execution of custom commands on nodes

Posted: Tue Mar 19, 2019 12:49 am
by brother john
Hey all!

There are 2 ways I can see of sending a command to a node...

1. Renders tab, RMB, "Administrate" - "Launch Command". This is fantastic! No password and very easy, except you have to type or copy in one of the commands each time.
2. Using plink in custom commands in the config.json. This is how I extensively use this now! It's great, but I have to enter in a password for every command for every node(not so great).
(Users are on Windows and our Blades are all Linux)

for eg:

Code: Select all

"af_rendercmds":[
				"q:/cgruWin222/utilities/plink.exe renderboy@@IP@ \"sh /mnt/q/cgruNode222/killOlderMaya2.sh\"",
Can I use the same "Launch Command" technique, in the af_rendercmds custom menu? Which would circumvent the need for plink, a new connection, and inputting user and password. (yes I know you can hardcode the password in as well as the user, but this would mean the password is exposed for everyone to read.)

For eg, how would I create an "af_rendercmds" entry that runs "sh /mnt/q/cgruNode2222/killOlderMaya2.sh" using the "Launch Command" technique instead of plink?

Or would I have to go into the c++ and include commands there?

The goal is a list of commands that I regularly use that I can click on, that I don't have to type the password in for.

Choice :)

Brother John

Re: better execution of custom commands on nodes

Posted: Tue Mar 19, 2019 10:49 am
by timurhai
Hi.
Yes, to extend this feature we should go into the c++ code.
We should add some "af_renderlaunchers" string array parameter in config (like "af_rendercmds").
And make afwatch to create a sub-menu items for launch on render.

btw,
"af_rendercmds" - are commands that run GUI (afwatch).
"Launch Command" - are commands that will run afrender, after afwatch asks to do it through afserver.
From this you permissions comes.
We can't just say that afwatch needs to ask passwords and afrender does not.
But usually to connect to remote host password is needed (when afwatch runs command that connects to client).
And afrender usually has more rights, especially to kill local processes w/o password, like in your case.

Re: better execution of custom commands on nodes

Posted: Wed Feb 26, 2020 4:04 pm
by timurhai
Hi!
It is implemented in code (GitHub master).
Will be in the next release.