Linux - Starting from script

Hello,
I have a script to start jackd, jack_mixer, and then Renoise. However, I then need to disconnect the Renoise audio output connection to system playback because I route the audio through the jack_mixer (if I don’t I get audio at maximum volume). When I start renoise from the script it “takes over” the terminal even though I have & at the end.

Here is a bit of the script

  
qjackctl &   
jack_mixer -c jmren &   
~/Apps/rns_2_8_1_reg_x86_64/renoise &   
jack_disconnect renoise:output_01_left system:playback_1   
jack_disconnect renoise:output_01_right system:playback_2   
  

The jack_disconnect lines don’t run.

Remove the & in front of the renoise line. This forks it to background, so the jack_disconnect lines do actually run, but immediately after renoise is started.

and run the scipt with ‘&’ at the end instead, if you dont want it to take over the terminal session. if you don’t want to see the output of the scipt, you can add ‘&> /dev/null’ to the end of the command, before the ‘&’ like so: ```
/path/to/your/renoise_startup_script &> /dev/null &

  
edit::  
  
ok I read you post again. you want to run the jack_disconnect commands while renoise is running right?  
  
I think they don't seem to work because they get run instantly after the renoise command, and renoise haven't had time to connect to jack yet, and so there's nothing to disconnect.  
  
simplest solution I can think of is to add 'sleep <seconds>' before the jack_disconnect commands. That simply makes the script wait number of seconds before continuing, giving renoise time to connect to jack before the script continues to disconnecting it.

So I added a sleep, but it still doesn’t run. When I start the other applications (qjackctl and jack_mixer) with the & command, they start and allow the other lines to be executed. The Renoise line spawns a whole bunch of lines starting with “Renoise LOG” and then sits on

  
Renoise LOG> Application: Init OK  
Renoise LOG> StartupWindow: Closing the window...  
Renoise LOG> Application: Enter MainLoop...  
  

Th ecode below never outputs the word “Hello”. So it looks like the $ command doesn’t work when running Renoise from the command line …

  
qjackctl &   
jack_mixer -c jmren &   
/home/cmatheson/Apps/rns_2_8_1_reg_x86_64/renoise &   
sleep 25 &  
echo "Hello"  
jack_disconnect renoise:output_01_left system:playback_1   
jack_disconnect renoise:output_01_right system:playback_2  
  

remove ‘&’ from the end of the sleep command. otherwise it gets forked in background and the script just continues instantly.

if you don’t want to see the renoise log, launch it with ‘/home/cmatheson/Apps/rns_2_8_1_reg_x86_64/renoise &> /dev/null &’ in the script.