Starting from Terminal

Ask a question about the usage of QLC+ with the Mac OSX operating system
Post Reply
jlthla
Posts: 26
Joined: Sat Sep 15, 2018 2:20 am
Real Name: Jeffrey Talbot

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?
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

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.
User avatar
edogawa
Posts: 572
Joined: Thu May 07, 2015 10:34 am
Real Name: Edgar Aichinger

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 &
Post Reply