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