[Share Experiences] deepin正式版/uos家庭版安装fcitx5
Tofloor
poster avatar
安洛
deepin
2021-07-26 03:41
Author

deepin测试版终于支持fcitx5了,看见大佬们都用上了fcitx5,我也很馋,所以尝试了在uos家庭版安装了fcitx5。

该方法在uos家庭版测试通过,应该也支持deepin。uos需要开启开发者模式。该方法使用flatpak安装fcitx5,如果你之前没有用flatpak安装过kde系的软件的话,可能需要占用不少空间(800M左右),如果用flatpak装过kde系的软件则只需要50M不到。(其实就是依赖问题)

首先安装flatpak

sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

重启计算机

卸载fcitx:

sudo apt remove fcitx

有坛友反映需要还卸载fcitx-bin,如果你出现了重启后任务栏依然有旧fcitx图标的问题,可以尝试。

此处注意,因为我们还要用到fcitx的im模块,所以不要卸载fcitx*,只卸载fcitx就好了。

安装fcitx5和拼音输入法:

flatpak install org.fcitx.Fcitx5 org.fcitx.Fcitx5.Addon.ChineseAddons

设置环境变量。这里archwiki推荐的是在~/.pam_environment设置,深度论坛里面提到是在/etc/environment设置。这里依照论坛的方法。

编辑/etc/environment,文末添加:

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE DEFAULT=fcitx

将fcitx5添加开机自启动。在启动器里面找到fcitx5,右键添加开机自启动即可。

重启计算机。

Reply Favorite View the author
All Replies
SamLukeYes
deepin
2021-07-26 04:19
#1

.pam_environment 是一个由于安全漏洞已经被上游弃用的东西,Arch 出于某些原因在打包 pam 的时候仍然默认开启了读取 .pam_environment 的功能,在其他发行版上就不一定适用了,Arch 以后可能也会弃用

Reply View the author
APU
deepin
2021-07-26 06:03
#2

不错,实测可用

Reply View the author
箫声缘
deepin
2021-07-26 18:34
#3

按照以上操作步骤来安装fcitx5在任务栏显示两个输入法图标如何取消以前的输入法图标:

Reply View the author
sgb76
deepin
2021-07-26 19:44
#4

感谢分享

Reply View the author
安洛
deepin
2021-07-26 20:04
#5
箫声缘

按照以上操作步骤来安装fcitx5在任务栏显示两个输入法图标如何取消以前的输入法图标:

你是不是没有卸载fcitx?

sudo apt remove fcitx fcitx5

另外如果有安装fcitx下的输入法,例如搜狗之类的,最好也卸载了。

Reply View the author
今风
deepin
2021-07-26 22:22
#6

我的安装成功,任务栏也有图标,但点击输入法配置没反应,无法添加输入法。

Reply View the author
安洛
deepin
2021-07-27 03:30
#7
今风

我的安装成功,任务栏也有图标,但点击输入法配置没反应,无法添加输入法。

任务栏图标长啥样?确定是flatpak的fcitx5吗?如果是apt的fcitx5会有这样的问题。

Reply View the author
kingskill
deepin
2021-07-27 08:01
#8

king@king-PC:~$  flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

 

Note that the directories 

 

'/var/lib/flatpak/exports/share'

'/home/king/.local/share/flatpak/exports/share'

 

are not in the search path set by the XDG_DATA_DIRS environment variable, so

applications installed by Flatpak may not appear on your desktop until the

session is restarted.

 

Can't load uri https://flathub.org/repo/flathub.flatpakrepo: Could not connect: 拒绝连接

Reply View the author
kingskill
deepin
2021-07-27 08:47
#9
安洛

你是不是没有卸载fcitx?

sudo apt remove fcitx fcitx5

另外如果有安装fcitx下的输入法,例如搜狗之类的,最好也卸载了。

已经卸载了 。。。但每次重启还是两个,以前那个并没有卸载干净。。。怎么才能卸载干净?每次启动都两个,很烦。。。

Reply View the author
kingskill
deepin
2021-07-27 10:25
#10

刚刚用笨办法试了一下,需要remove 掉 fcitx-bin这个,就不会有之前那个fcitx图标了。不过不清楚这么做有什么其他不太好的地方。。。

