Giter Site home page Giter Site logo

Headless mode about codeswarm HOT 11 OPEN

vtorosyan avatar vtorosyan commented on July 29, 2024
Headless mode

from codeswarm.

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
changed to an enhancement

Original comment by nawglan on 9 Aug 2008 at 1:16

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
code_swarm runs great on my own machine, but I've got a lot of visualizations 
I'd
like to make, and I'd like to offload the work onto a more powerful server.

Here's the error that I get when running it on a headless server:

>>    ~/code_swarm $ ant run
>>    Buildfile: build.xml
>>    
>>    init:
>>         [echo] Running INIT
>>    
>>    build:
>>         [echo] Running BUILD
>>    
>>    jar:
>>         [echo] Running JAR
>>    
>>    run:
>>         [echo] Running code_swarm
>>         [java] Exception in thread "main" 
java.lang.ExceptionInInitializerError
>>         [java] Caused by: java.awt.HeadlessException: 
>>         [java] No X11 DISPLAY variable was set, but this program performed an
operation which requires it.
>>         [java]   at
sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:199)
>>         [java]   at processing.core.PApplet.<clinit>(PApplet.java:202)
>>         [java] Java Result: 1


I tried adding -Djava.awt.headless=true to the java invocation in run.sh with 
the
same result.  

Original comment by [email protected] on 13 Aug 2008 at 1:38

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
This is a great feature that will make rendering those large projects less of a
headache. I don't know how coupled we are right now with the display. I'm 
reading
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/ right 
now to
see what we can do about it.

Original comment by [email protected] on 17 Aug 2008 at 1:10

  • Changed state: Accepted

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
Yeap I vote for this too.

Original comment by felipe.contreras on 30 Aug 2008 at 11:30

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
This feature would interest me as well.

Original comment by dlidstrom on 19 Sep 2008 at 11:07

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
Any success or news on that? I'd be definitely leaving these rendering tasks to 
a low
traffic server.

Original comment by [email protected] on 11 Jan 2009 at 2:40

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
Just my 2c, hopefully it can make some other person's research shorter than 
mine.

Rather than start monkeying around in the source code (or while I'm getting set 
for
it :P) I've managed to successfully get code_swarm in a headless-alike rendering
task, via Xvfb (a fake X11 for headless boxes):

sudo apt-get install xfvb
#At this stage check that you have xauth, xbase-clients, fixed fonts and such..
#if everytthing's fine running 'Xvfb :0 -screen 0 1024x768x16 &' shouldn't 
throw any 
# error.
# Then you could run code_swarm in ~headless mode with:
xvfb-run -n 0 -a -w 10 ./run.sh data/my_project.config &

Looking at some other Java projects that were originally conceived as applets 
and
were later tried as web services, I had the feeling that making all these
linux/Xwindow-specific details clear here is a good idea. Sorry if it looks 
offtopic
or something.

While my renders ends, I'd get my hands into the Processing thing and see 
what's the
problem with awt.headless.

Best regards.

Original comment by [email protected] on 12 Jan 2009 at 2:45

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
I vote for it too.
(sorry, long time not speaking here)

Original comment by [email protected] on 4 Mar 2009 at 4:47

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
I have also been reading up on this. The latest topic about "headless" mode and 
the 
Processing libraries is not promising (Reply #8 - Nov 10th, 2007 
http://processing.org/discourse/yabb2/YaBB.pl?num=1193317878). They are 
suggesting 
to incorporate PJA with Processing but it looks as though there has been no 
activity 
on this topic in a long time. Maybe there is another Java solution for writing 
graphics and we can phase out the Processing library alltogether? Perhaps PJA 
http://www.eteks.com/pja/en/ could replace it. I do not have a great knowledge 
of 
Processing so I can not comment any further.

Original comment by [email protected] on 19 Apr 2009 at 3:18

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
A headless version would be helpful for me too.

I got the command

xvfb-run -n 0 -a -w 10 ./run.sh data/my_project.config

to work for me but just thinking of all those wasted cycles rendering to a 
buffer
that is ignored. A proper headless version would be greatly appreciated.

Original comment by [email protected] on 4 Jun 2010 at 12:06

from codeswarm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 29, 2024
Adding to my earlier comment using xvfb causes the program to run really REALLY 
slow.
It's also only using one of the four cores that my processor has it's been 
running
for 70 hours and only produced 3890 frames (640x480). this should really be 
fixed in
the application itself. 

Original comment by [email protected] on 7 Jun 2010 at 11:47

from codeswarm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.