Last active
January 6, 2021 02:08
-
-
Save LAK132/fcc946f848f9ed87dbef289f2d30096d to your computer and use it in GitHub Desktop.
Makefile DISPLAY example for when getting the IP address of the X11 server is required under WSL/cygwinX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifneq ($(shell grep -a -h -i microsoft /proc/version),) | |
# // For use on Windows (WSL) with cygwinX | |
# // Requires xinit, xauth and xhost probably | |
# // Start the X11 server with `path\to\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; exec /usr/bin/startxwin -- +iglx -listen tcp"` | |
# // If you get "Authorization required, but no authorization protocol specified" | |
# // then try running `DISPLAY=:0.0 xhost +` in the cygwin terminal after | |
# // starting the X11 server. | |
DISPLAY = "`cat /etc/resolv.conf | grep nameserver | awk '{ print $$2 }'`:0.0" | |
LIBGLARGS = LIBGL_ALWAYS_INDIRECT=1 LIBGL_ALWAYS_SOFTWARE=1 | |
endif | |
DISPLAYARGS = DISPLAY=$(DISPLAY) $(LIBGLARGS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment