nbdd0121 / wsld

WSL Daemon - Stable X11 connection and time synchronisation for WSL2
Apache License 2.0
298 stars 24 forks source link

Connection refused while initiating application #23

Open ihtiuh opened 2 years ago

ihtiuh commented 2 years ago

Hi @nbdd0121, I am having issues with running Terminator GUI via WSL2 Ubuntu.

Here is my setup:

  1. Start VcXSrv on windows host with vcxsrv.exe :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto
  2. Start the wsldhost --daemon with in Windows CMD as admin, and verified that it is running on the port 6000
  3. Inside WSL via windows CMD export DISPLAY=:0 and start wsld process in background.
  4. But I can't get any response for xset q, it just waits.
  5. And also when initiating the application I get the following error:
    C:\>wsl.exe bash -c "DISPLAY=:0 terminator"
    Unable to init server: Could not connect: Connection refused
    Unable to init server: Could not connect: Connection refused
    You need to run terminator in an X environment. Make sure $DISPLAY is properly set

I can see the correct PID in /tmp/.X0-lock for the wsld process I started. And the /tmp/.X11-unix/X0 also have correct permissions(777):

Thanks!

nbdd0121 commented 1 year ago

I have no immediate clue of what's wrong there. Maybe try deleting files in /tmp and try again as WSL doesn't clean up the temporary files automatically.