<div dir="ltr">hi, <div><br></div><div>in my case, I put my scripts in /etc/init.d and then make them run on boot with update-rc.d or insserv</div><div>if I need to run them when plugin a USB device, I wrote a udev rules</div><div>and if I need networking, I put my script in /etc/networking/if-up.d</div><div>running a pd patch at startup that relies on network implies to check the network state inside Pd </div><div>running the patch through if-up.d and stoping it with if-down is more robust to my eyes</div><div><br></div><div>+<br>a</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">--<br>do it yourself                       <br><a href="http://antoine.villeret.free.fr" target="_blank">http://antoine.villeret.free.fr</a><br></div></div>
<br><div class="gmail_quote">2015-02-06 16:00 GMT+01:00 Simon Wise <span dir="ltr"><<a href="mailto:simonzwise@gmail.com" target="_blank">simonzwise@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 06/02/15 23:58, Alexandros Drymonitis wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I put 'sudo -u pi -i /usr/local/bin/pd -nogui -open<br>
~/pd_patches/load_test.pd' in rc.local but again it didn't work...<br>
</blockquote>
<br></span>
~ means home folder ... but that file is in the home folder of pi, not of<br>
root (which is running this command) ... use:<br>
<br>
sudo -u pi -i /usr/local/bin/pd -nogui -open /home/pi/pd_patches/load_test.<u></u>pd<br>
<br>
in any case using explict full paths is a good idea in root scripts like rc.local.<br>
<br>
Iohannes answered the rest, I was a too terse! yes, to make it easy to work with several projects and Pis I keep all the project specific stuff in a folder I call /share/ ... then it is easy to swap between projects.<div class="HOEnZb"><div class="h5"><br>
<br>
simon<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</div></div></blockquote></div><br></div>