rime / home

Rime::Home is home to Rime users and developers
https://rime.im
4.28k stars 231 forks source link

按組合鍵 Ctrl+` 或 F4 鍵不能喚出輸入方案選單 (Ubuntu 22.10)。 #1182

Open hongyi-zhao opened 1 year ago

hongyi-zhao commented 1 year ago

系统信息如下:

werner@X10DAi:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.10
Release:    22.10
Codename:   kinetic

按組合鍵 Ctrl+` 或 F4 鍵不能喚出輸入方案選單,如下所示:

image

不知道这是什么原因。

特此请教! 谢谢。 赵

hongyi-zhao commented 1 year ago

Switch to Xorg fixed this problem, as shown below:

image

See here for the related discussion.

stE-a commented 1 year ago

我也遇到了相似的问题,但是在Xorg下并没有解决: 环境:IBus 1.5.26 Ubuntu 22.04.1 LTS 问题:C+`或F4没有办法唤出输入方案切换的界面;进行配置后不其效果;无论是在英文状态还是中文状态,都输出英文字母。

hongyi-zhao commented 1 year ago

试试 fcitx-rime 看如何。我的说明基于 fcitx-rime

stE-a commented 1 year ago

试试 fcitx-rime 看如何。我的说明基于 fcitx-rime

更换为fcitx-rime或者fcitx5-rime问题和现象不变,没有解决。我从tmp中找到了fcitx-rime的相关报错记录:

Log file created at: 2022/12/15 11:11:15
Running on machine: elsa
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
W1215 11:11:15.048235 32172 registry.cc:16] replacing previously registered component: charset_filter
W1215 11:11:15.049752 32172 config_data.cc:62] nonexistent config file '/home/elsa/.config/fcitx/rime/build/default.yaml'.
W1215 11:11:41.793646 32210 config_data.cc:62] nonexistent config file '/home/elsa/.config/fcitx/rime/user.yaml'.
W1215 11:11:41.794023 32211 config_data.cc:62] nonexistent config file '/home/elsa/.config/fcitx/rime/build/default.yaml'.
W1215 11:11:41.794085 32211 config_data.cc:62] nonexistent config file '/home/elsa/.config/fcitx/rime/default.yaml'.
W1215 11:11:41.794204 32211 config_data.cc:62] nonexistent config file '/home/elsa/.config/fcitx/rime/build/default.yaml'.
W1215 11:11:41.794221 32211 deployment_tasks.cc:185] schema list not defined.
W1215 11:11:41.795655 32210 registry.cc:16] replacing previously registered component: charset_filter
W1215 11:11:41.797291 32210 config_data.cc:62] nonexistent config file '/home/elsa/.config/fcitx/rime/build/default.yaml'.

在~/.config/fcitx/rime中并未找到报错日志中提及的文件

hongyi-zhao commented 1 year ago

解决问题了吗?

stE-a commented 1 year ago

解决问题了吗?

尚未解决。在我的电脑上直接从apt-get获取fcitx-rimefcitx5-rimeibus-rime,都会缺失配置文件。

hongyi-zhao commented 1 year ago
  1. 我的配置文件在这里:
werner@X10DAi:~$ ls ~/.local/share/fcitx5/rime/
bopomofo_express.schema.yaml  luna_pinyin.userdb
build                         luna_quanpin.schema.yaml
cangjie5.dict.yaml            pinyin_simp.userdb
cangjie5_express.schema.yaml  plum
cangjie5.schema.yaml          punctuation.yaml
default.custom.yaml           stroke.dict.yaml
default.yaml                  stroke.schema.yaml
essay.txt                     stroke.userdb
installation.yaml             symbols.yaml
key_bindings.yaml             terra_pinyin.dict.yaml
luna_pinyin.custom.yaml       trash
luna_pinyin.dict.yaml         user.yaml
luna_pinyin_simp.schema.yaml  zhwiki.dict.yaml
luna_pinyin_tw.schema.yaml    zhwiki.userdb
  1. 这些文件并不都是默认提供的。有的需要自己添加。
  2. 相关变量参考:
werner@X10DAi:~/Public/repo/github.com/rime/plum.git$ ug .local/share
README.md:rime_dir="$HOME/./local/share/fcitx5/rime" bash rime-install
package/felixonmars/fcitx5-pinyin-zhwiki/README:Copy into ~/.local/share/fcitx5/pinyin/dictionaries/ (create the folder if it does not exist)
scripts/frontend.sh:            export rime_dir="$HOME/.local/share/fcitx5/rime"

另外的相关参考: https://github.com/rime/plum/issues/40

stE-a commented 1 year ago

我参照了你的配置方法,进行了配置,这是我现在的配置文件目录:

build                            luna_pinyin.dict.yaml
default.custom.yaml              luna_pinyin_fluency.schema.yaml
default.yaml                     luna_pinyin.schema.yaml
double_pinyin_abc.schema.yaml    luna_pinyin_simp.schema.yaml
double_pinyin_flypy.schema.yaml  luna_pinyin_tw.schema.yaml
double_pinyin_mspy.schema.yaml   luna_quanpin.schema.yaml
double_pinyin_pyjj.schema.yaml   pinyin.yaml
double_pinyin.schema.yaml        punctuation.yaml
installation.yaml                symbols.yaml
key_bindings.yaml                sync

我进行了fcitx的缓存数据的刷新和系统的重启,但是问题依然没有解决。

hongyi-zhao commented 1 year ago

实际上,我所使用的 rime 是我从 github 源码编译的,过程非常繁琐。但是,即使如此,我仍然需要一些系统包作为辅助,才能正常使用。

下面是我目前的一些经验,供参考:

1. 首先安装 language-pack-*相关的包:
$ gnome-language-selector
$ apt-cache pkgnames |grep language-pack
$ dpkg -l |grep language-pack

2. 
#https://unix.stackexchange.com/questions/465452/switch-to-another-input-method
#https://askubuntu.com/questions/472562/how-to-change-keyboard-input-method-system-to-none-in-ubuntu-gnome

The input method used (IM) is actually set in ~/.xinputrc.

Run the command im-config to choose your input method.

Or maybe simply add manually run_im ibus inside your ~/.xinputrc : It is what im-config is doing.
Of course you need to restart X.

3. 即使自己从源码编译安装,仍然至少需要安装 下面的 fcitx 包:
$ sudo apt install fcitx5-rime fcitx5-config-qt fcitx
stE-a commented 1 year ago

实际上,我所使用的 rime 是我从 github 源码编译的,过程非常繁琐。但是,即使如此,我仍然需要一些系统包作为辅助,才能正常使用。

下面是我目前的一些经验,供参考:

1. 首先安装 language-pack-*相关的包:
$ gnome-language-selector
$ apt-cache pkgnames |grep language-pack
$ dpkg -l |grep language-pack

2. 
#https://unix.stackexchange.com/questions/465452/switch-to-another-input-method
#https://askubuntu.com/questions/472562/how-to-change-keyboard-input-method-system-to-none-in-ubuntu-gnome

The input method used (IM) is actually set in ~/.xinputrc.

Run the command im-config to choose your input method.

Or maybe simply add manually run_im ibus inside your ~/.xinputrc : It is what im-config is doing.
Of course you need to restart X.

3. 即使自己从源码编译安装,仍然至少需要安装 下面的 fcitx 包:
$ sudo apt install fcitx5-rime fcitx5-config-qt fcitx

谢谢,我从新配置了一遍,问题已经解决。

hongyi-zhao commented 1 year ago
  1. 你的实际问题出在哪里?
  2. 你最终的步骤是什么?

可以总结在这里以供他人参考吗?

stE-a commented 1 year ago

1.问题源头:从ubuntu apt上安装好后,rime并未给全所有的配置文件,导致了按下C+``或F4`并无反应。 2.解决步骤:

