# Headerless running of multiple sketches

**URL:** <https://discourse.processing.org/t/headerless-running-of-multiple-sketches/8867>\
**Category:** Processing for Pi\
**Created:** [March 2, 2019, 9:24pm UTC](https://discourse.processing.org/t/headerless-running-of-multiple-sketches/8867 "2019-03-02T21:24:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SonicAstronomer](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SonicAstronomer](https://discourse.processing.org/u/SonicAstronomer)\
**Post date:** [March 2, 2019, 9:24pm UTC](https://discourse.processing.org/t/headerless-running-of-multiple-sketches/8867/1 "2019-03-02T21:24:48Z")

</div>

Greetings

I have been looking into Processing and it looks like it is very simple to do basic programming.

I can see that Processing is very similar to Arduino in that it has a setup and draw. Processing seems like it mainly geared at graphical projects. I am interested in running sketches on a headerless Raspberry Pi 0 running Stretch Lite, which does not have the GUI or keyboard / display at all. Although you can SSH into it, I do’t want to be having to type into a terminal at all if I don’t need to.  
Also, I want it to be similar to the Arduino in that I can develop it on my laptop and then upload sketch the same way you would do with Arduino, except, I want to be able to have more than one Pi. Also, I want to be able to update my sketches on Pi without having to stop previous one. Can anyone let me know what I would need to do in Processing to make this work?

Thanks

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 3, 2019, 1:38am UTC](https://discourse.processing.org/t/headerless-running-of-multiple-sketches/8867/2 "2019-03-03T01:38:03Z")

</div>

hi, using a similar editor  
( arduino IDE started from the processing IDE long time ago )  
to write sketches for arduino and processing

and having the same syntax JAVA // C++ style

might make it easy to use both,  
but that is it with the comparison,  
you do very different things with that 2 tools.

* * *

me using Raspberry PI 3B+ and a old windows PC  
and also using Processing and Arduino IDE on both

and working many years headless only with RPI

- SSH
- VNC

i might understand some of your questions,  
but

- i not use RPI ZERO
- i not use RASPBIAN LITE ( why you do that anyhow )

* * *

sorry:

> but processing without GUI not makes any sense to me

* * *

now for the headless SSH Terminal start of processing  
yes there is a command line thing

- i use “bitvise SSH client” for  
windows to RPI  
\< RPI IP \>  
“pi” “mypassword”  
and get a terminal window and a SFT window  

- and via the terminal i can try to start processing  
but it will fail to open a window

> pi@RPI3BP:~ processing-java --sketch=/home/pi/projects/Processing/sketchbook/KLL\_work\_RPI/grid\_rect\_auto --run Exception in thread "main" java.lang.ExceptionInInitializerError at processing.mode.java.runner.Runner.getSketchParams(Runner.java:478) at processing.mode.java.runner.Runner.launchVirtualMachine(Runner.java:209) at processing.mode.java.runner.Runner.launch(Runner.java:151) at processing.mode.java.Commander.\<init\>(Commander.java:283) at processing.mode.java.Commander.main(Commander.java:86) Caused by: java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:236) at processing.app.ui.Toolkit.\<clinit\>(Toolkit.java:94) ... 5 more pi@RPI3BP:~

while when i do same in a terminal window ( here via VNC )  
it works

 ![SNAG-0005](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0e6175e03e410871b0736f240282da229036b59c.jpeg)

* * *

one aspect of your remote working could also be:  
instead of writing code (text ) (on PC ) and copy it to RPI

you can edit the code via SSH terminal directly using like nano  
or run a windows program like  
notepad + +  
editing a file on the RPI directly  
( that would be perfect for you using RASPBIAN LITE via SSH )

 ![SNAG-0006](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/41ad43e98462bc845410a3d25cb87cd1c136dc12.jpeg)  
this is on win7 PC edit a processing file on a RPI3B+ via NP++  
NPPFTP mode ( plugin install ) using SFTP in profile  
 ![SNAG-0007](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/46c545a9d2e10757681772d6b83b507b87cac472.jpeg)

if you not use windows PC ( to the headless RPI’s )  
can ignore that.

---

<div class="post-metadata">

**Author:** ![SonicAstronomer](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SonicAstronomer](https://discourse.processing.org/u/SonicAstronomer)\
**Post date:** [March 3, 2019, 3:19am UTC](https://discourse.processing.org/t/headerless-running-of-multiple-sketches/8867/3 "2019-03-03T03:19:28Z")

</div>

First, thanks for your prompt reply.
