Reputation: 39
I am going through the tutorial found here to build a test simulation. I am using WSL so therefore I am using XMing for my GUI. When I run trick-dre
I get this error:
Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using '0.0' as the value of the DISPLAY variable.
My desired result is upon running trick-dre &
that the GUI opens. This is the page of the tutorial I am currently on.
Solutions I have tried:
sudo trick-dre &
does not give me the error but no GUI appears.
unset DISPLAY
gives me error Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
upon executing trick-dre
I ran Xming with the -ac option: Xming -ac
, This opens up a physical window of Xming but it is blank, not then GUI expected.
I ensured that my windows firewall is allowing Xming. It is.
Restarting WSL & restarting Xming.
Setting DISPLAY
to my ip address rather than 0:0
or '0.0' this gives me Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using <ipaddress>:0 as the value of the DISPLAY variable.
I tried xhost +
but it gives me
xhost: unable to open display "0.0"
Setting the DISPLAY
to localhost:0
produces the same error as solution 6.
I also ensured that Xming is running.
I am not using a remote host, only a local environment so it is my belief that ssh forwarding is not needed.
Note: Obviously I cannot enter headless mode because I need the GUI. These solutions are the culmination of a dozen or so relevant solutions to similar problems I found on other threads.
Upvotes: 0
Views: 1303
Reputation: 1556
your solution 6 description implies you use the command "export DISPLAY=0:0"?
Have you tried "export DISPLAY=:0.0" instead? I think :0.0 is the standard way to enable UI display.
If you need to su to other user, make sure you execute "xhost +" as the login user before you su.
Upvotes: 0