a.下载plum并运行如下命令(本人使用fcitx):
    rime_frontend=fcitx-rime bash rime-install prelude
    rime_frontend=fcitx-rime bash rime-install luna-pinyin    等命令
b.注销系统或重启fcitx
hongyi-zhao commented 1 year ago

最近的经历表明,这个问题的根本解决方法可能如下(任选下面方法之一):

  1. rm ~/.xinputrc

  2. 运行im-config生成如下的配置:

    
    werner@X10DAi:~$ im-config
    werner@X10DAi:~$ cat .xinputrc 
    # im-config(8) generated on Tue, 31 Jan 2023 19:13:46 +0800
    run_im fcitx
    # im-config signature: d4d881a4f97bccebfbe7d8202bbed29a  -
3. 删除`fcitx-module-kimpanel`包:

$ sudo apt remove fcitx-module-kimpanel



然后,注销用户(Log Out) ,重新登录。

相关参考:
https://blog.csdn.net/liusf1993/article/details/84069010
https://blog.csdn.net/Mr_kanger/article/details/110090158
hongyi-zhao commented 1 year ago

It turns out that the above description is not correct. Instead, the following operation will trigger the problem discussed here: Before logging in to the desktop, start a terminal console with Ctrl + Alt + F2, and then log in to the desktop as usual. It's not clear why. See here for the related discussion.

Fros1er commented 1 month ago

最近的经历表明,这个问题的根本解决方法可能如下(任选下面方法之一):

  1. rm ~/.xinputrc
  2. 运行im-config生成如下的配置:
werner@X10DAi:~$ im-config
werner@X10DAi:~$ cat .xinputrc 
# im-config(8) generated on Tue, 31 Jan 2023 19:13:46 +0800
run_im fcitx
# im-config signature: d4d881a4f97bccebfbe7d8202bbed29a  -
  1. 删除fcitx-module-kimpanel包:
$ sudo apt remove fcitx-module-kimpanel

然后,注销用户(Log Out) ,重新登录。

相关参考: https://blog.csdn.net/liusf1993/article/details/84069010 https://blog.csdn.net/Mr_kanger/article/details/110090158

感谢。我在ubuntu 24.04安装ibus-rime后,只能输出英文并无法唤出选单,最后发现.xinputrc中内容为run_im fcitx。运行im-config并选择ibus后.xinputrc内容变为run_im ibus,重新登录后问题解决。没有删除fcitx相关包。

hongyi-zhao commented 1 month ago

我目前的OS如下:

werner@x13dai-t:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

使用 fcitx5-rime 后没有再遇到这里讨论的问题。