mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
fix: use correct display ID for WSL2 when setting up Xvfb (#36697)
use correct display ID for wsl
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
|
||||
# Sets up a virtual display for running map renderer and simulator without an X11 display
|
||||
|
||||
DISP_ID=99
|
||||
if uname -r | grep -q "WSL2"; then
|
||||
DISP_ID=0 # WSLg uses display :0
|
||||
else
|
||||
DISP_ID=99 # Standard Xvfb display
|
||||
fi
|
||||
export DISPLAY=:$DISP_ID
|
||||
|
||||
sudo Xvfb $DISPLAY -screen 0 2160x1080x24 2>/dev/null &
|
||||
|
||||
Reference in New Issue
Block a user