Windows 10: Can't run lunix application GUI via WSL 2

Discus and support Can't run lunix application GUI via WSL 2 in Windows 10 Software and Apps to solve the problem; Dears.I hope you doing well and Thanks for you effort.I install Ubuntu via WSL 2 and it's work fine with line command but when want to run an... Discussion in 'Windows 10 Software and Apps' started by habib salhi, Oct 23, 2022.

  1. Can't run lunix application GUI via WSL 2


    Dears.I hope you doing well and Thanks for you effort.I install Ubuntu via WSL 2 and it's work fine with line command but when want to run an application i get the below message, i try all the solution that find in the internet but it's not work with me, i don't know if the problem with the hardware or software or the version of the Windows because i use WSL2 in another leptop with Windows 11 and it's work !!! root@Habib:~#virt-manager:125: Gtk-WARNING **: 07:06:10.715: cannot open display: localhost:0root@Habib:~#The version of the Windows used:Edition Windows 10 ProVersion 21H1Installed

    :)
     
    habib salhi, Oct 23, 2022
    #1

  2. WSL 2, GUI Applications using XServer

    I've seen this question before, but none of the solutions are working for me. I know the steps that are mentioned everywhere to get GUI applications working for WSL 2 on the Windows 10 Pro Insider Preview.

    1. Install XServer on your windows 10 machine (here I used VcXsrv)
    2. Run the XServer
    3. Install something in WSL 2 that you want to display (for me it was terminator)
    4. Run DISPLAY=:0 terminator -u to get it running.

    However, when I do number 4, I get:

    When I echo $DISPLAY it returns :0 as expected.

    When I try to open something simple like xclock I get Error: Can't open display: :0

    The X server is definitely running as I set it up and it exists in the Windows 10 system tray. I've tried many configurations for the X server, and I get the same thing every time. I've also tried just setting the $DISPLAY in the .bashrc file, with the same results.

    I've also tried the solutions proposed here, by exporting DISPLAY to localhost:0.0, which the same results (also tried 0.0, :0, and a few others).

    I've tried rebooting, uninstalling and reinstalling things, and I get the same results every time. I'm not sure what to try next.
     
    trueCamelType, Oct 23, 2022
    #2
  3. LOL
    lol Win User
    Blurry fonts on using Windows default scaling with WSL GUI applications (HiDPI)

    Is there a way to fix blurry fonts in linux GUI applications when being run from WSL (Ubuntu 18.04) using the default Windows scaling? Things I have tried so far:

    With Xming:

    1. Tried disabling Windows scaling and setting it from linux side using GDK_DPI_SCALE=2.5, the problem with this is several things like context menu icons don't play nicely and are often not scaled. Without GDK_DPI_SCALE=2.5, applications are basically unusable since the text is extremely tiny.
    2. Tried installing all the fonts from C:\Windows\Fonts to C:\Program Files\Xming\fonts\TTF and running mkfontscale, couldn't make it work this way either.
    3. Tried using VcXsrv, has the same issue.

    Screenshots

    • Clion:


    Can't run lunix application GUI via WSL 2 6H3Ej.png


    • Comparison between emacs (WSL) and VS Code (Windows native)


    Can't run lunix application GUI via WSL 2 [​IMG]


    All the resources I have looked up so far:

    1. Why are WSL GUI apps rendered with blurry fonts with Xming?: The answer here is specifically for just firefox and electron based applications.
    2. Gnome-Terminal blurry on Xming: Doesn't have anything helpful in particular either other than a suggestion to disable scaling and using something else than Xming.
    3. DPI issues running GUI programs on a 4K screen: Suggests using VcXsrv.

    The main purpose of doing all this is to be able to run text editors(emacs)/IDE(Clion) from WSL. And, the reason I cannot install their windows equivalent is we develop only for linux.

    Few system details:

    Screen

    4K (3840x2160) - 15.6"

    OS

    • Windows: Windows 10 Home v1803 Build: 17134.345
    • WSL: Ubuntu 18.04 (Linux username 4.4.0-17134-Microsoft #345-Microsoft Wed Sep 19 17:47:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux)
     
  4. Can't run lunix application GUI via WSL 2

    WSL 2

    I want to make use of WSL 2 feature with the new update of Windows version 2004 , in order to use WSL 2 i need to enable Virtualization in my pc bios settings. So when i enable virtualization my windows starts lagging and all the animations of scrolling
    etc etc lags...Please suggest me something to fix that so that i could use the new virtualization feature.
     
    Legend Hunter 3, Oct 23, 2022
    #4
Thema:

Can't run lunix application GUI via WSL 2

Loading...
  1. Can't run lunix application GUI via WSL 2 - Similar Threads - Can't run lunix

  2. Will VB6 run in Lunix

    in Windows 10 Gaming
    Will VB6 run in Lunix: VB 6 wont install on W11, Will VB6 run in Lunix? https://answers.microsoft.com/en-us/windows/forum/all/will-vb6-run-in-lunix/82975e36-5daf-4539-9234-88ed8b4215bd
  3. Will VB6 run in Lunix

    in Windows 10 Software and Apps
    Will VB6 run in Lunix: VB 6 wont install on W11, Will VB6 run in Lunix? https://answers.microsoft.com/en-us/windows/forum/all/will-vb6-run-in-lunix/82975e36-5daf-4539-9234-88ed8b4215bd
  4. Can't run lunix application GUI via WSL 2

    in Windows 10 Gaming
    Can't run lunix application GUI via WSL 2: Dears.I hope you doing well and Thanks for you effort.I install Ubuntu via WSL 2 and it's work fine with line command but when want to run an application i get the below message, i try all the solution that find in the internet but it's not work with me, i don't know if the...
  5. Can't run lunix application GUI via WSL 2

    in Windows 10 BSOD Crashes and Debugging
    Can't run lunix application GUI via WSL 2: Dears.I hope you doing well and Thanks for you effort.I install Ubuntu via WSL 2 and it's work fine with line command but when want to run an application i get the below message, i try all the solution that find in the internet but it's not work with me, i don't know if the...
  6. WSL 2 - Can't install Ubuntu 22.04 - Can't use any Ubuntu with WSL 2

    in Windows 10 Gaming
    WSL 2 - Can't install Ubuntu 22.04 - Can't use any Ubuntu with WSL 2: Hi! I did a clean install of Win 11 Pro yesterday. I did Windows update and I'm current.I tried to use WSL and install Ubuntu 22.04 with the new GUI. I'm a developer and this is the reason I went to Windows 11!When I install from the store it dies while unpacking with a...
  7. Couldn't use wsl gui

    in Windows 10 Drivers and Hardware
    Couldn't use wsl gui: [ATTACH] Please don't direct me to any other forum. [ATTACH] https://answers.microsoft.com/en-us/windows/forum/all/couldnt-use-wsl-gui/43e9e847-7b06-42f5-9510-b0d1a5c43857
  8. Kali Linux on Windows in 5min (WSL 2 GUI)

    in Windows 10 Ask Insider
    Kali Linux on Windows in 5min (WSL 2 GUI): [ATTACH] submitted by /u/scadonl [link] [comments] https://www.reddit.com/r/Windows10/comments/iq8t11/kali_linux_on_windows_in_5min_wsl_2_gui/
  9. KDE Plasma runs on WSL 2

    in Windows 10 Ask Insider
    KDE Plasma runs on WSL 2: [ATTACH] Oh boy. No one told me graphical interface works natively on WSL 2. I managed to run the KDE plasma on ubuntu in wsl 2. Note: this is not using x-server. This is full-fat plasma....
  10. Cannot run GUI app on WSL 2

    in Windows 10 Network and Sharing
    Cannot run GUI app on WSL 2: I want to open some GUI apps on WSL 2 using Windows Insider 19640, but it doesn't work. For example, if I want to open gthumb in Ubuntu terminal, it throws an error: lemma@DESKTOP-TE65AIF:~$ xhost + xhost: unable to open display ":0" lemma@DESKTOP-TE65AIF:~$ gthumb...