Page 1 of 1

Starting from Terminal

Posted: Mon Jul 05, 2021 8:32 pm
by jlthla
So I'm using QLC to run some outdoor lighting.... nothing fancy. I've got a Home Automation system that schedules all this for me and while its been working great, lately, QLC is crashing. I did track the problem down to this. When I open QLC from the Terminal App using the same shell script the HA system uses, it launches and does exactly what it is suspend to do. But as soon as I quit the Terminal, QLC quits as well. This is something new, and have no idea what might be different and causing QLC to quit.

This is what is in my shell script... it opens the app, then opens the file in Operate mode.
#!/bin/bash

/Applications/QLC+.app/Contents/MacOS/qlcplus -o /Users/kitchen/Documents/QLCDocs/2021-summer.qxw -p

Any suggestions?

Re: Starting from Terminal

Posted: Tue Jul 06, 2021 6:40 am
by mcallegari
This is a perfectly normal behaviour of a shell.
The shell itself is the parent of the process, so if you kill the parent, you implicitely kill also all the processes it started.
I think you should create a shortcut to the QLC+ binary and launch that.

Re: Starting from Terminal

Posted: Tue Jul 06, 2021 8:00 am
by edogawa
At least in linux there are ways to detach a process from the terminal/shell/parent it was started from, for example starting it like this:

Code: Select all

nohup <my_command> &
So, try to modify your script to:

Code: Select all

#!/bin/bash

nohup /Applications/QLC+.app/Contents/MacOS/qlcplus -o /Users/kitchen/Documents/QLCDocs/2021-summer.qxw -p &