Ubuntu20.04 安装fcitx5输入法

本文详细介绍了在Ubuntu20.04.3上通过flatpak安装和配置FCITX5输入法,包括添加flatpak仓库、安装fcitx5及其后端、设置环境变量、自定义主题以及解决特定软件如IntelliJ的兼容问题。
摘要由CSDN通过智能技术生成

ubuntu 20.04.3下fcitx5 需要从flatpak安装,(由于qt版本,fcitx5-config只能安装在20.10上),中间出了各种问题,最后发现以下解决方案最好:

安装flatpak

(建议使用官方ppa,版本较新)

1
2
3
4
5
sudo add-apt-repository ppa:flatpak/stable
sudo apt update
sudo apt install flatpak
sudo apt install gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

reboot

安装fcitx5

添加 flatub 仓库,

1
2
3
4
# 添加 flatub 仓库, fcitx5-unstable 也会依赖一些这个仓库中的运行时软件包。
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# 可选部分: 如果你想要使用不稳定版本的fcitx5,也可以添加 fcitx5 非稳定仓库。
# flatpak remote-add --user --if-not-exists fcitx5-unstable https://flatpak.fcitx-im.org/unstable-repo/fcitx5-unstable.flatpakrepo

从flatpak安装fcitx

1
2
3
4
5
# 如果您使用的是旧版flatpak,在安装的时候会需要显示的指定软件仓库名字: flatpak install flathub org.fcitx.Fcitx5
flatpak install org.fcitx.Fcitx5
# 安装 fcitx5 输入法引擎, 例如fcitx5-chinese-addons, or mozc
flatpak install org.fcitx.Fcitx5.Addon.ChineseAddons # 中文输入法
# flatpak install org.fcitx.Fcitx5.Addon.Mozc			 # 日文输入法

安装ficitx5后端

1
sudo apt install fcitx5-frontend-gtk2 fcitx5-frontend-gtk3 fcitx5-frontend-qt5

之后从应用中打开fcitx5, 就可以愉快的使用了! (需要使用配置添加简体中文的拼音)

配置环境变量:(通用办法)

1
sudo vi /etc/profile
1
2
3
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx

reboot

在gnome-tweak中设置开机启动

配置fcitx5

安装自定义主题

Adwaita-dark

1
git clone https://github.com/escape0707/fcitx5-adwaita-dark.git ~/.local/share/fcitx5/themes/adwaita-dark

之后在fcitx5设置界面中切换

安装词库

萌娘百科词库

维基百科词库

下载*.dict文件, 放置到 ~/.local/share/fcitx5/pinyin/dictionaries

一些bug的解决

IntelliJ 系列软件的 IDE 中输入框位置不正确

此问题的根本原因是 IDE 附带的 JBR 不正确,要处理此问题,需要:

  1. 前往 Releases · RikudouPatrickstar/JetBrainsRuntime-for-Linux-x64 · GitHub 下载 jbr 并解压到任意路径
  2. 按照 此指导 更改 IDE 的 JBR
    1. ctrl+shift+A , 输入 Choose Boot Java Runtime for the IDE
    2. 选择Add Custom Runtime option
    3. 选择解压出的文件夹

参考链接:

fcitx5官网

安装fcitx5

如何现在就在 Ubuntu 20.04 下用上 Fcitx 5.0.2

fcitx5 archwiki

  • 19
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
要在Ubuntu 20.04安装fcitx中文输入法,您可以按照以下步骤进行操作: 1. 打开终端,并执行以下命令以安装Fcitx框架和相应的中文输入法: ``` sudo apt-get update sudo apt-get install fcitx fcitx-googlepinyin fcitx-config-gtk ``` \[1\] 2. 加入key到系统并注入官网地址: ``` sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/ sudo sh -c 'echo "deb \[arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg\] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' ``` \[2\] 3. 卸载snap版本的VS Code(如果已经安装了): ``` sudo snap remove code ``` 4. 安装官方版本的VS Code: - 首先,下载key: ``` curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg ``` \[3\] - 然后,安装key: ``` sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/ ``` - 最后,安装VS Code: ``` sudo apt-get update sudo apt-get install code ``` 这样,您就可以在Ubuntu 20.04安装fcitx中文输入法和VS Code了。请按照上述步骤操作,如果有任何问题,请随时向我提问。 #### 引用[.reference_title] - *1* [如何在ubuntu20.04安装中文输入法](https://blog.csdn.net/k1419197516/article/details/129579921)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [Ubuntu 20.04安装fcitx中文输入法(五笔拼音)并解决VScode无法输入中文的问题](https://blog.csdn.net/weixin_42228294/article/details/120715073)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhengddzz

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值