fcitx / fcitx5

maybe a new fcitx.
1.58k stars 118 forks source link

esxi+vnc+xfce环境下fcitx5不自动启动,而手动启动报错无法启动 #559

Open wodexiaobai322 opened 2 years ago

wodexiaobai322 commented 2 years ago

Describe the bug esxi+vnc+xfce环境下fcitx5不自动启动,而手动启动报错无法启动

To Reproduce Steps to reproduce the behavior: esxi+vnc+xfce环境下fcitx5不自动启动,即无论使用普通账户或root账户开启vnc服务,连接后dock栏无键盘图标,后台进程中无fcitx相关进程,进入fcitx5 configuration显示未启动,点击启动无效,终端中启动则报错如下

Desktop (please complete the following information):

注意到启动时提示Failed to open wayland connection,但我并未安装wayland。

以下是xstartup的配置: _#!/bin/sh

xrdb "$HOME/.Xresources"

xsetroot -solid grey

x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

x-window-manager &

Fix to make GNOME work

export XKL_XMODMAP_DISABLE=1

/etc/X11/Xsession

unset SESSION_MANAGER unset DBUS_SESSION_BUSADDRESS exec startxfce4

以及/etc/environment中有关的配置 _GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx SDL_IMMODULE=fcitx

[以及:使用虚拟机直接进入x11时fcitx也同样不自动启动,终端中输入fcitx5右上角键盘图标出现,但是显示不完全,同时报错如下 _ubuntu@wodexiaobai322-server:~$ sudo fcitx5 [sudo] password for ubuntu: I2022-07-31 23:11:41.452289 instance.cpp:1394] Override Enabled Addons: {} I2022-07-31 23:11:41.452627 instance.cpp:1395] Override Disabled Addons: {} I2022-07-31 23:11:41.465121 addonmanager.cpp:191] Loaded addon xcb I2022-07-31 23:11:41.469881 addonmanager.cpp:191] Loaded addon quickphrase I2022-07-31 23:11:41.470447 addonmanager.cpp:191] Loaded addon imselector I2022-07-31 23:11:41.491288 addonmanager.cpp:191] Loaded addon keyboard E2022-07-31 23:11:41.493230 addonloader.cpp:61] Failed to create addon: dbus Failed to connect to session dbus I2022-07-31 23:11:41.493439 addonmanager.cpp:188] Could not load addon dbus I2022-07-31 23:11:41.496378 addonmanager.cpp:191] Loaded addon xim error: XDG_RUNTIMEDIR not set in the environment. E2022-07-31 23:11:41.497438 waylandmodule.cpp:162] Failed to open wayland connection I2022-07-31 23:11:41.497564 addonmanager.cpp:191] Loaded addon wayland I2022-07-31 23:11:41.499017 addonmanager.cpp:191] Loaded addon clipboard I2022-07-31 23:11:41.499582 addonmanager.cpp:191] Loaded addon waylandim I2022-07-31 23:11:41.500185 addonmanager.cpp:191] Loaded addon unicode I2022-07-31 23:11:41.501908 addonmanager.cpp:191] Loaded addon pinyinhelper I2022-07-31 23:11:41.596151 inputmethodmanager.cpp:198] Found 697 input method(s) in addon keyboard I2022-07-31 23:11:41.727193 theme.cpp:637] New Icon theme: elementary-xfce-darker I2022-07-31 23:11:41.743229 addonmanager.cpp:191] Loaded addon classicui I2022-07-31 23:11:41.748461 addonmanager.cpp:191] Loaded addon punctuation I2022-07-31 23:11:41.989769 addonmanager.cpp:191] Loaded addon pinyin I2022-07-31 23:11:41.999010 addonmanager.cpp:191] Loaded addon cloudpinyin

已经试过多次重启及重装fcitx均无法解决

wengxt commented 2 years ago

有两个问题 1、不知道具体什么原因,fcitx5在你的 vnc 上启动失败,错误看起来是和 X 有关的,推测是可能和访问某个不可用的 x 协议有关

具体而言是这里,我在 archlinux 上装了一个 tigervnc 测试,没发现类似的问题,请具体说明一下你的发行版,所使用的 vnc 的版本方便我重现,你可以直接运行 fcitx5-diagnose 收集发行版的相关信息贴出来 W2022-07-31 23:25:39.538681 xcbeventreader.cpp:39] XCB connection ":1.0" got error: 2 I2022-07-31 23:25:39.538988 inputcontextmanager.cpp:318] All display connections are gone, exit now. I2022-07-31 23:25:39.539315 xcbmodule.cpp:58] Disconnected from X11 Display :1.0

