Skip to content

Arduino requires X11 DISPLAY where none should be needed #5131

Closed
@dagwieers

Description

@dagwieers

If you use Arduino from the command-line, it complains about requiring an X11 DISPLAY:

$ arduino --pref boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json --save-prefs
Picked up JAVA_TOOL_OPTIONS: 
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:117)
    at processing.app.Base.<clinit>(Base.java:91)

This forces people to implement ugly work-arounds using Xvfb in order to accomodate Arduino IDE: https://github.com/timelab/ADEM/blob/master/.travis.yml#L5

  # Ensure we have a DISPLAY for the Arduino IDE
  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
  - sleep 3
  - export DISPLAY=:1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions