Download tasks/t19-friction-tutorial-part2/environment/start-editor.sh from refreshdotdev/Refresh-GUI-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.76 kB
-
https://huggingface.co/datasets/refreshdotdev/Refresh-GUI-dataset/resolve/main/tasks/t19-friction-tutorial-part2/environment/start-editor.sh
- Command line
-
hf download hf://datasets/refreshdotdev/Refresh-GUI-dataset/tasks/t19-friction-tutorial-part2/environment/start-editor.sh
-
curl -L -o start-editor.sh https://huggingface.co/datasets/refreshdotdev/Refresh-GUI-dataset/resolve/main/tasks/t19-friction-tutorial-part2/environment/start-editor.sh
1.76 kB
| # t19 entrypoint — vedit's start-editor with the crash supervisor FIXED for | |
| # computer-1 (2026-09-03, t19 run a1): the base supervisor relaunched a | |
| # crashed editor with DISPLAY=:0, but the harness's desktop is Xvfb :1, so | |
| # every relaunch died with "Could not load the Qt platform plugin xcb" | |
| # (6 failed relaunches in the opus sandbox's /var/log/editor-supervisor.log; | |
| # the fable agent lost Friction in the Scene Properties colour dialog and | |
| # never got it back). This version targets :1 when its socket exists, goes | |
| # through the app's launcher (pulse null sink, GL env), and polls faster. | |
| set -euo pipefail | |
| mkdir -p /logs/verifier /root/edit /root/Desktop /root/.config/autostart | |
| APP="${APP:-kdenlive}" | |
| if [ "$APP" != "kdenlive" ] && [ -f "/opt/autostart/${APP}-autostart.desktop" ]; then | |
| rm -f /root/.config/autostart/kdenlive.desktop | |
| cp "/opt/autostart/${APP}-autostart.desktop" "/root/.config/autostart/${APP}.desktop" | |
| fi | |
| # GUI-only world (Sid, 2026-09-04): no terminal exists in the image. Relaunch | |
| # routes are this supervisor (Friction) and the Thunar-backed Desktop icons | |
| # (Friction, Tutorial 1/2). | |
| ( | |
| proc="$APP"; seen=0 | |
| while true; do | |
| if pgrep -x "$proc" >/dev/null 2>&1; then | |
| seen=1 | |
| elif [ "$seen" = 1 ]; then | |
| sleep 5 | |
| if ! pgrep -x "$proc" >/dev/null 2>&1; then | |
| disp=":0"; [ -S /tmp/.X11-unix/X1 ] && disp=":1" | |
| echo "$(date -u +%H:%M:%S) supervisor: $proc gone, relaunching on $disp" >> /var/log/editor-supervisor.log | |
| DISPLAY="$disp" HOME=/root SDL_AUDIODRIVER=dummy QSG_RHI_BACKEND=opengl LIBGL_ALWAYS_SOFTWARE=1 \ | |
| setsid -f "$proc" >> /var/log/editor-supervisor.log 2>&1 || true | |
| sleep 20 | |
| fi | |
| fi | |
| sleep 10 | |
| done | |
| ) & | |
| exec sleep infinity | |