fix: replace default X cursor with black background on Linux Xvfb

The bare Xvfb display shows a large X-shaped cursor before the browser
launches, which appears in the first seconds of the recording.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
snomiao
2026-03-16 02:25:14 +00:00
parent b9ced27b38
commit c42719b803

View File

@@ -120,11 +120,13 @@ jobs:
- name: Setup Xvfb (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq xvfb ffmpeg >/dev/null 2>&1
Xvfb :99 -screen 0 1280x720x24 -ac &
sudo apt-get update -qq && sudo apt-get install -y -qq xvfb ffmpeg x11-xserver-utils >/dev/null 2>&1
Xvfb :99 -screen 0 1280x720x24 -ac -nolisten tcp &
echo $! > "${{ runner.temp }}/xvfb.pid"
sleep 2
echo "DISPLAY=:99" >> "$GITHUB_ENV"
# Set black background and normal cursor (removes the default X cursor)
DISPLAY=:99 xsetroot -solid black -cursor_name left_ptr 2>/dev/null || true
- name: Start recording (Linux)
if: runner.os == 'Linux'