vnotex / vnote

A pleasant note-taking platform in native C++.
https://app.vnote.fun
GNU Lesser General Public License v3.0
11.82k stars 1.22k forks source link

最新版不能输入中文 #1787

Closed imic07 closed 3 years ago

imic07 commented 3 years ago

Describe the bug 最新版不能输入中文。版本:3.2.0 系统manjaro kde 输入法fcitx5

To Reproduce Steps to reproduce the behavior:

  1. 打开vnote-linux-x64_v3.2.0.AppImage 切换中文输入法失败

Expected behavior 能输入中文

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context 查看vnote日志:

Warning:(:0) Skipping "/usr/share/org.kde.syntax-highlighting/syntax/jira.xml" due to being too new, version: "5.79"
Warning:(:0) Skipping "/usr/share/org.kde.syntax-highlighting/syntax/varnishtest.xml" due to being too new, version: "5.79"
Warning:(:0) Skipping "/usr/share/org.kde.syntax-highlighting/syntax/zsh.xml" due to being too new, version: "5.79"
Warning:(:0) Skipping "/usr/share/org.kde.syntax-highlighting/syntax/rhtml.xml" due to being too new, version: "5.63"
Warning:(:0) Skipping "/usr/share/org.kde.syntax-highlighting/syntax/kconfig.xml" due to being too new, version: "5.74"
Warning:(:0) Skipping "/usr/share/org.kde.syntax-highlighting/syntax/jam.xml" due to being too new, version: "5.79"
Info:(thememgr.cpp:91) using theme "pure"
Warning:(:0) No language dictionaries for the language: "zh_CN" trying to load en_US as default
Warning:(:0) QXcbConnection: XCB error: 3 (BadWindow), sequence: 1228, resource id: 16778031, major code: 40 (TranslateCoords), minor code: 0
Info:(singleinstanceguard.cpp:139) local server receives new connect QLocalSocket(0x5595922698b0)
Info:(singleinstanceguard.cpp:139) local server receives new connect QLocalSocket(0x7f3fd8012040)

但是我是有中文的

[imic@imic swu]$ locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8
tamlok commented 3 years ago

https://github.com/vnotex/vnote/issues?q=is%3Aissue+is%3Aclosed+fcitx

fcitx-diagnose诊断一下。

imic07 commented 3 years ago

https://github.com/fcitx/fcitx/edit/master/data/script/fcitx-diagnose.sh @tamlok

[imic@imic sm]$ ./fcitx-diagnose.sh 
# System Info:
1.  `uname -a`:

        Linux imic 5.10.41-1-MANJARO #1 SMP PREEMPT Fri May 28 19:10:32 UTC 2021 x86_64 GNU/Linux

2.  `lsb_release -a`:

        LSB Version:    n/a
        Distributor ID: ManjaroLinux
        Description:    Manjaro Linux
        Release:        21.0.6
        Codename:       Ornara

3.  `lsb_release -d`:

        Description:    Manjaro Linux

4.  `/etc/lsb-release`:

        DISTRIB_ID=ManjaroLinux
        DISTRIB_RELEASE=21.0.6
        DISTRIB_CODENAME=Ornara
        DISTRIB_DESCRIPTION="Manjaro Linux"

5.  `/etc/os-release`:

        NAME="Manjaro Linux"
        ID=manjaro
        ID_LIKE=arch
        BUILD_ID=rolling
        PRETTY_NAME="Manjaro Linux"
        ANSI_COLOR="32;1;24;144;200"
        HOME_URL="https://manjaro.org/"
        DOCUMENTATION_URL="https://wiki.manjaro.org/"
        SUPPORT_URL="https://manjaro.org/"
        BUG_REPORT_URL="https://bugs.manjaro.org/"
        LOGO=manjarolinux

6.  Desktop Environment:

    Desktop environment is `kde`.

7.  Bash Version:

        BASH_VERSION='5.1.8(1)-release'

# Environment:
1.  DISPLAY:

        DISPLAY=':0'

