We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › A way to run processing server-side
Page Index Toggle Pages: 1
A way to run processing server-side? (Read 3117 times)
A way to run processing server-side?
Apr 26th, 2010, 12:07pm
 
I want processing to be run server-side (once per 15 min or something with crontab) on a linux server, so that it would generate a static image that would eventually be shown to the users of the website. Is this possible? Has anyone here done it?
Re: A way to run processing server-side?
Reply #1 - Apr 26th, 2010, 2:05pm
 
This have been asked a few times already in this forum...
Processing isn't really designed for headless run... There is a command line mode, but I am not sure if it is able not to spawn a new window.
Re: A way to run processing server-side?
Reply #2 - Apr 26th, 2010, 4:23pm
 
I figured it out... For those looking, here is a shell script i run to do it:
It's a terrible hack but it works.

Xvfb :2 &
export DISPLAY=":2"
./myapp
killall -9 Xvfb

(need to install Xvfb first & have X11 libs installed)
Re: A way to run processing server-side?
Reply #3 - Jun 2nd, 2010, 7:53am
 
hi there,

i would like to do the same thing.
how did you supply the command line params? i can't seem to find a list of command line params, i guess there should be one that accepts the script and then just plays it and quits processing when done.

thank you
Re: A way to run processing server-side?
Reply #4 - Jun 2nd, 2010, 9:11am
 
See Commander class reference.
Page Index Toggle Pages: 1