title: Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException when running arduino on bash (via Windows subsystem of Linux)
body: <p>I've been running WSL for a short time now, and I've been trying to compile and upload Arduino scripts via this console.</p>
  
  <p>I installed arduino by running <code>sudo apt install arduino</code> but from there whenever I run any arduino command (even simply <code>arduino</code>) I get the following exception</p>
  
  <p>I've tried installing the Linux Arduino IDE via this command line but had no effect. My assumption is this is a problem originating for WSL and arduino not being designed for that environment</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:
  No X11 DISPLAY variable was set, but this program performed an operation which requires it.
      at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
      at java.awt.Window.&lt;init&gt;(Window.java:536)
      at java.awt.Frame.&lt;init&gt;(Frame.java:420)
      at java.awt.Frame.&lt;init&gt;(Frame.java:385)
      at javax.swing.JFrame.&lt;init&gt;(JFrame.java:189)
      at arduinopc.&lt;init&gt;(arduinopc.java:35)
      at arduinopc$3.run(arduinopc.java:85)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.awt.EventQueue$3.run(EventQueue.java:703)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
  Exception in thread "main" java.lang.ExceptionInInitializerError
      at processing.app.Preferences.setColor(Preferences.java:851)
      at processing.app.Preferences.init(Preferences.java:273)
      at processing.app.Base.main(Base.java:117)
  Caused by: java.awt.HeadlessException:
  No X11 DISPLAY variable was set, but this program performed an operation which requires it.
      at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:236)
      at processing.core.PApplet.&lt;clinit&gt;(Unknown Source)
      ... 3 more
  </code></pre>