docs(linux): lead with Fcitx5, and get the session variables right - #7
Merged
Merged
Conversation
install.sh now installs Fcitx5 on every desktop, so `funput` leads every table and command block, with `funput-ibus` documented in full right below it for anyone already on IBus who would rather not rewire their session. The environment-variable section was the weak part and is now rebuilt against upstream (Using_Fcitx_5_on_Wayland, Setup_Fcitx_5). It gave only the X11 trio — correct for X11, but the page never said a Wayland session needs something different, and that is the session most readers are in: GTK 3/4 speak text-input-v3 on their own there, and the trio set globally makes KWin blink the candidate window. The section now branches on `$XDG_SESSION_TYPE` first and the desktop second, names the tool that owns this per distro (`im-config` on Debian/Ubuntu, `fcitx5-autostart` on Fedora, by hand on Arch and openSUSE), warns that im-config sets nothing in a Wayland session because that hook ships disabled, carries the Qt 6.8.2+ `QT_IM_MODULES` form, and lists where the variables can live — environment.d is read by GDM and Plasma 5.22+ only, so ~/.bash_profile is offered for everyone else, with the reboot upstream asks for. Two more corrections from the same pass. `fcitx5 -r` is wrong on KDE, where KWin hands the daemon a socket a replacement cannot inherit, so both places that suggested restarting now say to log out instead. And the page promised a .sha256 file with every release and a `sha256sum -c` line for it, but no Linux release has ever carried one — the installer verifies the release API's digest itself. Also: --user sat under Arch despite working on every distro and said nothing about the re-login Fcitx5 needs; Troubleshooting had no Fcitx5 branch; and the warning against installing both packages contradicted the packaging, which lets them coexist — enabling both in one session is the actual problem. Both locales. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vấn đề
install.shgiờ cài Fcitx5 trên mọi desktop (Funput/Funput#341), nhưng trang cài đặt Linux vẫn đặt IBus lên trước ở mọi bảng và mọi khối lệnh.Rà lại trang thì phần biến môi trường mới là chỗ yếu nhất, và nó vừa trở thành bước bắt buộc của đường mặc định. Trang chỉ đưa bộ ba của X11 — bộ đó đúng cho X11, nhưng trang không hề nói phiên Wayland cần thứ khác, mà đó lại là phiên phần lớn người đọc đang dùng: ở Wayland, GTK 3/4 tự đi
text-input-v3, còn đặt cả bộ ở mức global làm nhấp nháy candidate window trên KWin. Trang cũng không có mục Wayland nào.Cùng lượt rà tìm ra vài chỗ khác sai hoặc thiếu.
Thay đổi
Fcitx5 lên trước
funput(Fcitx5) dẫn đầu mọi bảng và khối lệnh;funput-ibusvẫn được ghi đầy đủ ngay bên dưới cho ai đang dùng IBus và không muốn đổi session. Có thêm cảnh báo: trên GNOME/Ubuntu, chọn Fcitx5 nghĩa là phải nối session rồi đăng xuất — cài xong chưa gõ được ngay.Mục biến môi trường viết lại theo upstream
Nguồn: Using Fcitx 5 on Wayland (sửa 20/09/2025) và Setup Fcitx 5.
Mục mới phân nhánh theo loại session trước, desktop sau — đúng thứ tự upstream dùng:
x11XMODIFIERS+GTK_IM_MODULE+QT_IM_MODULEwaylandXMODIFIERS+QT_IM_MODULE; để trốngGTK_IM_MODULE. Qt 6.8.2+ dùngQT_IM_MODULES=wayland;fcitxwaylandXMODIFIERSKèm bảng công cụ theo distro, vì đây là thứ trang hoàn toàn bỏ qua:
im-config -n fcitx5fcitx5-autostart, hoặcim-chooserVà một cảnh báo kiểm chứng trực tiếp trên Ubuntu 26.04:
im-configkhông đặt biến nào trong phiên Wayland —/etc/X11/Xsession.d/70im-config_launchbỏ qua khiXDG_SESSION_TYPE=wayland, còn/etc/profile.d/im-config_wayland.shđược ship ở dạng comment toàn bộ (if false && …). Nênim-config -n fcitx5chỉ có tác dụng cho X11.Thêm bảng nơi đặt biến, vì
environment.dkhông phổ quát như trang cũ ngụ ý — upstream nói nó chỉ được GDM và Plasma 5.22+ đọc, nên~/.bash_profile(mọi DM + đăng nhập TTY) và/etc/profileđược nêu làm phương án. Upstream cũng khuyên khởi động lại máy chứ không chỉ đăng xuất, vì systemd user manager có thể sống sót qua logout.Các lỗi khác đã sửa
.sha256và đưa lệnhsha256sum -c. Không release Linux nào từng có file đó (release.ymlkhông sinh, không đính kèm). Đã bỏ; installer giờ tự verify digest từ release API.fcitx5 -r -d--userfcitx5-diagnose, và một mục cho trường hợp đã thêm Funput nhưng gõ không ăn.Conflicts, hai gói tách file, cùng phụ thuộcfunput-settingsđúng version) và trái với release notes. Sửa thành: cài chung được, mỗi session chỉ bật một..rpmrời sẽ vướng chữ ký — thêm--allow-unsigned-rpmvà ghi chú vì sao.funput-settingsCả hai locale
vivàen.Kiểm thử
](#…)trong cả hai file đều khớp một id có thật ({#bat-bo-go},{#noi-session},{#khong-sudo},{#dat-o-dau}); không dòng nào có ký tự<kiểu JSX ngoài code block.im-config -l→ibus fcitx5 xim; nội dung/usr/share/im-config/data/23_fcitx5.rc; hai hook nói trên;envcủa session cho thấy Ubuntu đã dùngQT_IM_MODULES.CPACK_*trongfcitx5/CMakeLists.txt,ibus/CMakeLists.txt; tên tarball--userđối chiếubuild-linux.yml.pnpm buildchưa chạy — máy dựng không có node/pnpm. Cần chạy trước khi merge để bắt lỗi liên kết mà script soát của tôi không thấy.fcitx5-autostart,im-chooser) lấy nguyên từ wiki upstream, chưa kiểm trên máy Fedora thật.🤖 Generated with Claude Code