2.  Keyboard Layout:

    1.  `setxkbmap`:

            xkb_keymap {
                xkb_keycodes  { include "evdev+aliases(qwerty)" };
                xkb_types     { include "complete"      };
                xkb_compat    { include "complete"      };
                xkb_symbols   { include "pc+cn+inet(evdev)"     };
                xkb_geometry  { include "pc(pc105)"     };
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "cn", "", ""

3.  Locale:

    1.  All locale:

            C
            en_US.utf8
            POSIX
            zh_CN.utf8

    2.  Current locale:

            LANG=zh_CN.UTF-8
            LC_CTYPE="zh_CN.UTF-8"
            LC_NUMERIC="zh_CN.UTF-8"
            LC_TIME="zh_CN.UTF-8"
            LC_COLLATE="zh_CN.UTF-8"
            LC_MONETARY="zh_CN.UTF-8"
            LC_MESSAGES="zh_CN.UTF-8"
            LC_PAPER="zh_CN.UTF-8"
            LC_NAME="zh_CN.UTF-8"
            LC_ADDRESS="zh_CN.UTF-8"
            LC_TELEPHONE="zh_CN.UTF-8"
            LC_MEASUREMENT="zh_CN.UTF-8"
            LC_IDENTIFICATION="zh_CN.UTF-8"
            LC_ALL=zh_CN.UTF-8

4.  Directories:

    1.  Home:

            /home/imic

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is not set.

        Current value of `XDG_CONFIG_HOME` is `~/.config` (`/home/imic/.config`).

    3.  Fcitx Settings Directory:

        Current fcitx settings directory is `~/.config/fcitx` (`/home/imic/.config/fcitx`).

5.  Current user:

    The script is run as imic (1000).

# Fcitx State:
1.  executable:

    **Cannot find fcitx executable!**
    **Please check [Beginner's Guide](http://fcitx-im.org/wiki/Beginner%27s_Guide) for how to install fcitx.**
imic07 commented 3 years ago

我是这样安装的

fcitx5输入法安装

卸载fcitx以及其他依赖,例如

sudo pacman -Rc fcitx
安装

sudo pacman -S fcitx5 fcitx5-chinese-addons fcitx5-qt kcm-fcitx5 fcitx5-im
配置模块,通过配置模块可以在线导入搜狗输入法词库

配置(原本有可以忽略) 安装完成后,编辑.xprofile配置文件。如果没有该文件,可手动创建一个。

kate ~/.xprofile

fcitx
export LC_ALL=zh_CN.UTF-8
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export XMODIFIERS=@im=fcitx
fcitx5 &

=========================== fcitx确实没有,但是有fcitx5

[imic@imic sm]$ fcitx
bash: fcitx:未找到命令
[imic@imic sm]$ fcitx5
I2021-06-09 13:52:37.603249 instance.cpp:1371] Override Enabled Addons: {}
I2021-06-09 13:52:37.603328 instance.cpp:1372] Override Disabled Addons: {}
I2021-06-09 13:52:37.609152 addonmanager.cpp:189] Loaded addon wayland
I2021-06-09 13:52:37.613904 addonmanager.cpp:189] Loaded addon xcb
imic07 commented 3 years ago

@tamlok 已经找到原因了。是fcitx5配置的问题。 我之前配置的是: 安装完成后,编辑.xprofile配置文件。如果没有该文件,可手动创建一个。 kate ~/.xprofile

export LC_ALL=zh_CN.UTF-8
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export XMODIFIERS=@im=fcitx
fcitx5 &

结过发现上面的配置是有问题的,按照官方文档配置后正常:https://wiki.archlinux.org/title/Fcitx5_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) kate ~/.pam_environment

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

重启电脑后,可以输入中文了

imic07 commented 3 years ago

已经找到原因了。是fcitx5配置的问题。 我之前配置的是: 安装完成后,编辑.xprofile配置文件。如果没有该文件,可手动创建一个。 kate ~/.xprofile

export LC_ALL=zh_CN.UTF-8
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export ***@***.***=fcitx
fcitx5 &

结过发现上面的配置是有问题的,按照官方文档配置后正常:https://wiki.archlinux.org/title/Fcitx5_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) kate ~/.pam_environment

GTK_IM_MODULE DEFAULT=fcitx
QT_IM_MODULE DEFAULT=fcitx
XMODIFIERS ***@***.***=fcitx
SDL_IM_MODULE DEFAULT=fcitx

重启电脑后,可以输入中文了

在 2021-06-09 12:48:59,"Le Tan" @.***> 写道:

https://github.com/vnotex/vnote/issues?q=is%3Aissue+is%3Aclosed+fcitx

fcitx-diagnose诊断一下。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.