rncbc / qjackctl

QjackCtl - JACK Audio Connection Kit Qt GUI Interface
https://qjackctl.sourceforge.io
GNU General Public License v2.0
186 stars 42 forks source link

[jack dbus] post-startup script not executed when starting jack via qjackctl dbus command #166

Closed dkdjam closed 2 years ago

dkdjam commented 2 years ago

I have a script that starts and stops jack dbus via qjackctl:

#!/bin/bash

if [ -f ~/.jack_lock ]
then
    rm ~/.jack_lock
    dbus-send --system /org/rncbc/qjackctl org.rncbc.qjackctl.stop
    killall -9 qjackctl
    jack_control stop
    jack_control exit
    killall -9 hdspmixer
else
    touch ~/.jack_lock
    pgrep hdspmixer
    [ $? ] && hdspmixer&
    jack_control start
    qjackctl&
    dbus-send --system /org/rncbc/qjackctl org.rncbc.qjackctl.start
    a2j_control --ehw --start
fi

It works fine but I see that the post-startup script configured in qjackctl is not executed. I have to stop jack (in qjackctl GUI) and start it again. I would have expected the post-startup script to execute the 1st time. Unless I miss an option, I would be very grateful if you could fix this. Thanks!

PS: my post-startup scripts calls zita-a2j and connects some ports, i guess I could add it to the above but I prefer executing it from qjackctl due to its dependence on the %r %p %n params.

rncbc commented 2 years ago

you're starting the jack-server via jack_control start; qjackctl will not run the startup scripts because the jack-server is not started under its premises. simply as that.

dkdjam commented 2 years ago

Ah great! of course, this makes sense now that you mention it. So I removed all the dbus interfacing and activated the start jack option in the setup GUI. Now it works just as I want it. Thanks for the heads-up! we can close this.