Automate JACK startup

So, far… I 've been able to Amarok to run through jack via a xine plugin. I start jack with jackd -R -d alsa. Is there a way to automate jack that it automatically starts at login? I’ve been going to TTY1 and running it there so I don’t have to deal with an extra window that I don’t use while I"m working.

I’ve already tried to drop it in /etc/bash.bashrc.local and ~/.bashrc; but causes it to run everytime I open a new cli window or not let me login at all. I also tried it using an IF statement to see if the process was running and start it if it wasn’t.

Have you tried to add this script to the startup scripts in:
Personal Settings > Advanced > Autostart ?

Kewl… seems to work thus far…

Here’s me script if anybody’s lazy…


#! /bin/sh
LOG="$HOME/.logs/jackdautorun.log"
SERVICE='jackd'
CMD='jackd -R -d alsa'

if  -f $LOG ]
then
echo "file Verified >> $LOG
else
touch $LOG
echo "$LOG did not exist. So I made it. >> $LOG
fi

if ps -e | grep $SERVICE
then
echo "####################" >> $LOG
date >> $LOG
echo "$SERVICE already running " >> $LOG
echo "####################" >> $LOG
else
echo "####################" >> $LOG
date >> $LOG
echo "Starting JACK" >> $LOG
echo "####################" >> $LOG
nohup $CMD & >> $LOG
fi