AnyBot/box/start.sh

133 lines
8.0 KiB
Bash
Raw Normal View History

#!/bin/bash
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
# Boots the desktop: X server, a minimal XFCE (window manager, desktop, panel; no session
# manager), VNC, the noVNC web viewer and the browser.
set -u
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
mkdir -p /home/bot/Desktop /home/bot/Downloads
# 下載 in the sidebar of 檔案管理員 and of every file window (a web page's 上傳檔案): what the bots
# download is there (/home/bot/Downloads).
BM=/home/bot/.config/gtk-3.0/bookmarks
mkdir -p "${BM%/*}"
grep -q '^file:///home/bot/Downloads' "$BM" 2>/dev/null || printf 'file:///home/bot/Downloads 下載\n' >> "$BM"
cp -n /etc/anybot/Xresources /home/bot/.Xresources 2>/dev/null
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
# XFCE's settings come from the image on every boot (after LazyBoy2's box), so the desktop
# always looks the way the image says; the files and the browser's logins are what last.
XML=/home/bot/.config/xfce4/xfconf/xfce-perchannel-xml
mkdir -p "$XML" /home/bot/.config/xfce4/panel
for f in xfce4-panel.xml xfwm4.xml xfce4-desktop.xml; do cp -f "/usr/share/anybot/xfce-skel/$f" "$XML/$f"; done
cp -f /etc/xdg/xfce4/helpers.rc /home/bot/.config/xfce4/helpers.rc
# GTK's dialogs (a web page's 上傳檔案 in Chromium, e.g. Threads' 加入相片) with 取消 and 開啟 in a
# bar at the top, as on GNOME. Without GNOME's settings service GTK put them at the bottom of a
# file window taller than the screen, under the taskbar: a picture could be found but never sent.
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
# (/etc/gtk-3.0/settings.ini says so too; a home from an older box has its own file.)
GTKINI=/home/bot/.config/gtk-3.0/settings.ini
mkdir -p "${GTKINI%/*}"
grep -q '^\[Settings\]' "$GTKINI" 2>/dev/null || printf '[Settings]\n' >> "$GTKINI"
grep -q '^gtk-dialogs-use-header' "$GTKINI" || sed -i '/^\[Settings\]/a gtk-dialogs-use-header=true' "$GTKINI"
rm -f /tmp/.X1-lock /tmp/.X11-unix/X1
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
# One TigerVNC server is the screen and the VNC server (was Xvfb + x11vnc, which polls the
# screen for changes). VNC only on 127.0.0.1 inside the box, with the box's VNC password when the
# app gave one (VNC_PASSWORD), as before.
GEOM="${SCREEN_SIZE%x*}"
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
SW="${GEOM%x*}"; SH="${GEOM#*x}"
# The panel along the bottom, the screen's whole width.
sed -i "s/p=8;x=[0-9]*;y=[0-9]*/p=8;x=$((SW / 2));y=$((SH - 18))/" "$XML/xfce4-panel.xml"
if [ -n "${VNC_PASSWORD:-}" ]; then
mkdir -p /home/bot/.vnc
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
printf '%s\n' "$VNC_PASSWORD" | vncpasswd -f > /home/bot/.vnc/passwd && chmod 600 /home/bot/.vnc/passwd
feat: 每個 Bot 一個螢幕——Bot 的電腦上各有自己的螢幕和瀏覽器,支線另開暫時的螢幕,右側面板和「全部螢幕」看得到每一個 照 Grok Bot 的分法:一台電腦、每個 Bot 一個螢幕,大家同時做互不干擾。使用者自己的電腦只有一個實體螢幕,還是一次一個 Bot。 - box:anybot-screen(up/down/list/reap)開關每個 Bot 的螢幕,同時最多 6 個,閒置 10 分鐘關掉;browser 每個螢幕自己的設定檔(第一次從共用的複製登入;支線 <key>-t<n> 從主線那份複製,關掉時刪掉);start.sh 給每個螢幕 VNC token;Bot 電腦升到版本 10 - cloudbox:每個螢幕有自己的狀態(編號、尺寸、貼上檔、瀏覽器埠),指令開的視窗出現在它的 Bot 的螢幕上;branch_screen、close_screen、open_screens、thumbnail_of - agent:在 Bot 的電腦上,一輪用它自己的螢幕(支線用暫時的),佔用照螢幕算 - 支線結束時關掉它的暫時螢幕 - 畫面:右側「電腦」顯示目前 Bot 的螢幕;群組跟著正在回答的成員,「成員」卡片點小畫面就固定顯示那個成員;「全部螢幕(N)」一格一個螢幕;接管時只停那個 Bot;手機和中繼帶上要看哪個 Bot 的螢幕 - 群組和支線的系統指示:看不到彼此開著的網頁,交棒時寫網址或檔案路徑 - 功能地圖:screen、team、computers、browser Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha4mzWbjJAWAsDVuBun
2026-11-15 08:12:09 +00:00
# (The bot user opens the bots' own screens with the same password: anybot-screen.)
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
VNC_SEC="-SecurityTypes VncAuth -rfbauth /home/bot/.vnc/passwd"
else
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
VNC_SEC="-SecurityTypes None"
fi
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
Xtigervnc :1 -geometry "$GEOM" -depth 24 -rfbport 5900 -localhost $VNC_SEC -AlwaysShared -AcceptCutText -SendCutText \
-UseBlacklist 0 -IdleTimeout 0 -MaxIdleTime 0 -MaxDisconnectionTime 0 -MaxConnectionTime 0 -s 0 -dpms -desktop "Bot 的電腦" -ac -noreset \
>/tmp/xvnc.log 2>&1 &
XVFB_PID=$!
for i in $(seq 1 50); do xdpyinfo -display :1 >/dev/null 2>&1 && break; sleep 0.1; done
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
xsetroot -display :1 -solid '#2f343f'
# The wallpaper is kept under the screen's output name (TigerVNC's VNC-0).
OUT=$(xrandr --display :1 --query 2>/dev/null | awk '/ connected/ {print $1; exit}')
sed -i "s/@OUTPUT@/${OUT:-VNC-0}/" "$XML/xfce4-desktop.xml"
chown -R bot:bot /home/bot
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
# The session bus and the accessibility registry; tools started later over `docker exec`
# (anybot-a11y, anybot-browser) join this bus through /tmp/anybot-dbus.env.
su bot -c 'cd /home/bot && dbus-launch --sh-syntax > /tmp/anybot-dbus.sh' && . /tmp/anybot-dbus.sh
2026-11-11 08:19:06 +00:00
printf 'DBUS_SESSION_BUS_ADDRESS=%s\n' "$DBUS_SESSION_BUS_ADDRESS" > /tmp/anybot-dbus.env
chown bot:bot /tmp/anybot-dbus.env /tmp/anybot-dbus.sh 2>/dev/null || true
chmod 600 /tmp/anybot-dbus.env /tmp/anybot-dbus.sh
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
export DBUS_SESSION_BUS_ADDRESS
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
AS_BOT="cd /home/bot && DISPLAY=:1 DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
for c in /usr/libexec/at-spi-bus-launcher /usr/lib/at-spi2-core/at-spi-bus-launcher; do
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
[ -x "$c" ] && { su bot -c "$AS_BOT $c --launch-immediately >/tmp/atspi-bus.log 2>&1 &"; break; }
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
done
for c in /usr/libexec/at-spi2-registryd /usr/lib/at-spi2-core/at-spi2-registryd; do
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
[ -x "$c" ] && { su bot -c "$AS_BOT $c >/tmp/atspi-registry.log 2>&1 &"; break; }
Bots click by number: every control on the screen is boxed and numbered, on every computer A bot asked to open a Threads profile clicked an empty strip ten times: it guessed coordinates from a picture, and the web tools' description told it they didn't work on its own computer. - marks.rs: the picture a bot gets has every button, link, field and menu item boxed and numbered (a tiny built-in digit font, pure Rust), with the same numbers in a list. click / typing / scroll / mouse_move take the number (ref) and land on the control's centre. - Where the controls come from: macOS AX and Linux AT-SPI through agent-desktop on a person's computer (desktop::elements); AT-SPI in the bots' own computer (box/a11y, after XBot's box-a11y), web pages included. On a Mac a control whose spot another app's window covers gets no number (topmost window at its centre must be the app's; the Dock's invisible full-screen window doesn't count). open_app waits until the app is really in front. - No going round in circles: a step that changed nothing says so; the same step (clicks within 16 px) a third time in a turn comes with a warning, from the fourth time it isn't run. - The box (version 4): one TigerVNC server instead of Xvfb + x11vnc, the AT-SPI bus and registry at boot, one browser launcher (box/browser, after XBot's box-chrome: same profile and CDP, renderer accessibility, a launch lock, stale profile locks cleared). One docker exec per look (list + picture, ~0.4 s). A brain updates an older box by itself when it has been idle a minute (files and logins stay); a new box is never made from an older image. - Gone: computer_use_read_app (the list is in every picture), computer_use_mouse_button, the per-call picture for the phone (it gets a plain one), the stale browser_read note; the prompt says web work goes through browser_* by number, and never to read browser cookie or history files. Tests: marks (numbering, drawing, fingerprints), box_numbers_are_exact on a box from the new image (a Threads-like page: the icon links get numbers, Profile clicked by number, Chinese typed into the numbered field, a click on nothing called out), box_screen_is_exact, VNC e2e 11/11 on TigerVNC, Calculator 7×8=56 by numbers through the signed app on this Mac, remote_e2e 28/28, 153 unit tests; Linux build + 157 tests + x11_live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:47:01 +00:00
done
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
su bot -c "$AS_BOT gsettings set org.gnome.desktop.interface toolkit-accessibility true" 2>/dev/null || true
# The file window opens smaller than the screen, whatever size it was left at. (GTK takes the
# saved size only with a saved place too; without one it sized the window from the font, and with
# the old 粉圓 12 that was 1342×1029: 開啟 off the right edge of the screen.)
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
su bot -c "$AS_BOT gsettings set org.gtk.Settings.FileChooser window-size '($((SW * 7 / 10)), $((SH * 3 / 4)))'" 2>/dev/null || true
su bot -c "$AS_BOT gsettings set org.gtk.Settings.FileChooser window-position '($((SW * 15 / 100)), $((SH / 8)))'" 2>/dev/null || true
su bot -c "$AS_BOT xrdb -nocpp -merge /home/bot/.Xresources"
# The desktop: the window manager first, then the wallpaper and the panel (their settings come
# from xfconfd, which the session bus starts on the first ask).
su bot -c "$AS_BOT xfwm4 --compositor=off --sm-client-disable >/tmp/xfwm4.log 2>&1 &"
sleep 0.3
su bot -c "$AS_BOT xfdesktop --disable-wm-check --sm-client-disable >/tmp/xfdesktop.log 2>&1 &"
# The panel comes back when it is closed: its 面板 › 登出 › 結束 quits only the panel, and nothing
# brought it back until the next boot. (Its own restart re-runs it in place.)
su bot -c "$AS_BOT sh -c 'while xdpyinfo >/dev/null 2>&1; do xfce4-panel --disable-wm-check --sm-client-disable; sleep 1; done' >/tmp/xfce4-panel.log 2>&1 &"
# Copy and paste between the person's computer and this one: Xvnc hands the viewer's clipboard to
# the X selections (and back) only while vncconfig runs (after LazyBoy2's box).
su bot -c "DISPLAY=:1 vncconfig -nowin >/tmp/vncconfig.log 2>&1 &"
feat: 每個 Bot 一個螢幕——Bot 的電腦上各有自己的螢幕和瀏覽器,支線另開暫時的螢幕,右側面板和「全部螢幕」看得到每一個 照 Grok Bot 的分法:一台電腦、每個 Bot 一個螢幕,大家同時做互不干擾。使用者自己的電腦只有一個實體螢幕,還是一次一個 Bot。 - box:anybot-screen(up/down/list/reap)開關每個 Bot 的螢幕,同時最多 6 個,閒置 10 分鐘關掉;browser 每個螢幕自己的設定檔(第一次從共用的複製登入;支線 <key>-t<n> 從主線那份複製,關掉時刪掉);start.sh 給每個螢幕 VNC token;Bot 電腦升到版本 10 - cloudbox:每個螢幕有自己的狀態(編號、尺寸、貼上檔、瀏覽器埠),指令開的視窗出現在它的 Bot 的螢幕上;branch_screen、close_screen、open_screens、thumbnail_of - agent:在 Bot 的電腦上,一輪用它自己的螢幕(支線用暫時的),佔用照螢幕算 - 支線結束時關掉它的暫時螢幕 - 畫面:右側「電腦」顯示目前 Bot 的螢幕;群組跟著正在回答的成員,「成員」卡片點小畫面就固定顯示那個成員;「全部螢幕(N)」一格一個螢幕;接管時只停那個 Bot;手機和中繼帶上要看哪個 Bot 的螢幕 - 群組和支線的系統指示:看不到彼此開著的網頁,交棒時寫網址或檔案路徑 - 功能地圖:screen、team、computers、browser Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha4mzWbjJAWAsDVuBun
2026-11-15 08:12:09 +00:00
# One web viewer for every screen: the shared one is "main"; anybot-screen adds each bot's own
# (每個 Bot 一個螢幕). A viewer picks one with ?path=websockify%3Ftoken%3D<key>.
rm -rf /tmp/anybot-screens; mkdir -p /tmp/anybot-screens && chmod 1777 /tmp/anybot-screens
echo "main: localhost:5900" > /tmp/anybot-vnc-tokens && chown bot:bot /tmp/anybot-vnc-tokens
# (A ping every 30 s: a proxy on the way — Tailscale serve, Caddy — doesn't drop a viewer that is
# only watching a still screen.)
websockify --heartbeat=30 --web /usr/share/novnc --token-plugin TokenFile --token-source /tmp/anybot-vnc-tokens 6080 >/tmp/novnc.log 2>&1 &
WEBSOCKIFY_PID=$!
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
# The browser is open on the shared screen from the start, as on LazyBoy2's box: a profile's very
# first boot shows what this computer is for, later ones an empty page.
if [ -d /home/bot/.config/anybot-profile/Default ]; then
su bot -c "$AS_BOT anybot-browser >/dev/null 2>&1 &"
else
su bot -c "$AS_BOT anybot-browser file:///usr/share/anybot/welcome.html >/dev/null 2>&1 &"
fi
# Say ready only once the viewer's port listens: the app opens noVNC on this flag, and a too
# early file meant the first viewer load 404'd.
(
for i in $(seq 1 100); do
python3 -c "import socket; socket.create_connection(('127.0.0.1', 6080), 0.5)" 2>/dev/null && break
sleep 0.2
done
echo "anybot-box ready" > /tmp/anybot-box.ready
) &
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
# `docker stop`: the browsers close the normal way first, so a login made a moment ago is on
# disk (killed outright, Chromium can lose its last cookies). Only the main processes, not their
# renderers.
stop_browsers() {
local pids="" p
for p in $(pgrep -u bot -x chromium); do
tr '\0' '\n' < "/proc/$p/cmdline" 2>/dev/null | grep -q '^--type=' || pids="$pids $p"
done
[ -n "$pids" ] || return 0
kill -TERM $pids 2>/dev/null
for _ in $(seq 1 50); do
local alive=0
for p in $pids; do kill -0 "$p" 2>/dev/null && alive=1; done
[ "$alive" = 0 ] && break
sleep 0.1
done
}
trap 'stop_browsers; kill $WEBSOCKIFY_PID $XVFB_PID 2>/dev/null; exit 0' TERM INT
# When the desktop's heart stops, the container ends too (it used to sit there as Running
# with a dead X server, and every screen action failed forever).
wait $XVFB_PID
kill $WEBSOCKIFY_PID 2>/dev/null
feat: Bot 的電腦換成 LazyBoy2 的 XFCE 桌面,加上檔案管理員、文字編輯器、影像檢視器 Bot 的電腦(第 12 版):原本的 fluxbox 只有右鍵選單和一條細工作列,不好用;現在照 LazyBoy2 的 box 換成精簡的 XFCE(xfwm4、xfdesktop、xfce4-panel,沒有工作階段管理員)。下方工作列有「應用 程式」、瀏覽器、檔案管理員、終端機、開著的視窗和時鐘;Arc-Dark 深色主題、Papirus 圖示、jf open 粉圓字型(建映像檔時下載並核對 sha256);選單、Chromium 和網頁語言是繁體中文(加了 chromium-l10n:LazyBoy2 的 Chromium 介面其實是英文),時區台北。開機就開好瀏覽器,第一次是 說明頁。每個 Bot 自己的螢幕也是同一套桌面。Bot 說「終端機」開的是工作列那個 xfce4-terminal, 說「檔案總管」「Files」開 Thunar、從家目錄開始,回覆用 Bot 說的名字。 LazyBoy2 沒有、這裡加的:檔案管理員 Thunar(有縮圖)、文字編輯器 Mousepad、影像檢視器 Ristretto,檔案按兩下用對的程式開,PDF 和網頁開瀏覽器;檔案管理員和網頁上傳檔案的視窗側邊欄 都有「下載」(Bot 下載的檔案);瀏覽器下載的「在資料夾中顯示」開檔案管理員。應用程式選單只剩 一層,拿掉 XFCE 的設定(每次開機照映像檔重放,而且大多要設定服務才生效)。 實際操作找到的問題:網頁上傳檔案的視窗 1342×1029、比螢幕大,「開啟」掉到螢幕外(GTK 要同時 記著位置才照記住的大小開,沒有就照字型算,粉圓 12 號算出來太大),現在開機時大小和位置一起設; 工作列的「面板 › 登出 › 結束」會把工作列關掉到下次開機,現在一秒後自己回來;工作列按右鍵能 移除、移動項目,現在鎖住(xfconf 的鎖要寫使用者名稱,寫「*」不算數);新視窗擠在左上角蓋住 瀏覽器分頁,現在開在中間。關機時先讓瀏覽器正常關掉,剛登入的 cookie 才會寫進磁碟。 box_update_keeps_files 改讀說明頁(fluxbox 的選單檔沒了);box_screen_is_exact 多測打開檔案 管理員。映像檔約 1.67 GB。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha54sGCEGh2rRbTsSeh
2026-11-16 02:55:05 +00:00
pkill -u bot xfce4-panel 2>/dev/null
pkill -u bot xfwm4 2>/dev/null
exit 1