2、x11 的情况不要用 sudo 来启动 fcitx,直接运行就好了,不自动启动是你配置的问题, https://fcitx-im.org/wiki/Setup_Fcitx_5 参考第一段用发行版的工具来启动

wodexiaobai322 commented 2 years ago

感谢回复! 我的发行版是ubuntu server 22.04,tightvnc版本1:1.3.10-5,即当前通过apt安装的最新版本。vnc下直接运行或sudo运行fcitx5均无法启动,报错: ubuntu@wodexiaobai322-server:~$ fcitx5 I2022-08-01 15:50:22.894715 instance.cpp:1394] Override Enabled Addons: {} I2022-08-01 15:50:22.895026 instance.cpp:1395] Override Disabled Addons: {} I2022-08-01 15:50:22.904509 addonmanager.cpp:191] Loaded addon xcb I2022-08-01 15:50:22.911659 addonmanager.cpp:191] Loaded addon quickphrase I2022-08-01 15:50:22.912301 addonmanager.cpp:191] Loaded addon imselector I2022-08-01 15:50:22.936494 addonmanager.cpp:191] Loaded addon keyboard I2022-08-01 15:50:22.940880 addonmanager.cpp:191] Loaded addon dbus I2022-08-01 15:50:22.947959 addonmanager.cpp:191] Loaded addon fcitx4frontend I2022-08-01 15:50:22.957723 addonmanager.cpp:191] Loaded addon ibusfrontend I2022-08-01 15:50:22.962102 addonmanager.cpp:191] Loaded addon xim E2022-08-01 15:50:22.963908 waylandmodule.cpp:162] Failed to open wayland connection I2022-08-01 15:50:22.964044 addonmanager.cpp:191] Loaded addon wayland I2022-08-01 15:50:22.966386 addonmanager.cpp:191] Loaded addon dbusfrontend I2022-08-01 15:50:22.968328 addonmanager.cpp:191] Loaded addon clipboard I2022-08-01 15:50:22.970381 addonmanager.cpp:191] Loaded addon waylandim I2022-08-01 15:50:22.971778 addonmanager.cpp:191] Loaded addon unicode I2022-08-01 15:50:22.977740 addonmanager.cpp:191] Loaded addon pinyinhelper I2022-08-01 15:50:23.082187 inputmethodmanager.cpp:198] Found 697 input method(s) in addon keyboard I2022-08-01 15:50:23.084002 addonmanager.cpp:191] Loaded addon kimpanel I2022-08-01 15:50:23.163884 addonmanager.cpp:191] Loaded addon classicui I2022-08-01 15:50:23.167075 addonmanager.cpp:191] Loaded addon notificationitem I2022-08-01 15:50:23.170981 addonmanager.cpp:191] Loaded addon notifications I2022-08-01 15:50:23.176467 addonmanager.cpp:191] Loaded addon punctuation I2022-08-01 15:50:23.531400 addonmanager.cpp:191] Loaded addon pinyin I2022-08-01 15:50:23.539623 addonmanager.cpp:191] Loaded addon cloudpinyin I2022-08-01 15:50:23.540332 kimpanel.cpp:117] Kimpanel new owner W2022-08-01 15:50:23.543723 xcbeventreader.cpp:39] XCB connection ":1.0" got error: 2 I2022-08-01 15:50:23.544051 inputcontextmanager.cpp:318] All display connections are gone, exit now. I2022-08-01 15:50:23.544149 xcbmodule.cpp:58] Disconnected from X11 Display :1.0 I2022-08-01 15:50:23.549724 addonmanager.cpp:297] Unloading addon cloudpinyin I2022-08-01 15:50:23.550453 addonmanager.cpp:297] Unloading addon pinyin I2022-08-01 15:50:23.551936 addonmanager.cpp:297] Unloading addon punctuation I2022-08-01 15:50:23.552115 addonmanager.cpp:297] Unloading addon notifications I2022-08-01 15:50:23.552184 addonmanager.cpp:297] Unloading addon notificationitem I2022-08-01 15:50:23.552282 addonmanager.cpp:297] Unloading addon classicui I2022-08-01 15:50:23.553052 addonmanager.cpp:297] Unloading addon kimpanel I2022-08-01 15:50:23.553125 addonmanager.cpp:297] Unloading addon pinyinhelper I2022-08-01 15:50:23.553194 addonmanager.cpp:297] Unloading addon unicode I2022-08-01 15:50:23.553263 addonmanager.cpp:297] Unloading addon waylandim I2022-08-01 15:50:23.553329 addonmanager.cpp:297] Unloading addon clipboard I2022-08-01 15:50:23.553395 addonmanager.cpp:297] Unloading addon dbusfrontend I2022-08-01 15:50:23.553464 addonmanager.cpp:297] Unloading addon wayland I2022-08-01 15:50:23.553531 addonmanager.cpp:297] Unloading addon xim I2022-08-01 15:50:23.553600 addonmanager.cpp:297] Unloading addon ibusfrontend I2022-08-01 15:50:23.555259 addonmanager.cpp:297] Unloading addon fcitx4frontend I2022-08-01 15:50:23.555386 addonmanager.cpp:297] Unloading addon dbus I2022-08-01 15:50:23.555490 addonmanager.cpp:297] Unloading addon keyboard I2022-08-01 15:50:23.555698 addonmanager.cpp:297] Unloading addon imselector I2022-08-01 15:50:23.555764 addonmanager.cpp:297] Unloading addon quickphrase I2022-08-01 15:50:23.556045 addonmanager.cpp:297] Unloading addon xcb

