Ubuntu安装Fcitx以及Fcitx输入中文不显示候选词框的解决办法

1. 安装Fcitx

安装Fcitx所需组件
<code class="hljs lasso has-numbering" style="display: block; padding: 0px; background: transparent; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal;">$ sudo apt install fcitx fcitx<span class="hljs-attribute" style="box-sizing: border-box;">-tools</span> fcitx<span class="hljs-attribute" style="box-sizing: border-box;">-config</span><span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">*</span> fcitx<span class="hljs-attribute" style="box-sizing: border-box;">-frontend</span><span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">*</span> fcitx<span class="hljs-attribute" style="box-sizing: border-box;">-module</span><span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">*</span> fcitx<span class="hljs-attribute" style="box-sizing: border-box;">-ui</span><span class="hljs-subst" style="color: rgb(0, 0, 0); box-sizing: border-box;">-*</span> presage</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; opacity: 0.0896013;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>
移除多余的组件(仅针对非KDE桌面)

因为上面的安装命令为了方便使用了通配符安装,所以会多安装一个fcitx-module-kimpanel,这个组件可能导致在非KDE桌面环境下Fcitx输入中文时不显示候选词框,如果是KDE桌面则无需移除。

<code class="hljs ruby has-numbering" style="display: block; padding: 0px; background: transparent; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal;"><span class="hljs-variable" style="color: rgb(102, 0, 102); box-sizing: border-box;">$ </span>sudo apt remove fcitx-<span class="hljs-class" style="box-sizing: border-box;"><span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">module</span>-<span class="hljs-title" style="box-sizing: border-box; color: rgb(102, 0, 102);">kimpanel</span></span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; opacity: 0.0896013;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>
根据需要安装一个或多个输入法
<code class="hljs bash has-numbering" style="display: block; padding: 0px; background: transparent; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal;">$ <span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">sudo</span> apt install fcitx-pinyin            <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;"># 拼音</span>
$ <span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">sudo</span> apt install fcitx-sunpinyin         <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;"># sun拼音</span>
$ <span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">sudo</span> apt install fcitx-googlepinyin      <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;"># google拼音</span>
$ <span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">sudo</span> apt install fcitx-table-wubi-large  <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;"># 五笔</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; opacity: 0.0896013;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li></ul>

2. Fcitx输入中文时不显示候选词框的解决办法

如上所述,在非KDE桌面环境下,如果安装了fcitx-module-kimpanel,可能会导致Fcitx输入中文时不显示候选词框,移除该组件,然后重启Fcixt。

<code class="hljs ruby has-numbering" style="display: block; padding: 0px; background: transparent; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal;"><span class="hljs-variable" style="color: rgb(102, 0, 102); box-sizing: border-box;">$ </span>sudo apt remove fcitx-<span class="hljs-class" style="box-sizing: border-box;"><span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">module</span>-<span class="hljs-title" style="box-sizing: border-box; color: rgb(102, 0, 102);">kimpanel</span></span></code>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值