Make Jack start when Cadence starts

Unofficial support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: MattKingUSA, khz

Post Reply
3x5
Established Member
Posts: 14
Joined: Sat Jan 09, 2016 6:53 am
Been thanked: 1 time

Make Jack start when Cadence starts

Post by 3x5 »

Hi, I'm actually running Ubuntu with a lowlatency kernel, but I have the KXStudio repos enabled.

Anyway, I would like Jack to start when Cadence starts. I see an option to start Jack on Login, but I don't want it to start when I log in -- only when I start Cadence.

The only reason I start Cadence is to start Jack, so it would be nice to just run one action.
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Make Jack start when Cadence starts

Post by Luc »

Does Ubuntu allow you to run programs from keyboard shortcuts? You can run this script:

Code: Select all

#!/bin/sh
jack_control status && jack_control stop || jack_control start;
_state = $(jack_control status);
_state = $(echo $_state | cut -d" " -f3);
if $_state == "started"
	cadence-aloop-daemon &
	sleep 2
fi
if $_state == "stopped"
	echo "do nothing"
fi
_state = "jack $_state";
osdctl -s "$_state";
Remove the last line if you don't have osdctl installed.

I didn't test the code. I ported it from fish to bash-like without thinking much about it.
3x5
Established Member
Posts: 14
Joined: Sat Jan 09, 2016 6:53 am
Been thanked: 1 time

Re: Make Jack start when Cadence starts

Post by 3x5 »

Thanks for the reply. I'm happy just running

Code: Select all

jack_control start & cadence
. Thanks for pointing me in the right direction.
Post Reply