From 784ef5a8d849f2b3b4ef0e9dce6304d4aeb23caa Mon Sep 17 00:00:00 2001 From: CMGS Date: Wed, 16 Sep 2026 17:25:25 +0800 Subject: [PATCH] desktop: write an xauth entry for :1 once Xvfb is up python-xlib looks the display up in XAUTHORITY by hostname and display number. The empty file the flavor installed satisfied its existence check but not the lookup, so every import of pyautogui printed two "no xauthority details available" lines on stdout. The osworld-server runs grader python through that stdout: a glob getter that json-decodes it fails, logs a warning and reports no files, which scored two OSWorld tasks as failures although the agent had produced the files. --- os-image/desktop/24.04/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os-image/desktop/24.04/Dockerfile b/os-image/desktop/24.04/Dockerfile index 62876595..3cd5e1b4 100644 --- a/os-image/desktop/24.04/Dockerfile +++ b/os-image/desktop/24.04/Dockerfile @@ -94,7 +94,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user \ && chmod 0440 /etc/sudoers.d/user \ && install -d -o user -g user /home/user/Desktop /home/user/Documents /home/user/Downloads \ - # python-xlib insists the XAUTHORITY file exists even though Xvfb -ac ignores it. + # python-xlib needs an entry for the display, written once Xvfb is up; a bare file only turns the failure into a stdout warning && install -o user -g user -m 0600 /dev/null /home/user/.Xauthority \ && chown -R user:user /opt/osworld-server \ && install -d /var/lib/systemd/linger && touch /var/lib/systemd/linger/user \ @@ -195,6 +195,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ '[Service]' \ 'Type=simple' \ "ExecStart=/usr/bin/Xvfb :1 -screen 0 ${SCREEN}x24 -ac -noreset -nolisten tcp +extension GLX +extension RANDR +render" \ + 'ExecStartPost=/bin/sh -c "for i in $(seq 1 50); do [ -S /tmp/.X11-unix/X1 ] && break; sleep 0.1; done; runuser -u user -- xauth -f /home/user/.Xauthority add :1 . $(mcookie)"' \ 'Restart=always' \ 'RestartSec=1s' \ '' \