Skip to content

Arduino requires X11 DISPLAY where none should be needed #5131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dagwieers opened this issue Jul 13, 2016 · 2 comments · Fixed by #5132
Closed

Arduino requires X11 DISPLAY where none should be needed #5131

dagwieers opened this issue Jul 13, 2016 · 2 comments · Fixed by #5132
Labels
Component: IDE The Arduino IDE Type: Duplicate Another item already exists for this topic

Comments

@dagwieers
Copy link
Contributor

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
@dagwieers dagwieers changed the title Arduino requires X11 DISPLAY where no should be needed Arduino requires X11 DISPLAY where none should be needed Jul 13, 2016
dagwieers added a commit to dagwieers/Arduino-1 that referenced this issue Jul 14, 2016
Settings preferences does not need a splash-screen. Avoid needing an X11 DISPLAY in this case so CI solutions do not bail out (e.g. Travis).
More information in arduino#5131.

This fixes arduino#5131.
@dagwieers
Copy link
Contributor Author

Duplicate of #1981

dagwieers added a commit to dagwieers/Arduino-1 that referenced this issue Jul 15, 2016
This ensures now splash-screen is shown when preferences are changed or CLI-mode is used.

More information in arduino#5131.

However this does NOT fix arduino#5131, since the Arduino IDE in CLI-mode still requires X11 (according to arduino#1981).
@sandeepmistry sandeepmistry added the Component: IDE The Arduino IDE label Jul 18, 2016
@facchinm
Copy link
Member

Indeed, closing as duplicate of #1981 (however, the related PR is really good 😄 )

@per1234 per1234 added the Type: Duplicate Another item already exists for this topic label Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants