Skip to main content

Running CLI Applications - Mac

This page will help you to understand how to run a CLI application from SKAARHOJ Innovation Lab.Lab on Mac. CLI means "command line interface" and it's the kind of geeky programs that need to get started from a black window with white text... sigh. The world is unfair, I know. But help is here. 

The example below is based on the popular Raw Panel emulator called "Raw Panel Dummies" (it emulates any SKAARHOJ panel so you can easily and freely get started on integrating support in your hardware or software applications). The principles will however be the same for any CLI application from SKAARHOJ, you just need to change the filenames.

MacSteps

  1. Download the relevant application.
    For example, raw-panel-dummies is downloaded from from https://github.com/SKAARHOJ/raw-panel-dummies-releases/releases. For Mac, look for files that says "darwin" or "mac" in the filename, eg. "raw-panel-dummies_1.0.0_darwin_amd64" for Intel Macs or "_arm64" for M1 macs

    image.png

    At other times, they may be distributed in a zip-file that you need to unzip first.

  2. Open the download folder in Terminal
    In Finder, right click the download folder, select "Services", select "New Terminal at Folder".

    image.png


    If you can't see you Downloads folder in this way, right click the Downloads folder in finder and select "Show in Enclosing Folder"

    image.png

  3. Set "execute" permissions

    In the Terminal window that opened, type in 

    chmod +x [filename of downloaded file]

    and Enter. This will set permissions to run the application.

    image.png

  4. Run it first time and manage security settings
    Now, try to run the application like this:
    ./[filename]

    Security will kick in some way: When prompted, press OK, then go to Settings > Security & Privacy and press "Allow Anyway"

    image.png
    This may take a little forth and back. If the "Allow Anyway" button is not there, try to run it again, try to close and reopen the Settings window etc.

  5. Run it again until it is accepted

    Try to run the application again. It may ask a security related question once more. Just press "Open", "OK" or "Yes" and try once more.

    image.png


    Eventually, you should see something like this:

    image.png

    Usually, if you study the text here, it will tell you clues to what do to, like run the application with "-h" to get some help for options.

  6. Run it with options

    You are now ready to run it for real, so type in 

    ./raw-panel-dummies_1.0.0_darwin_arm64 -panel PTZFLY

    and Enter. This will emulate a PTZ Fly panel.


    Try other options, especially "-h" of "-list" 


  7. UI - yes!
    Many applications will have a sort of UI, it will open automatically in a web browser

    image.png


Every application will be different. For Raw Panel Dummies that emulates a panel, here is an example of how to use the application:  You can now connect with Telnet (or "nc") to the panel on port 9923 of your computer. Notice, the emulator runs Raw Panel in server mode. Type in "list" + Enter to identify as an ASCII client and try to press a button on the PTZ Fly emulated panel in the browser - you should see something like this:

image.png

Let us know if you are still in trouble. Reach SKAARHOJ Innovation Lab on innovationlab@skaarhoj.com or try to contact SKAARHOJs support team on support@skaarhoj.com