hi you're right, with this line /usr/local/bin/pd & $wmpid=$!
i've got the pid number of pd in the terminal i'll test how to deal with the variable....
many thanks nico
You can store the process id in a variable if you start a program asynchronously from a script. For example here is part of my ~/.xinitrc
# start window manager /usr/bin/fluxbox & $wmpid=$!
# launch programs here asynchronously
# wait for window manager to exit wait $wmpid
You could use pdsend to send the pid to pd after a short delay (enough time for Pd to start and load the patches that will receive the pid).