You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that uses zenity in auxiliary scripts to interact with developer. For it to work in Docker Compose environment I forward DISPLAY environment variable and tell service to use host network stack. This works fine on Linux (both using docker-compose CLI directly and using VS Code with Remote Containers) and it works in WSL with GWSL when containers are managed using docker-compose CLI, but it does not work in VS Code in WSL. The root cause seems to be that Remote Containers in WSL shadows DISPLAY variable with DISPLAY='1' when invoking docker-compose:
Click "Reopen in container" when prompted (assuming Remote Containers is installed).
Open integrated terminal and run
$ echo$DISPLAY
Observe result:
1
Run on WSL:
$ docker-compose exec main zenity --info --text "Hello, world!"
Observe failure:
Unable to init server: Could not connect: Connection refused
(zenity:328): Gtk-WARNING **: 13:10:43.286: cannot open display: 1
If you have GWSL integrated with WSL distro, DISPLAY should be set to <ip>:<port> and zenity should successfully display a window with text. However, the issue isn't necessarily specific to X forwarding, any other value of DISPLAY will be shadowed as well. It just happens that this particular variable name is very important for X forwarding and cannot be changed or worked around.
The text was updated successfully, but these errors were encountered:
Somewhat related to #550 and #3841.
I have a project that uses
zenity
in auxiliary scripts to interact with developer. For it to work in Docker Compose environment I forwardDISPLAY
environment variable and tell service to use host network stack. This works fine on Linux (both usingdocker-compose
CLI directly and using VS Code with Remote Containers) and it works in WSL with GWSL when containers are managed usingdocker-compose
CLI, but it does not work in VS Code in WSL. The root cause seems to be that Remote Containers in WSL shadowsDISPLAY
variable withDISPLAY='1'
when invokingdocker-compose
:Minimal project to reproduce:
Steps to reproduce:
If you have GWSL integrated with WSL distro,
DISPLAY
should be set to<ip>:<port>
andzenity
should successfully display a window with text. However, the issue isn't necessarily specific to X forwarding, any other value ofDISPLAY
will be shadowed as well. It just happens that this particular variable name is very important for X forwarding and cannot be changed or worked around.The text was updated successfully, but these errors were encountered: