Phosh 與遠端桌面(wayvnc)
Phosh 是一個觸控優先的介面(Linux 手機上用的就是它),很適合 3.2“ 觸控式螢幕。 它是可選的:TypixDeck 系統預設桌面和 Raspberry Pi OS 一樣是 labwc。
在原版 Raspberry Pi OS 上安裝
Section titled “在原版 Raspberry Pi OS 上安裝”從 Raspberry Pi OS Lite(64 位,Trixie) 開始,並先完成 TypixDeck overlay 和 config.txt 配置塊。Phosh 自帶會話, 不會和桌面版的顯示管理器打架。
1. 鎖定 Debian 的 wlroots
Section titled “1. 鎖定 Debian 的 wlroots”sudo tee /etc/apt/preferences.d/typixdeck-phosh-wlroots >/dev/null <<'EOF'# phoc is ABI-incompatible with the Raspberry Pi rebuild of libwlroots-0.18Package: libwlroots-0.18Pin: release o=DebianPin-Priority: 1001EOFsudo apt update原因: 樹莓派軟體源裡的 libwlroots-0.18 是帶額外補丁的重編版。Phosh 的合成器 phoc 是按 Debian
原版編譯的,遇到樹莓派版會崩潰(Output 'DPI-1' added 之後緊接著 stack smashing detected)——
會話直接彈回登入介面。labwc 用的是 wlroots 0.19,所以 0.18 只有 phoc 在用,鎖定它沒有副作用。
優先順序 1001 還能保證以後升級時繼續跟隨 Debian 版。
sudo apt install -y phosh-core phosh-mobile-settings gnome-console dconf-cli wlr-randr grim wayvnc3. 直接啟動 Phosh——並停用 greetd
Section titled “3. 直接啟動 Phosh——並停用 greetd”sudo systemctl disable greetdsudo rm -f /etc/systemd/system/display-manager.servicesudo systemctl set-default graphical.targetsudo systemctl enable phosh為什麼要停用 greetd: phosh-core 會帶進 phrog 登入器,phrog 又帶進 greetd,而 greetd
會把自己設成顯示管理器。結果它搶到控制台,裝置開機進的是鎖定畫面登入介面而不是桌面——只能用頂欄和
“設定”,而且 Phosh 的數字鍵盤在 4:3 螢幕上放不下。phosh.service 則會以第一個使用者的身份直接啟動介面。
4. 縮放、免解鎖啟動、不關閉螢幕
Section titled “4. 縮放、免解鎖啟動、不關閉螢幕”sudo mkdir -p /etc/phosh /etc/systemd/user/mobi.phosh.Shell.service.d /etc/dconf/profile /etc/dconf/db/local.d
sudo tee /etc/phosh/phoc.ini >/dev/null <<'EOF'[core]xwayland=false
[output:DPI-1]scale = 1.5EOF
sudo tee /etc/systemd/user/mobi.phosh.Shell.service.d/typixdeck-unlocked.conf >/dev/null <<'EOF'[Service]ExecStart=ExecStart=/usr/libexec/phosh --unlockedEOF
[ -f /etc/dconf/profile/user ] || printf 'user-db:user\nsystem-db:local\n' | sudo tee /etc/dconf/profile/user >/dev/nullsudo tee /etc/dconf/db/local.d/10-typixdeck-phosh >/dev/null <<'EOF'[org/gnome/desktop/screensaver]lock-enabled=false
[org/gnome/desktop/lockdown]disable-lock-screen=true
[sm/puri/phosh/lockscreen]require-unlock=false
[org/gnome/desktop/session]idle-delay=uint32 0
[org/gnome/settings-daemon/plugins/power]idle-dim=falsesleep-inactive-ac-type='nothing'sleep-inactive-battery-type='nothing'
[org/gnome/desktop/interface]show-battery-percentage=trueEOFsudo dconf updatesudo reboot原因:
- 縮放 1.5(邏輯解析度 683×512):phoc 自動算出的 1.25 在約 400 ppi 的螢幕上太小、點不準; 2.0 留給 Phosh 鎖定畫面數字鍵盤的高度又不夠。
- 免解鎖、無鎖定畫面:數字鍵盤在 4:3 螢幕上放不下,而且這臺機器有實體鍵盤。
- 不關閉螢幕、不自動調暗:Phosh 無法切換 DPI 螢幕的電源狀態,所謂“關閉螢幕”只是畫一幀黑色、背光照樣亮著—— 既不省電,看起來還像關機了。
- 頂欄顯示電池百分比,資料來自電量計。
遠端桌面:用 wayvnc
Section titled “遠端桌面:用 wayvnc”Phosh 是 Wayland 會話。RealVNC 的 vncserver-x11 顯示不了它——它只能抓 X11,永遠只會回一句
“Cannot currently show the desktop”。請用 wayvnc(上面已經裝好):
sudo systemctl disable --now vncserver-x11-serviced 2>/dev/nullsudo systemctl enable --now wayvncsudo ss -ltnp | grep 5900 # wayvnc listening on *:5900Raspberry Pi OS 的 wayvnc 自帶 /etc/wayvnc/config,預設開啟認證(enable_auth=true、
enable_pam=true),TLS / RSA 金鑰在安裝時自動生成。用任意 VNC 客戶端連線 <裝置IP>:5900,
用你的 Linux 使用者名稱和密碼登入。它監聽所有網絡卡——請設定足夠強的密碼。
-
只有頂欄和“設定”能用,沒有應用網格: greetd 仍是顯示管理器(見第 3 步)。用
systemctl is-active phosh greetd檢查——應該分別是active/inactive。 -
通過 SSH 截圖(phoc 基於 wlroots):
Terminal window XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-0 grim /tmp/screen.png