I had WSl installed and updated it according to this MS guide:
wsl --update
wsl --shutdown
and tried to run gedit:
sudo apt install gedit -y
gedit ~/.bashrc
but got
(gedit:1854): Gtk-WARNING **: 19:49:45.422: cannot open display:
and the same with gimp and other graphical apps.
Should I do some further manipulations like installing ubuntu desktop like
apt install gnome
or using VcXsrc or opening a port in Windows Firewall?
WSL version:
WSL version: 1.2.0.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2604
The command
wsl --list --online
outputs the following:
The following is a list of valid distributions that can be installed.
Install using 'wsl.exe --install <Distro>'.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
OracleLinux_8_5 Oracle Linux 8.5
OracleLinux_7_9 Oracle Linux 7.9
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
openSUSE-Leap-15.4 openSUSE Leap 15.4
openSUSE-Tumbleweed openSUSE Tumbleweed
wsl --installbecause I thought that I already have WSL installed, and it is not clear for me what doesInstall using 'wsl.exe --install <Distro>'message mean. Actually Ubuntu-22.04 is installed and I am using it in terminal (as the app from MS Store) – Dmitriano Apr 20 '23 at 17:44wsl --list --verbosewithwsl --list --online. The purpose ofwsl --list --online' is to show the distribution that can be installed. I think you mean to ask forwsl -l -vto determine the distribution that is installed. – NotTheDr01ds Apr 20 '23 at 21:58echo $DISPLAYto your question? I'm assuming thatwsl -l -vcorrectly shows that you are running Ubuntu-22.04, right? ;-) – NotTheDr01ds Apr 20 '23 at 22:03$DISPLAYis empty,wsl -l -vshowsUbuntu-22.04 Running 1where 1 is VERSION. – Dmitriano Apr 21 '23 at 04:35wsl --set-version Ubuntu-22.04 2- Does it convert or give an error? – NotTheDr01ds Apr 21 '23 at 04:42wsl --set-version Ubuntu-22.04, the conversion took probably a hour or two but finally succeeded and I was able to rungedit– Dmitriano Apr 21 '23 at 09:12