eraldino
Posts: 21
Joined: Fri Jul 25, 2014 4:45 pm

Run Processing Sketch without Startx

Sun Sep 07, 2014 2:38 am

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?

User avatar
scruss
Posts: 1863
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Run Processing Sketch without Startx

Sun Sep 07, 2014 4:11 am

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
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

gkreidl
Posts: 5759
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Run Processing Sketch without Startx

Sun Sep 07, 2014 7:31 am

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
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

eraldino
Posts: 21
Joined: Fri Jul 25, 2014 4:45 pm

Re: Run Processing Sketch without Startx

Sun Sep 07, 2014 8:07 am

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.

eraldino
Posts: 21
Joined: Fri Jul 25, 2014 4:45 pm

Re: Run Processing Sketch without Startx

Sun Sep 07, 2014 8:21 am

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?

gkreidl
Posts: 5759
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Run Processing Sketch without Startx

Sun Sep 07, 2014 10:00 am

eraldino wrote: I will try to do this. Can this be automatically started on boot up?
Yes, quite easily.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
scruss
Posts: 1863
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Run Processing Sketch without Startx

Sun Sep 07, 2014 3:16 pm

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.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

eraldino
Posts: 21
Joined: Fri Jul 25, 2014 4:45 pm

Re: Run Processing Sketch without Startx

Mon Sep 08, 2014 12:05 am

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?


Return to “Troubleshooting”