How to launch headless on Mac OS?

Hi everybody, was trying to launch the system headless on Mac OS, but I’m not sure how to do it. I tried many different way but I’m sorry I don’t understand the documentation.

Can someone explain me a bit more step by step how to do it ? (NB : I understand how to handle the options flags and I’m proficient with terminal and command line).

The first roadblock I encountered was
command not found: open-stage-control

Did I miss something during the install process ?

Thx in advance for your help !

1 Like

You may be the first to launch it from a terminal on Mac ! 3 possible solutions (I’m not sure which one should go in the docs)

# just guessing paths here, adjustment may be needed
sudo ln -s /Applications/open-stage-control.app/Contents/open-stage-control /usr/bin/open-stage-control
  • according to this thread, something like this should work out of the box too
open open-stage-control.app --args [options]
1 Like

is there any advantaged to launch it from the terminal ?

You can start and configure the server without using the launcher.

1 Like

Thanks for your quick answer as usual.
Happy to be the first at something once in my life ^^ !


Here are my learnings so you can edit the documentation if you need to :

  1. Create a symlink but be ware of two things
  • After El Capitan /usr/bin is not available for edits even to root user (more infos @stack overflow)
  • For the MacOS build of OpenStageControl the path is /Applications/open-stage-control.app/Contents/MacOS/open-stage-control
  1. Restart your terminal app so the symlink is effective

  2. Then you can launch with flags like this open-stage-control --no-gui for example


I also tested the third option but it won’t launch the app in headless mode. Using open on is the same as double clicking on the app to launch it.

Thanks for your feedback ! Just to be sure, did you try the third options like this example ?

open open-stage-control.app --args --no-gui

Just tried and it worked as expected. So it works too.
Sorry for the mistake. Thus, the last sentence of my previous post is inaccurate.
Thanks for pointing it out :pray:t2:
The only difference with the other method, is that you got the app icon in the Dock.

Thanks for your feedback, I’ll document option 3 then since it doesn’t require any system modification.

Option 3 doesn't start the O-S-C server in headless mode, unfortunately.

About option 2

Symlink vs Alias

I didn't know how to make a symlink file, so I chose to make an alias file instead. Actually, the latter is better because it will still work when the original file is moved.


[App alias] vs [Unix executable alias]

I didn't know what file to use when making the alias, so I tried with both.


Result

After moving the aliases (symlinks) to /usr/bin/ (to PATH), I've tried opening O-S-C in headless mode using the terminal, but got these errors:

aaa:~ alin$ open-stage-control-unixE
-bash: /usr/bin/open-stage-control-unixE: cannot execute binary file

aaa:~ alin$ open-stage-control-app
-bash: /usr/bin/open-stage-control-app: cannot execute binary file

This worked for me:

sudo ln -s /Applications/open-stage-control.app/Contents/MacOS/open-stage-control /usr/bin/open-stage-control


But I get these erors in Terminal:

aaa:~ alin$ pwd
/Users/alin

aaa:~ alin$ sudo ln -s /Applications/open-stage-control.app/Contents/MacOS/open-stage-control /usr/bin/open-stage-control
Password:

aaa:~ alin$ open-stage-control

[0104/225928.156225:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.157004:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5

[0104/225928.216792:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.217585:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5

[0104/225928.265511:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[0104/225928.283461:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app

[6315:0104/225928.284166:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5
[6315:0104/225928.289671:ERROR:network_service_instance_impl.cc(333)] Network service crashed, restarting service.

[0104/225928.346825:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.347879:ERROR:network_service_instance_impl.cc(333)] Network service crashed, restarting service.

[0104/225928.350020:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.353060:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5

[0104/225928.400085:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.403335:ERROR:network_service_instance_impl.cc(333)] Network service crashed, restarting service.

[0104/225928.406282:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.409074:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5

[0104/225928.461455:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.464820:ERROR:network_service_instance_impl.cc(333)] Network service crashed, restarting service.

[0104/225928.471286:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.476860:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5

[0104/225928.538877:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.543253:ERROR:network_service_instance_impl.cc(333)] Network service crashed, restarting service.

[0104/225928.557024:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.561140:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5

[0104/225928.620095:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.624264:ERROR:network_service_instance_impl.cc(333)] Network service crashed, restarting service.

[0104/225928.637328:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.640678:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5

[0104/225928.690434:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.694148:ERROR:network_service_instance_impl.cc(333)] Network service crashed, restarting service.

[0104/225928.710924:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[6315:0104/225928.714476:ERROR:gpu_process_host.cc(957)] GPU process exited unexpectedly: exit_code=5

[6315:0104/225928.714511:FATAL:gpu_data_manager_impl_private.cc(417)] GPU process isn't usable. Goodbye.

Trace/BPT trap: 5

aaa:~ alin$ [0104/225928.753459:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
aaa:~ alin$

Hmmmm....

Are you running it in over a ssh session ? See this page to run in a headless environnement.

1 Like

No, I am not running O-S-C over a ssh session. According to this, if I did, I would get in the Terminal: Remote Login: On ...


I've tried the node release and also got errors. :cry:

aaa:~ alin$  node -v
v16.1.0

aaa:~ alin$ node /Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js 
/Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js:10182

window.IP = window.IP || ''
^

ReferenceError: window is not defined
    at Object.74.../../package.json (/Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js:10182:1)
    at o (/Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js:78:265)
    at /Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js:78:316
   
    at Object.81.../client/events/event-emitter (/Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js:10429:1)
    at o (/Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js:78:265)
    at r (/Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js:78:431)
    
    at Object.<anonymous> (/Users/alin/Downloads/open-stage-control-1.13.2-node/launcher/open-stage-control-launcher.js:78:460)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)

aaa:~ alin$

Launching with node requires passing the path to the o-s-c-node folder (/Users/alin/Downloads/open-stage-control-1.13.2-node in your case), not any folder inside it.

Regarding the GPU error, I guess it's something to do with how mac handles symlinks and permissions but I don't know how to solve it.

1 Like

Hooray! It worked!

(proof)
aaa:~ alin$ node /Users/alin/Downloads/open-stage-control-1.13.2-node 

(INFO) Headless mode (--no-gui) enabled automatically (running with node)

(INFO) Server started, app available at 
    http://127.0.0.1:8080
    http://192.168.43.2:8080

@theodor_the_1st

just a little question what syntax do you use to get paragraph with an arrow to develop it on this forum ?

Select the text you want to put inside, then click the gear icon and select "hide details". To automatically format the text in one way or another, add three grave accents (`) above and below the text. After the first three accents, add a space and write the name of a language. I've used c++ formatting.

Thanks. The grave accents are often called backticks but "accents graves" in French. :grinning:

1 Like