Cannot run processing-java from bashfile; but works directly from terminal

Hi all!
I want to run a processing sketch on startup of my raspberry pi.
therefore I added this line to /home/esc/.config/lxsession/LXDE-pi/autorun:

sudo /home/esc/Applications/processing-4.1.2/processing-java --sketch=/home/esc/Applications/sketchbook/elisas_synchronotron --run

this does not work - same when running the same line from a bashfile

#!/usr/bin/env bash
sudo /home/esc/Applications/processing-4.1.2/processing-java --sketch=/home/esc/Applications/sketchbook/elisas_synchronotron --run

The error in both cases is:

esc@raspberrypi:~ $ sudo /home/esc/Desktop/ 
No library found for controlP5
No library found for
No library found for
Libraries must be installed in a folder named 'libraries' inside the sketchbook folder (see the Preferences window).
mySketch.pde:0:0:0:0: The package “controlP5” does not exist. You might be missing a library.

If I type the same command directly into my terminal, the sketch starts as expected, the libraries are found:

esc@raspberrypi:~ $ sudo /home/esc/Applications/processing-4.1.2/processing-java --sketch=/home/esc/Applications/sketchbook/mySketch --run
......(var output from my sketch)

it works just A-ok! Why?
Also, if I start the GUI and press play it works as well.

My sketchfolder is set to /home/esc/Applications/sketchbook in the settings and my libraries are all in /home/esc/Applications/sketchbook/libraries installed with the GUI tool “manage libraries…”.

what am I missing?
I’m relatively new to linux&raspbian so i might just be something with folder read/write permissions, or with the sudo?


some infos about my setup:
processing 4.1.2
Raspbian GNU/Linux 11 (bullseye)
Raspberry Pi 3 Model B Rev 1.2

1 Like

Hi @fabianluscher, Welcome (late, sorry) to the forum. I can’t verify or not all that you say, but I have just done this. Followed the instructions here and downloaded the

For me the file path is /home/rdl/.config/lxsession/LXDE-pi/autostart

The contents of that file is 3 lines that came from the default, and one that I added:


In the Processing IDE I had already exported the sketch, and in the directory it builds is that file. Not quite sure what it is, it’s not the whole application, just some kind of shortcut. (It works, what I want, at a code club, is something on the screen that shows me the IP address of the Pi.)

Hope this helps.

1 Like

hi richardDL, thanks for the welcome.
Yes, my problem might be solved if i would export the application correctly as you have, and not start the processing gui with the sketch as argument. But i’ve had multiple problems with exporting my sketch as application from and to raspberry pi, so i’ve hoped to circumvent this by just starting the processing gui with the sketch parameter. I’m not aware of any downsides to this, apart from maybe small performance issues?

I “solved” this with the solution to my other question - owner/group owner of the tmp folder gets changed each time:

But i guess next test would be to export the application and see if the problem persists.