-
Notifications
You must be signed in to change notification settings - Fork 328
WSLg - Works from Windows Menu, but impossible to launch from terminal #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It works after changing DISPLAY value. By default, DISPLAY=192.168.1.60:0 And I'm able to launch gedit from ubuntu terminal. |
I think that something is changing you the DISPLAY environment variable, maybe a previous configuration for X Server? Look into your .bashrc or /etc/profile.d looking for a script that is setting the variable. Ubuntu used to have a file called wsl-integration in /etc/profile.d By default, DISPLAY should be :0. If it is anything else, something in your distro is changing it. |
You also need to provide WAYLAND_DISPLAY.
Another way of checking this out is 1 - Open terminator from Start Menu Cheers |
The same issue come back after installing the workaround of systemd and docker native. |
The problem solved again after setting up DISPLAY in .bashrc using the cmd export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 |
@hakiri to actually make it work (when using systemd/docker) without installing other xserver, see this comment. |
Folks in the thread are correct, WSL's INIT pre-configure the following environment variable before your profile is applied:
If you change your profile, or run software that changes those value, you'll lose connection to one of those server and things will break. This is by design and allow you to run other servers if you would prefer (you can even disable WSLg GUI entirely if you wish). Seems like everyone in this thread got their connection working, resolving this issue. If you see folks struggling with their connection, please have them take a look at this wiki: |
Environment
Windows build number: Microsoft Windows [Version 10.0.21364.1]
Your Distribution version: Ubuntu Release: 20.04
Your WSLg version: 1.0.17.1
After update wsl and install gedit in Ubuntu:
Expected behavior
I want to be able to launch all applications from Ubuntu.
The text was updated successfully, but these errors were encountered: