3

I'm currently running my Hardkernel ODROID U2 with the ODUINO One (Arduino Uno R3 & additions) in a headless setup and connect to the ODROID U2 via SSH over LAN. It is running Debian 7.1 armhf and got all major libraries that are needed to compile software, but no X-Server is installed.

When I try to start the Arduino work environment via the console command arduino, it spits out a Java exception telling me that I don't have an X-Display.

How would I headlessly compile and upload Arduino programs if not through the arduino command?

  • how annoying! does your jre have a headless version? hav you tried X forwarding over ssh? If those don't work my answer unix.stackexchange.com/questions/63216/… will provide a way to run a xserver on a headless box. – hildred Dec 24 '13 at 22:42
3

Some Java libraries require an X server as part of their initialization code, whether the program ends up using it or not.

If you need an X server just for the sake of having one, you can use Xvfb, which is X server with a virtual framebuffer, i.e. an X server that displays only in memory and doesn't connect to any hardware.

Xvfb :1 -screen 0 1x1x8 &

You need to wait a little after starting Xvfb for the display to be available. In a script, you can tell the X server to start some program when it's ready.

mkfifo ready
xinit /bin/sh -c 'echo >ready; exec sleep 99999999' -- /usr/bin/Xvfb :1 -screen 0 1x1x8 &
read ready
export DISPLAY=:1
…
|improve this answer|||||
0

The Arduino IDE is GUI only. It can not be ran from a command line alone. To begin with check out PlayGround. Basically you need to compile from a make file, as an alternative to the IDE's GUI. There are plenty of other resources out there on this.

|improve this answer|||||
0

http://robokitchen.tumblr.com/post/98340595745/arduino-continuous-integration contains a section called "Arduino IDE headless" which describes what you are trying to achieve but on Ubuntu server 14.04 LTS.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.