Hey, I need some help with making Linux start a pd patch on boot/login. And qjack and Yosemite soft synth. I use Ubuntu studio 18.04. Should not be too hard, right?
-
Linux auto start pd patch on login/boot
-
On the Pi I edit the crontab by typing:
crontab -e
and at the end of the file (I use nano to edit it), I add the following line:
@reboot sleep 20 ; sh /path/to/script/that/launches/all/software/script.sh
On my Ubuntu Studio (19.10) though I couldn't edit crontab for some reason. Didn't look into it at all though.
-
@cfry For Linux I only have a Pi and have always used a (dot)desktop files to do that because having the desktop already up and running can be important for some programs..
See the "Graphical" chapter here........ https://developer.toradex.com/knowledge-base/how-to-autorun-application-at-the-start-up-in-linux#LXSession_Autostart_File
For my Pi the file looks like this.... (starting X11VNC in this case)
Not appropriate though if you are not running a desktop, but there are other methods in that link.
This one runs a script..... the script then sends me an email to tell me there has been a boot....
ReebootMessage.desktop[Desktop Entry] Type=Application Name=RebootMessage Exec=/home/pi/bin/newstart.sh Icon=system-run StartupNotify=true Terminal=false Hidden=false
David
-
Hi, thanks for replying, looking into this now.
Sorry, I can not paste or save anything into the autostart folder. Access denied. What is the procedure?
I can already foresee that I may be able to start Pd but not a specific patch. Can you please tell/show me how to do what?
Thanks a lot
-
@cfry It could be a bit different for you.
I go into my headless Pi with Putty..... but if you have a screen then opening a terminal should be the same thing.
You need a text editor.
I use nano, and that is probably "built-in" to your system.
So then in terminal cd to the autostart directory and.......Inpi@raspberrypi3:~ $ cd .config pi@raspberrypi3:~/.config $ cd autostart pi@raspberrypi3:~/.config/autostart $ sudo nano new.desktop
where "new" is the name you want.
Type your stuff into nano and then press Ctrl-O to write the file and then Ctrl-X to exit nano. -
Ok! I managed to autostart my pd patch and jack.
Trying to autostart the bundled Yoshimi soft synth it does not recognize saved patches... Do you think it is possible to autoload a patch with it?
And Jack... I need to make some persistent patching. Do you know how to do it?
In the end I think I should do the synthesis inside Pd, but it is good to be able to auto start several apps and make them work with each other.
-
@cfry To open a Pd patch add...... -open <file.pd> ...... (no left and right arrowsI think) as a command line switch for the command that starts Pd in the .desktop file. You might need the full path.... or not.
Other switches can set audio parameters etc...... https://puredata.info/docs/faq/commandline
For the synth and Jack I think you will need to look at their doc.
E.G. https://manpages.debian.org/jessie/yoshimi/yoshimi.1
I would expect Jack to have startup command line switches as well.
David. -
Thanks fo the info, it works perfect now! Except that Yoshimi synth, but it was kind of expected. It has interesting sounds it is too windows 95 for me. Its a shame. Autoload works fine though. Flags rock