diff --git a/plugins/vcxsrv/README.md b/plugins/vcxsrv/README.md new file mode 100644 index 000000000..ccbd4645c --- /dev/null +++ b/plugins/vcxsrv/README.md @@ -0,0 +1,22 @@ +# VcXsrv plugin + +This plugin add the environment variables to allow graphic apps running on WSL +to find the VcXsrv instance intalled on Windows. It assumes that you have let +the VcXsrv configured with your local machine. + +To use it, add `vcxsrv` to the plugins array in your zshrc file: + +```zsh +plugins=(... vcxsrv) +``` + +## Requirements + +In order to make this work, you will need to have the folowing softwares +installed: +* [WSL2](https://docs.microsoft.com/en-us/windows/wsl/); +* [VxXsrv](https://sourceforge.net/projects/vcxsrv/). + + VcXsrv installed on Windows. + +More info on the usage and install: https://github.com/direnv/direnv diff --git a/plugins/vcxsrv/vcxsrv.plugin.zsh b/plugins/vcxsrv/vcxsrv.plugin.zsh new file mode 100644 index 000000000..659aea39b --- /dev/null +++ b/plugins/vcxsrv/vcxsrv.plugin.zsh @@ -0,0 +1,2 @@ +export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0 # in WSL 2 +export LIBGL_ALWAYS_INDIRECT=1