Fedora配置Rime中州韵输入法
<p>在<code>Linux</code>系统上安装<code>Rime</code>输入法,常见的有两种底层框架:<code>ibus</code>和<code>fcitx</code>。</p><h1 id="选择ibus">选择ibus</h1>
<p>在Fedora系统中,默认安装了<code>ibus</code>,因此只需要再配置<code>ibus-rime</code>:</p>
<pre><code class="language-bash">sudo dnf install ibus-rime
</code></pre>
<h2 id="配置ibus">配置ibus</h2>
<p>编辑<code>/etc/profile</code>(影响所有用户,需要<code>sudo</code>权限)或者<code>~/.xprofile</code>(仅影响当前用户)【如果使用<code>bash</code>作为默认<code>shell</code>,还可以编辑<code>~/.bash_profile</code>】,在文件新增:</p>
<pre><code class="language-bash">export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
</code></pre>
<h2 id="配置ibus-rime">配置ibus-rime</h2>
<p>系统<strong>设置-键盘-输入源-添加输入源-汉语(中国)-中文(Rime)</strong>,将<code>Rime</code>输入法添加到输入源中。</p>
<h1 id="选择fcitx">选择fcitx</h1>
<h2 id="安装fcitx5">安装fcitx5</h2>
<pre><code class="language-bash">sudo dnf install fcitx5 fcitx5-chinese-addons
</code></pre>
<p>很多教程上让安装<code>fcitx5-gtk</code>和<code>fcitx5-qt</code>,但是目前<code>dnf</code>在安装<code>fcitx5</code>时会自动安装这两个包。</p>
<h2 id="安装fcitx5-rime">安装fcitx5-rime</h2>
<pre><code class="language-bash">sudo dnf install fcitx5-rime
</code></pre>
<h2 id="配置fcitx5">配置fcitx5</h2>
<p>编辑<code>/etc/profile</code>(影响所有用户,需要<code>sudo</code>权限)或者<code>~/.xprofile</code>(仅影响当前用户)【如果使用<code>bash</code>作为默认<code>shell</code>,还可以编辑<code>~/.bash_profile</code>】,在文件新增:</p>
<pre><code class="language-bash">export XMODIFIERS=@im=fcitx5
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
</code></pre>
<h2 id="配置fcitx5-rime">配置fcitx5-rime</h2>
<p>打开<code>fcitx5</code>配置或者执行<code>fcitx5-configtool</code>,从左侧删除“拼音”方案,并将右侧的“rime”(或者是“中州韵”)方案添加到左侧。</p>
<h1 id="导入rime拼音方案">导入Rime拼音方案</h1>
<ul>
<li>如果选择了<code>ibus</code>,那么配置文件夹为<code>~/.config/ibus/rime/</code></li>
<li>如果选择了<code>fcitx</code>,那么配置文件夹为<code>~/.local/share/fcitx5/rime/</code></li>
</ul>
<blockquote>
<p>建议先备份原配置文件再导入。</p>
</blockquote>
<p>选择并执行下列三种方案中的一种(其他拼音方案请独自查询并clone)【请注意最后的<strong>点<code>.</code></strong>】。</p>
<blockquote>
<p>下载结束后<code>rime</code>文件夹下<strong>直接</strong>就是配置文件,没有其他的任何中间的文件夹。</p>
</blockquote>
<h2 id="雾凇拼音">雾凇拼音</h2>
<pre><code class="language-bash">git clone https://github.com/iDvel/rime-ice.git .
</code></pre>
<h2 id="薄荷拼音">薄荷拼音</h2>
<pre><code class="language-bash">git clone https://github.com/Mintimate/oh-my-rime.git .
</code></pre>
<h2 id="四叶草拼音">四叶草拼音</h2>
<pre><code class="language-bash">git clone https://github.com/fkxxyz/rime-cloverpinyin.git .
</code></pre>
<h1 id="重启或注销系统">重启或注销系统</h1>
<p>配置完成后重启系统即可使用。</p>
<h1 id="使用异常">使用异常</h1>
<h2 id="ibus输入框位置偏移">ibus输入框位置偏移</h2>
<p>在使用过程中,出现<code>ibus</code>输入法的输入框严重偏移的问题,目前解决方案未知,但是,修改<code>/etc/profile</code>为:</p>
<pre><code class="language-bash">export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
</code></pre>
<p>可以<strong>部分</strong>解决偏移的问题。</p>
<blockquote>
<p>如果修改<code>XMODIFIERS=@im=fcitx</code>,可能会导致部分软件无法输入中文。</p>
</blockquote>
<h2 id="fcitx5中文输入框闪烁">fcitx5中文输入框闪烁</h2>
<p>这是<code>Gnome</code>桌面下的bug,目前没有有效解决方案。</p><br><br>
来源:https://www.cnblogs.com/bearpipy/p/18364767
頁:
[1]