Skip to content

Install: install.sh installs FFmpeg; host notifies the desktop user when it is missing - #97

Merged
VallierDev merged 2 commits into
mainfrom
feat/ffmpeg-install-check
Oct 23, 2026
Merged

VallierDev merged 2 commits into
mainfrom
feat/ffmpeg-install-check

Conversation

@VallierDev

Copy link
Copy Markdown
Owner

缺 FFmpeg(或 FFmpeg 不带 libx264)时,客户端连上后桌面视频起不来,一直停在「正在传输画面」,用户看不到任何提示。tar 包没有安装脚本,用户手动拷贝二进制时没人检查这一点;.deb 已经依赖 ffmpeg。

  • packaging/tarball/install.sh(release 打进 tar 包根目录):
    • 以桌面用户身份运行,root 会被拒绝;
    • 安装到 ~/.local,用 copy + rename 规避 text file busy;
    • 写入用户级 unit,已存在则保留;
    • 检查 FFmpeg 是否可运行且带 libx264,缺失时询问后(或 --yes)经 sudo 用 apt / pacman 安装;Fedora 只在已启用 RPM Fusion 时安装,openSUSE 和其他发行版只打印命令,不替用户添加第三方源;
    • --no-ffmpeg 只检查不安装;FFmpeg 最终仍不可用时退出码为 1。
  • 宿主启动时检查 FFmpeg:不可运行记 error,缺 libx264 记 warning;doctor 共用同一个 ffmpeg_encoders()。
  • CI:shellcheck;在 runner 上先卸载 FFmpeg,再验证 install.sh --yes 能装回带 libx264 的 FFmpeg,第二次运行保留已有 unit。
  • README(中英)和 AGENTS 已同步。

验证:

  • 本地 cargo test 237 项通过;
  • Debian 13(Xfce/Xvnc)上卸掉 FFmpeg 后:--no-ffmpeg 打印安装命令并以退出码 1 结束,--yes 装回 FFmpeg(libx264 在),第二次运行保留已有 unit。测试用的是临时 HOME。
  • 宿主启动时的报错只有编译和 CI 覆盖,没有实机验证。

🤖 Generated with Claude Code

VallierDev and others added 2 commits October 23, 2026 16:00
…at startup

Without FFmpeg (or without libx264) the desktop stream fails after the viewer
connects and it waits on 正在传输画面 with no hint. The release tarball now ships
install.sh: it installs into ~/.local, writes the user unit (keeps an existing
one), and installs FFmpeg through sudo apt/pacman (Fedora with RPM Fusion) after
asking, or with --yes; openSUSE and others get the command printed. The host
logs an error at startup when FFmpeg is not runnable; doctor shares the check.
CI removes FFmpeg on the runner and checks that install.sh --yes restores it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked at startup and on every desktop offer. A freedesktop notification
(critical urgency) says 无法传输远程画面 with the install command; without a
notification daemon the hidden host window opens with the same red line.
At most every 5 minutes, and only a notice that reached the person starts
that quiet period; the line clears on the next check after FFmpeg is installed.
The D-Bus call runs on a blocking thread. CI isolates XDG_CONFIG_HOME for the
install.sh test (the runner sets it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@VallierDev VallierDev changed the title Install: tarball install.sh installs FFmpeg when missing; host warns at startup Install: install.sh installs FFmpeg; host notifies the desktop user when it is missing Oct 23, 2026
@VallierDev

Copy link
Copy Markdown
Owner Author

4cd0ad0 新增桌面提示:

  • 宿主在启动时和每次有人连接桌面时都检查 FFmpeg。不可用就发 freedesktop 通知(critical),标题「无法传输远程画面」,正文给出安装命令;没有通知服务时,自动打开隐藏的宿主窗口,顶部用红字显示同样内容。
  • 最多每 5 分钟提示一次,只有确实送达了才开始计时。装好 FFmpeg 后,下一次检查会清掉窗口里的提示,不需要重启服务。
  • D-Bus 调用放在 blocking 线程,不占用 async worker。

实测(Debian 13 Xfce,用临时测试程序链接 assist_window.c):没有通知服务时,隐藏窗口弹出并显示红字(返回 1);装上 xfce4-notifyd 后,右上角弹出通知(返回 0);清除后返回 -1。宿主进程内的完整流程只有编译和 CI 覆盖。

🤖 Generated with Claude Code

@VallierDev
VallierDev merged commit 61c3f91 into main Oct 23, 2026
6 checks passed
@VallierDev
VallierDev deleted the feat/ffmpeg-install-check branch October 23, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant