I have a Pure Data patch that run before booting in the rc.local directory. The patch is starting nicely but my raspberry doesn't recognize my korg nanokontrol2.

But, when I start the script manually, which looks like this:

sleep 20;
pd-extended -nogui /home/pi/mypatch.pd &

It works perfectly.

As you see I already tried to let my raspi sleep before starting.

Any ideas?

  • rc.local DOES NOT "run before booting" but "at the end of each multiuser runlevel" i.e. effectively the last step before logging in - so you need to specify full paths for all files.
    – Milliways
    Commented Jan 10, 2017 at 4:39
  • Welcome - This is a Q&A site. The point is to ask a specific question so that other users can give you concise answers. Your question is pretty good and to the point allowing for good quality answers. Be kind and up vote people that take time to answer and look like good suggestions. Please read the FAQ too and hope to see you around. Have Fun
    – Piotr Kula
    Commented Jan 10, 2017 at 10:08

2 Answers 2


Put the full path to pd-extended in the command and use nohup to make it immune to hangups:

nohup /usr/local/bin/pd-extended -nogui /home/pi/mypatch.pd >> /dev/null 2>&1 &

You can also log all output to a file:

nohup /usr/local/bin/pd-extended -nogui /home/pi/mypatch.pd >> $LOG_FILE 2>&1 &

Does the Korg show up in the output of lsusb? USB midi has been working fairly well on the Raspberry Pi for a few years now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.