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. I have WSL 2 downloaded on windows 10 version 21H1 (OS Build 19043.985) and am running Ubuntu version 18.04.5 LTS. 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.(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.(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.(Window.java:549)at java.desktop/java.awt.Frame.(Frame.java:423)at java.desktop/java.awt.Frame.(Frame.java:388)at java.desktop/javax.swing.JFrame.(JFrame.java:180)at main.java.memoranda.ui.App.showSplash(App.java:151)at main.java.memoranda.ui.App.(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 Id be happy to provide more info on my specific issue. Also if there is a better way to go about this altogether I'm all ears. I just want to be able to run graphical programs.