Skip to content

Instantly share code, notes, and snippets.

@abenezeradane
Last active June 29, 2022 21:34
Show Gist options
  • Select an option

  • Save abenezeradane/408d4b5f14921500ca412c9beab6d116 to your computer and use it in GitHub Desktop.

Select an option

Save abenezeradane/408d4b5f14921500ca412c9beab6d116 to your computer and use it in GitHub Desktop.
Setting DISPLAY environmental variable for VcXsrv Windows X Server to work
#!/usr/bin/env bash
# Export DISPLAY to VcXsrv Windows X Server
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
echo "Updated Display: ${DISPLAY}"
exit 0
#SHELL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment