linux 效率化 - 输入法 - fcitx5

安装 Fcitx5

1. 卸载 ibus 框架

由于 ibus 和 fcitx 可能会冲突,先卸载 ibus(暂未确认原因)

bash 复制代码
sudo apt remove --purge ibus

2. 安装 fcitx5 输入法框架

bash 复制代码
sudo apt update
sudo apt install fcitx5 fcitx5-chinese-addons fcitx5-frontend-gtk4 fcitx5-frontend-gtk3 fcitx5-frontend-gtk2 fcitx5-frontend-qt5   fcitx5-rime

有待确认 sudo apt install fcitx5 会安装哪些包

3. 配置输入法环境变量

应用请求输入时候应该启用哪个输入法框架

新建文件配置文件 ~/.pam_environment 内容如下:

bash 复制代码
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
INPUT_METHOD=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=fcitx

4. 配置系统输入法框架为 fcitx5

bash 复制代码
im-config -n fcitx5

5. 配置输入法开机自启动

这里使用 Gnome 的启动应用程序设置

  1. Alt + F2,输入 gnome-session-properties,回车。
  2. 在启动程序列表中,点击 添加。
  3. 在 名称 中输入 Fcitx5,在 命令 中输入 fcitx5
  4. 点击 添加,然后关闭对话框。

6. 注销重新登陆

正常的话右上角应该出现了输入法图标,如果有问题可以 fcitx5-diagnose 查看诊断信息进行修复

输入法使用优化

  • 安装中文词库

词库位置:~/.local/share/fcitx5/pinyin/dictionaries/

bash 复制代码
wget https://github.com/felixonmars/fcitx5-pinyin-zhwiki/releases/download/0.2.4/zhwiki-20220416.dict
# 创建存储目录
mkdir -p ~/.local/share/fcitx5/pinyin/dictionaries/
# 移动词库文件至该目录
mv zhwiki-20220416.dict ~/.local/share/fcitx5/pinyin/dictionaries/
  • 安装主题

主题位置:~/.local/share/fcitx5/themes

官方的皮肤:

bash 复制代码
sudo apt-get install fcitx5-material-color

github 上做的不错的皮肤:
https://github.com/sxqsfun/fcitx5-sogou-themes

bash 复制代码
git clone https://github.com/sxqsfun/fcitx5-sogou-themes.git
#  fcitx5-sogou-themes 文件夹下的所有子文件夹(不包含 .git 和 readme.md)复制到 /home/huan/.local/share/fcitx5/themes 目录中
rsync -av --exclude='.git' --exclude='readme.md' fcitx5-sogou-themes/ /home/huan/.local/share/fcitx5/themes/

常用的配置

  • 是否显示预编辑文本
    快捷键 ctrl + alt + p

配置文件:~/.config/fcitx5/config

相关推荐
Maple_land8 分钟前
Linux进程第八讲——进程状态全景解析(二):从阻塞到消亡的完整生命周期
linux·运维·服务器·c++·centos
嵌入式分享10 分钟前
嵌入式分享#41:RK3576改UART波特率【精简版】
linux·嵌入式硬件·ubuntu·嵌入式
爱吃生蚝的于勒13 分钟前
【Linux】零基础学会Linux之权限
linux·运维·服务器·数据结构·git·算法·github
惜.己20 分钟前
linux中jenkins正常启动外部无法访问
linux·servlet·jenkins
Cyan_RA932 分钟前
Linux 远程Ubuntu服务器本地部署大模型 EmoLLM 中常见的问题及解决方案 万字详解
linux·运维·服务器·ubuntu·大模型·远程部署·emollm
minji...44 分钟前
Linux相关工具vim/gcc/g++/gdb/cgdb的使用详解
linux·运维·服务器·c++·git·自动化·vim
web安全工具库1 小时前
Linux 高手进阶:Vim 核心模式与分屏操作详解
linux·运维·服务器·前端·数据库
egoist20231 小时前
[linux仓库]信号产生[进程信号·贰]
linux·键盘·系统调用·信号产生·软件条件
河藕Hou2 小时前
Linux - 磁盘/逻辑卷的分区&格式化&挂载
linux
半桔2 小时前
【网络编程】网络通信基石:从局域网到跨网段通信原理探秘
linux·运维·网络协议·php