Page 1 of 1

Run Processing Sketch without Startx

Posted: Sun Sep 07, 2014 2:38 am
by eraldino
Hello to everyone, I have processing on my Raspberry pi. I want to export the Sketch I made in Processing and make it run on my PI without the StartX environment.

What format should I export it in and How can I call the file from the command line without the StartX

I would also like to AutoStart the file sooner after I figure out how to open it in the command line.

Can you guys help me out?

ALSO: why is my processing sketch slow when I am playing it in Processing PDE environment?

Re: Run Processing Sketch without Startx

Posted: Sun Sep 07, 2014 4:11 am
by scruss
You can't, sorry. Processing requires X11 because it either runs under:
  • Java — in the case of “classic” Processing
  • A modern web browser - for Processing.js
Make sure you're running Oracle Java for the fastest Classic Processing. Haven't tried the new browser with Processing.js.

cheers,
 Stewart

Re: Run Processing Sketch without Startx

Posted: Sun Sep 07, 2014 7:31 am
by gkreidl
X can be used with any single program without starting the desktop using the xinit command and a simple script file. For a simple one window / one application environment, install matchbox-window-manager. Create a small script file in your home folder:

Code: Select all

#!/bin/sh
matchbox-window-manager &
yourapp
Make it executable and start you app with
xinit ./scriptname

Re: Run Processing Sketch without Startx

Posted: Sun Sep 07, 2014 8:07 am
by eraldino
I am running on Oracle Java but still its too damn slow to run a rotating matrix.

Try to run ControlP5Matrix on your raspberry pi and tell me if its slow or not.

Re: Run Processing Sketch without Startx

Posted: Sun Sep 07, 2014 8:21 am
by eraldino
gkreidl wrote:X can be used with any single program without starting the desktop using the xinit command and a simple script file. For a simple one window / one application environment, install matchbox-window-manager. Create a small script file in your home folder:

Code: Select all

#!/bin/sh
matchbox-window-manager &
yourapp
Make it executable and start you app with
xinit ./scriptname
I will try to do this. Can this be automatically started on boot up?

Re: Run Processing Sketch without Startx

Posted: Sun Sep 07, 2014 10:00 am
by gkreidl
eraldino wrote: I will try to do this. Can this be automatically started on boot up?
Yes, quite easily.

Re: Run Processing Sketch without Startx

Posted: Sun Sep 07, 2014 3:16 pm
by scruss
eraldino wrote:I am running on Oracle Java but still its too damn slow to run a rotating matrix.
That's doing quite a lot of maths. Don't forget that the Raspberry Pi has roughly the same power as a 2009 iPhone 3GS …

Couldn't get it to run under Processing.js, though I didn't try very hard.

Re: Run Processing Sketch without Startx

Posted: Mon Sep 08, 2014 12:05 am
by eraldino
I exported a sketch in processing and run it in the terminal, after closing it I tried to run it again. Now I am getting an error that says java is not found

I tried java -version
and got:

bash: java: command not found

how can i fix this? they say its about a path thing but its very vague all the java files are gone in my processing folder too.

Whats happening to my java-oracle?

Re: Run Processing Sketch without Startx

Posted: Tue Sep 09, 2014 2:14 pm
by eraldino
bump