<div dir="ltr"><div><div><div><div>hey,<br><br></div>I&#39;ve tried Ivica suggestion, but it didn&#39;t work.<br><br></div>Jonathan strategy works good. What I do now, is to send a message <br><br>[echo &quot;env DISPLAY=:0 my-script.sh&quot; | at now(<br>

<br></div>This runs the whole script, and not only the pd patch, under the at daemon (as Jonhatan said previously), and this way I can kill the parent Pd instance. Works like a charm.<br><br></div>Thanks for your prompt responses!<br>

<div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div>--<br>Marco Donnarumma<br>New Media + Sonic Arts Practitioner, Performer, Teacher, Director.<br>Embodied Audio-Visual Interaction Research Team.<br>

Department of Computing, Goldsmiths University of London<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Portfolio: <a href="http://marcodonnarumma.com" target="_blank">http://marcodonnarumma.com</a><br>Research: <a href="http://res.marcodonnarumma.com" target="_blank">http://res.marcodonnarumma.com</a><br>

Director: <a href="http://www.liveperformersmeeting.net" target="_blank">http://www.liveperformersmeeting.net</a></div>
<br><br><div class="gmail_quote">On Sat, Apr 13, 2013 at 10:04 PM, Ivica Bukvic <span dir="ltr">&lt;<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<p dir="ltr">This is just a wild guess what two things coming to mind based on your description. First, you have to make sure that your shell script ends with &quot;exit 0&quot; command. Second, you can always try to simply kill the pd-gui process together with PD. The trick in this case will be finding out the right process ID because you don&#39;t want to kill both PD instances--this can be done again with a shell script before the second instance has been started.</p>



<p dir="ltr">HTH</p>
<div class="gmail_quote"><div><div class="h5">On Apr 13, 2013 11:40 AM, &quot;Marco Donnarumma&quot; &lt;<a href="mailto:devel@thesaddj.com" target="_blank">devel@thesaddj.com</a>&gt; wrote:<br type="attribution"></div></div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr"><div><div><div>Hi all,<br><br></div><div>I&#39;m having some troubles with two pd instances and [shell].<br><br></div><div>I launch a patch with the first Pd instance from the terminal. Here, i use [shell] to  create a new patch and open it with a second Pd instance.<br>




<br></div><div>when the new patch is loaded, it sends a [quit( message to [noquit] to the first pd-instance patch, via OSC, in order to kill it.<br><br></div><div>everything works fine until the first instance receive the OSC message. At this point, the pd process is killed but the GUI freezes on the screen, and the terminal freezes too.<br>




</div><div><br></div><div>If I launch the first Pd instance from the terminal with &#39;&amp;&#39;, and then run the script through<br></div><div> the same terminal, it works fine.<br></div><div><br></div><div>this below is the script. nothing fancy.<br>




<br></div><div>any idea why the process doesn&#39;t work? <br><br></div><div>thanksss!<br></div><div><br></div><div><br>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\<br>#!/bin/bash<br><br>NEWPATCH=$1<br>cp /usr/share/Xth-Sense/Xth-Sense.pd $HOME/Desktop/$NEWPATCH.pd;<br>




sleep 2;<br>pdextended -alsa $HOME/Desktop/$NEWPATCH.pd;<br>exit<br></div></div>\\\\\\\\\\\\\\\\\\<br><br></div><br><div><div><div><div><br><br clear="all"><div>--<br>Marco Donnarumma<br>New Media + Sonic Arts Practitioner, Performer, Teacher, Director.<br>




Embodied Audio-Visual Interaction Research Team.<br>Department of Computing, Goldsmiths University of London<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Portfolio: <a href="http://marcodonnarumma.com" target="_blank">http://marcodonnarumma.com</a><br>




Research: <a href="http://res.marcodonnarumma.com" target="_blank">http://res.marcodonnarumma.com</a><br>Director: <a href="http://www.liveperformersmeeting.net" target="_blank">http://www.liveperformersmeeting.net</a></div>





</div></div></div></div></div>
<br></div></div><div class="im">_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></div></blockquote></div>
</blockquote></div><br></div>