以下是fcitx5-diagnose的输出: _ubuntu@wodexiaobai322-server:~$ fcitx5-diagnose

System Info:

  1. uname -a:

    Linux wodexiaobai322-server 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  2. lsb_release -a:

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 22.04 LTS
    Release:    22.04
    Codename:   jammy
  3. lsb_release -d:

    Description:    Ubuntu 22.04 LTS
  4. /etc/lsb-release:

    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=22.04
    DISTRIB_CODENAME=jammy
    DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
  5. /etc/os-release:

    PRETTY_NAME="Ubuntu 22.04 LTS"
    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04 (Jammy Jellyfish)"
    VERSION_CODENAME=jammy
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=jammy
  6. Desktop Environment:

    Desktop environment is xfce.

  7. XDG SESSION TYPE:

    XDG_SESSION_TYPE='tty'
  8. Bash Version:

    BASH_VERSION='5.1.16(1)-release'

Environment:

  1. DISPLAY:

    DISPLAY=':1.0'
    
    WAYLAND_DISPLAY=''
  2. Keyboard Layout:

    1. setxkbmap:

      XKB extension not present on :1.0
    2. xprop:

      _XKB_RULES_NAMES:  no such atom on any window.
  3. Locale:

    1. All locales:

      C
      C.utf8
      en_US.utf8
      POSIX
      zh_CN.utf8
      zh_SG.utf8
    2. Current locale:

      LANG=en_US.UTF-8
      LANGUAGE=en_US:en
      LC_CTYPE="en_US.UTF-8"
      LC_NUMERIC="en_US.UTF-8"
      LC_TIME="en_US.UTF-8"
      LC_COLLATE="en_US.UTF-8"
      LC_MONETARY="en_US.UTF-8"
      LC_MESSAGES="en_US.UTF-8"
      LC_PAPER="en_US.UTF-8"
      LC_NAME="en_US.UTF-8"
      LC_ADDRESS="en_US.UTF-8"
      LC_TELEPHONE="en_US.UTF-8"
      LC_MEASUREMENT="en_US.UTF-8"
      LC_IDENTIFICATION="en_US.UTF-8"
      LC_ALL=
  4. Directories:

    1. Home:

      /home/ubuntu
    2. ${XDG_CONFIG_HOME}:

      Environment variable XDG_CONFIG_HOME is not set.

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

    3. Fcitx5 Settings Directory:

      Current fcitx5 settings directory is ~/.config/fcitx5 (/home/ubuntu/.config/fcitx5).

  5. Current user:

    The script is run as ubuntu (1000).

Fcitx State:

  1. executable:

    Found fcitx5 at /usr/bin/fcitx5.

  2. version:

    Fcitx version: 5.0.14

  3. process:

    Fcitx5 is not running. Please check the Configure link of your distribution in Beginner's Guide for how to setup fcitx5 autostart.

Fcitx Configure UI:

  1. Config Tool Wrapper:

    Found fcitx5-configtool at /usr/bin/fcitx5-configtool.

  2. Config GUI for qt:

    Found fcitx5-config-qt at /usr/bin/fcitx5-config-qt.

  3. Config GUI for kde:

    kcmshell5 not found.

Frontends setup:

