carrot/selfdrive/test/setup_xvfb.sh
FrogAi 659adb6457 openpilot v0.9.7 release
date: 2024-03-17T10:14:38
master commit: 7e9a909e0e57ecb31df4c87c5b9a06b1204fd034
2024-05-24 17:43:27 -07:00

19 lines
403 B
Bash

#!/usr/bin/env bash
# Sets up a virtual display for running map renderer and simulator without an X11 display
DISP_ID=99
export DISPLAY=:$DISP_ID
sudo Xvfb $DISPLAY -screen 0 2160x1080x24 2>/dev/null &
# check for x11 socket for the specified display ID
while [ ! -S /tmp/.X11-unix/X$DISP_ID ]
do
echo "Waiting for Xvfb..."
sleep 1
done
touch ~/.Xauthority
export XDG_SESSION_TYPE="x11"
xset -q