Hi Mark,
mark edward grimm wrote:
I took a look at this thread: http://lists.puredata.info/pipermail/pd-list/2004-10/022984.html
and gave it a whirl with no luck on ubuntu... it seems like there should be an easier way to do this.
I took a bunch of notes from various sources on this. Almost all are from posts on the PD list, however I don't have the authors names attached anymore. Apologies to the original posters!
But anyway, you should be able to find a solution somewhere in these suggestions! It largely depends on whether or not you are running X (which I imagine on a server you are not!)
best, d.
to autostart on linux
put a symlink in your rc3.d (or with whatever runlevel you boot by default, this is set in /etc/inittab)
called S19pd_start (any number, but be sure, all other important processes are started before/lower numbers...) to a script named pd_start
linux then calls this script with the argument "start" when booting. the script "pd_start" looks like:
################################# beginning of script #############################
#! /bin/sh
# Check for missing binaries (stale symlinks should not happen) PD_BIN=/usr/local/pd/bin/pd test -x $PD_BIN || exit 5
case "$1" in
start)
echo -n "Starting PD"
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
/usr/local/pd/bin/pd -nogui -noadc -audiobuf 20 -r 22050
-lib /usr/local/lib/pd/pdp/pdp
-lib /usr/local/lib/pd/externs/zexy
-path /home/marius
-path /usr/local/lib/pd/pdp
-path /usr/local/lib/pd/externs/zexy
/home/marius/application.pd &
;;
## mind the &!!!
stop)
echo -n "Shutting down FOO "
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
kill 'cat /var/run/pd.pid'
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
################################## end of script #######################
-- /etc/rc.d/rc.local: #!/bin/sh echo -n "starting pd..." PATH=/sbin:/bin:/usr/sbin:/usr/bin /usr/local/bin/pd_start