Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2930

Issue connecting an WSL with an X server (XMing) to display graphics

$
0
0

I have WSL 2 downloaded on Windows 10 version 21H1 (OS Build 19043.985) and I am running Ubuntu version 18.04.5 LTS.

I'm not too familiar with the configuration that needs to happen to get WSL to work with the X server past blindly following tutorials. Currently, I have XMing downloaded and have been trying to get WSL to communicate with it.

I have tried setting the environment variable export DISPLAY=:0, but my terminal keeps complaining. Here is an example of an error I get when trying to run a GUI application:

Loaded from /home/greg/.memoranda/memoranda.propertiesException in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.        at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)        at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:102)        at java.base/java.security.AccessController.doPrivileged(Native Method)        at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:61)        at java.base/java.lang.Class.forName0(Native Method)        at java.base/java.lang.Class.forName(Class.java:315)        at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:101)        at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:83)        at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129)        at java.desktop/java.awt.Window.initGC(Window.java:487)        at java.desktop/java.awt.Window.init(Window.java:507)        at java.desktop/java.awt.Window.<init>(Window.java:549)        at java.desktop/java.awt.Frame.<init>(Frame.java:423)        at java.desktop/java.awt.Frame.<init>(Frame.java:388)        at java.desktop/javax.swing.JFrame.<init>(JFrame.java:180)        at main.java.memoranda.ui.App.showSplash(App.java:151)        at main.java.memoranda.ui.App.<init>(App.java:63)        at main.java.memoranda.Start.main(Start.java:63)

I've followed about 3 different tutorials and get one error or another and I'm not sure what I'm doing incorrectly. If any of you have any suggestions that would be much appreciated. Unfortunately, I'm not sure what all the relevant details are, but I'd be happy to provide more info on my specific issue.

Also if there is a better way to go about this all together I'm all ears.
I just want to be able to run graphical programs.


Viewing all articles
Browse latest Browse all 2930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>