1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-27 08:10:08 +00:00

Adding a plugin that set the required environment variable to VcXsrv

This commit is contained in:
Rodrigo Estevao 2022-02-07 10:37:56 -03:00
parent 2d3bae965a
commit 873b92e169
2 changed files with 24 additions and 0 deletions

22
plugins/vcxsrv/README.md Normal file
View file

@ -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

View file

@ -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