Xim:

  1. ${XMODIFIERS}:

    Environment variable XMODIFIERS is set to "@im=fcitx" correctly. Xim Server Name from Environment variable is fcitx.

  2. XIM_SERVERS on root window:

    Cannot find xim_server on root window.

Qt:

  1. qt4 - ${QT4_IM_MODULE}:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

  2. qt5 - ${QT_IM_MODULE}:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

  3. Qt IM module files:

    Found fcitx5 qt5 module: /lib/x86_64-linux-gnu/fcitx5/qt5/libfcitx-quickphrase-editor5.so. Found fcitx5 im module for qt5: /lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so. Cannot find fcitx5 input method module for Qt4.

Gtk:

  1. gtk - ${GTK_IM_MODULE}:

    Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

  2. gtk-query-immodules:

    1. gtk 2:

      Cannot find gtk-query-immodules for gtk 2

      Cannot find fcitx5 im module for gtk 2.

    2. gtk 3:

      Cannot find gtk-query-immodules for gtk 3

      Cannot find fcitx5 im module for gtk 3.

  3. Gtk IM module cache:

    1. gtk 2:

      Found immodules cache for gtk 2.24.33 at /lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache. Version Line:

      # Created by /usr/lib/x86_64-linux-gnu/libgtk2.0-0/gtk-query-immodules-2.0 from gtk+-2.24.33

      Found fcitx5 im modules for gtk 2.24.33.

      "/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-fcitx5.so" 
      "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
    2. gtk 3:

      Found immodules cache for gtk 3.24.33 at /lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache. Version Line:

      # Created by /usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 from gtk+-3.24.33

      Found fcitx5 im modules for gtk 3.24.33.

      "/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
      "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
      "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
    3. gtk 4:

      Cannot find immodules cache for gtk 4

      Cannot find fcitx5 im module for gtk 4 in cache.

  4. Gtk IM module files:

    1. gtk 2:

      All found Gtk 2 immodule files exist.

    2. gtk 3:

      All found Gtk 3 immodule files exist.

    3. gtk 4:

      All found Gtk 4 immodule files exist.

Configuration:

Fcitx Addons:

  1. Addon Config Dir:

    Found fcitx5 addon config directory: /usr/share/fcitx5/addon.

  2. Addon List:

    1. Found 26 enabled addons:

      Simplified and Traditional Chinese Translation 5.0.11
      Classic User Inteface 5.0.14
      Clipboard 5.0.14
      Cloud Pinyin 5.0.11
      DBus 5.0.14
      DBus Frontend 5.0.14
      Emoji 5.0.14
      Fcitx4 Frontend 5.0.14
      Full width character 5.0.11
      IBus Frontend 5.0.14
      Input method selector 5.0.14
      Keyboard 5.0.14
      KDE Input Method Panel 5.0.14
      Status Notifier 5.0.14
      Notification 5.0.14
      Pinyin 5.0.11
      Extra Pinyin functionality 5.0.11
      Punctuation 5.0.11
      Quick Phrase 5.0.14
      Spell 5.0.14
      Table 5.0.11
      Unicode 5.0.14
      Wayland 5.0.14
      Wayland Input method frontend 5.0.14
      XCB 5.0.14
      X Input Method Frontend 5.0.14
    2. Found 0 disabled addons:

  3. Addon Libraries:

    All libraries for all addons are found.

  4. User Interface:

    Found 2 enabled user interface addons:

    Classic User Inteface
    KDE Input Method Panel

Input Methods:

  1. /home/ubuntu/.config/fcitx5/profile:

    [Groups/0]
    # Group Name
    Name=Default
    # Layout
    Default Layout=us
    # Default Input Method
    DefaultIM=pinyin
    
    [Groups/0/Items/0]
    # Name
    Name=keyboard-us
    # Layout
    Layout=
    
    [Groups/0/Items/1]
    # Name
    Name=pinyin
    # Layout
    Layout=
    
    [GroupOrder]
    0=Default

Log:

  1. date:

    Mon Aug  1 03:36:19 PM CST 2022
  2. /home/ubuntu/.config/fcitx5/crash.log:

    /home/ubuntu/.config/fcitx5/crash.log not found.

Warning: the output of fcitx5-diagnose contains sensitive information, including the distribution name, kernel version, name of currently running programs, etc.

Though such information can be helpful to developers for diagnostic purpose, please double check and remove as necessary before posting it online publicly._

oplancelot commented 1 year ago

Using tigerVNC instead of tightVNC, tigerVNC works just fine.