Skip to content

Instantly share code, notes, and snippets.

@atduskgreg
Last active December 14, 2015 14:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atduskgreg/5100799 to your computer and use it in GitHub Desktop.
Save atduskgreg/5100799 to your computer and use it in GitHub Desktop.
Make headless Processing work on Heroku!

I need to run the virtual frame server Xvfb on Heroku. We need this to fake a display on a server that doesn't have one, as the Java Applet class relies on a display.

To run an arbitrary binary on Heroku, the binary need to be compiled as a static linked binary, with all the dependencies bundled with the binary. This is because we can't just run apt-get on Heroku, like on any other normal server.

I've tried to compile as a static binary via Vulcan (https://github.com/heroku/vulcan), but the binary still ends up as a dynamic linked binary that relies on dependencies installed on the OS.

I've tried to compile it on a local Linux like explained here: http://bindle.me/blog/index.php/405/running-binaries-on-heroku But it still ends up as a dynamic linked binary.

This is my question on Stackoverflow: http://stackoverflow.com/questions/14845291/compile-static-linked-binary-of-xvfb

I'd be open to other suggestions, like using another fake display server, or use a fake implementation of Java AWT (which I've stumbled upon a few times). Whatever gets Processing to think there's a display on a server that doesn't have it.

This is the app I want to make work: https://github.com/runemadsen/processing-sinatra

If you install virtual box and vagrant, you can see it working on a local Linux.

Copy link

ghost commented Aug 26, 2014

Whatever happened to headless processing on Heroku?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment