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:

  1. sudo trick-dre & does not give me the error but no GUI appears.

  2. unset DISPLAY gives me error Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError upon executing trick-dre

  3. 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.

  4. I ensured that my windows firewall is allowing Xming. It is.

  5. Restarting WSL & restarting Xming.

  6. 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.

  7. I tried xhost + but it gives me xhost: unable to open display "0.0"

  8. Setting the DISPLAY to localhost:0 produces the same error as solution 6.

  9. I also ensured that Xming is running.

  10. 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.

1

There are 1 answers

2
Jacky Cheng On

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.