News:

We really need your input in this questionnaire

Main Menu

Object Tools Config in a Mac

Started by tonyams, September 16, 2014, 09:11:50 PM

Previous topic - Next topic

tonyams

Hi:

How do you add commands to Object tools when using a Mac computer? I'm using the NetXMS console for Mac and would like to Remote Desktop, SSH or Telnet to certain nodes. I have seen examples on how to do this for Windows but would like some guidance as to how to do it in a Mac.

Thanks for your help in advance.


Alex Kirhenshtein

Hello.

It's slightly more complicated on Mac. Most of the times it's done like this "open -a RequiredTool.app --args %OBJECT_IP_ADDR%", however in some cases you'll need to write support scripts using applescript.

RDP:
Official client from Microsoft (Remote Desktop Connection.app) support single command line parameter – file name of the profile. Probably you can make a script, which generates profile based on %OBJECT_IP_ADDR% and then launch RDC.
CoRD, on the other hand works quite well with command line and handle "rdp://" protocol as well. For CoRD you can use this command line in tool configuration: "open rdp://%OBJECT_IP_ADDR%"

SSH, Telnet:
If you use standard command line ssh and telnet: "open -a Terminal --new --args ssh %OBJECT_IP_ADDR%" and "open -a Terminal --new --args telnet %OBJECT_IP_ADDR%"
For any 3rd party clients, you need to check respective documentation.

HTTP, etc: "open http://%OBJECT_IP_ADDR%"

tonyams

Thanks for replying, Alex.

CoRD is working perfectly but ssh and telnet don't seem to be resolving %OBJECT_IP_ADDR%. I'm just getting a new terminal window.

Tony Mezzana

Alex Kirhenshtein

I did a few tests on the Mac, and it seems that simplest ways to do it is this:echo ssh %OBJECT_IP_ADDR% > /tmp/nxcon.command; chmod +x /tmp/nxcon.command; open /tmp/nxcon.command