Reply View the author
安洛
deepin
2021-07-27 18:56
#11
kingskill

king@king-PC:~$  flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

 

Note that the directories 

 

'/var/lib/flatpak/exports/share'

'/home/king/.local/share/flatpak/exports/share'

 

are not in the search path set by the XDG_DATA_DIRS environment variable, so

applications installed by Flatpak may not appear on your desktop until the

session is restarted.

 

Can't load uri https://flathub.org/repo/flathub.flatpakrepo: Could not connect: 拒绝连接

连接不到flathub官方源。可以尝试上海交大镜像:

sudo flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub
Reply View the author
安洛
deepin
2021-07-27 18:57
#12
kingskill

刚刚用笨办法试了一下,需要remove 掉 fcitx-bin这个,就不会有之前那个fcitx图标了。不过不清楚这么做有什么其他不太好的地方。。。

理论上只要留着fcitx-modules就行了。但是为了保险,少移除一个是一个吧。只要能输入就没问题,本来也不用fcitx,只是用它的框架而已。

Reply View the author
xxtwocy
deepin
2021-07-30 05:02
#13

实测,卸载fcitx-bin后会导致fcitx5无法使用。

可以开机后打开系统监视器,找到fcitx输入法进程打开文件位置,只讲将其删除,重启后即保证了fcitx5的正常使用。

而且还消除了两个托盘图标的问题

Reply View the author
Hibanaw
deepin
2021-08-03 05:19
#14
xxtwocy

实测,卸载fcitx-bin后会导致fcitx5无法使用。

可以开机后打开系统监视器,找到fcitx输入法进程打开文件位置,只讲将其删除,重启后即保证了fcitx5的正常使用。

而且还消除了两个托盘图标的问题

我的环境下移除fcitx-bin是没有问题的

而且按理说这个fcitx5是用flatpak安装的,应该不会依赖到系统内的其他应用吧

Reply View the author
安洛
deepin
2021-08-03 05:57
#15
Hibanaw

我的环境下移除fcitx-bin是没有问题的

而且按理说这个fcitx5是用flatpak安装的,应该不会依赖到系统内的其他应用吧

没有强制要求依赖什么,但是输入模块没法打包进flatpak,所以要调用系统的输入模块,否则虽然程序能运行,但是没法正常输入。这里输入模块用fcitx,ibus,xim都是可以的,只是和fcitx兼容性最好,所以我这里选择了fcitx。如果不想用fcitx输入模块,你可以卸载所有fcitx组件,然后用xim.把上面的环境变量改成xim即可,兼容性很差就是了。

Reply View the author
Hibanaw
deepin
2021-08-03 06:35
#16
安洛

没有强制要求依赖什么,但是输入模块没法打包进flatpak,所以要调用系统的输入模块,否则虽然程序能运行,但是没法正常输入。这里输入模块用fcitx,ibus,xim都是可以的,只是和fcitx兼容性最好,所以我这里选择了fcitx。如果不想用fcitx输入模块,你可以卸载所有fcitx组件,然后用xim.把上面的环境变量改成xim即可,兼容性很差就是了。

哦哦,了解了

Reply View the author
zccrs
deepin
2021-09-27 22:39
#17

fcitx5 好用吗?

Reply View the author
安洛
deepin
2021-09-28 05:58
#18
zccrs

fcitx5 好用吗?

deepin最新正式版源里已经有fcitx5了。

我们说的fcitx5通常指的是fcitx5 libpinyin。如果是fcitx5框架下的其他输入法,那就只是速度改进和bug减少。

fcitx5 libpinyin有多好,网络上一搜一大把了不用我来吹。功能上比大多数开源的输入法例如sunpinyin、ibuslibpinyin、fcitxlibpinyin都要丰富,支持搜狗细胞词库、云拼音和emoji。bug少,速度又比迅飞、搜狗之类的快。

Reply View the author
suibian555
deepin
2021-10-09 06:58
#19

Error: Can't create temporary directory

error: Failed to install org.kde.Platform: Can't create temporary directory

这是啥情况啊

 

Reply View the author
MESOLONELY
deepin
2022-01-14 22:13
#20
suibian555

Error: Can't create temporary directory

error: Failed to install org.kde.Platform: Can't create temporary directory

这是啥情况啊

 

Try su

Reply View the author