Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fcitx not detecting the fcitx-anthy plugin #4550

Closed
cdepillabout opened this issue Oct 16, 2014 · 11 comments
Closed

fcitx not detecting the fcitx-anthy plugin #4550

cdepillabout opened this issue Oct 16, 2014 · 11 comments

Comments

@cdepillabout
Copy link
Member

@iyzsong, I am having a problem where fcitx is not detecting the anthy plugin.

Looking in my user-profile, it looks like the anki plugin is in lib/fcitx/fcitx-anki.so, and the settings files are all correctly in share/fcitx/*. But for some reasone it seems like fcitx just completely ignores the anki plugin.

Running fcitx with the flags "--enable anthy" or "--enable fcitx-anthy" doesn't produce any strange warning messages. Below is the output of fcitx-diagnose, but it doesn't look like there is anything particularly strange in the output. I am wondering how to go about debugging this problem.

# System Info:
1.  `uname -a`:

        Linux nixos 3.12.28 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux

2.  `lsb_release`:

    `lsb_release` not found.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` not found.

4.  `/etc/os-release`:

        NAME=NixOS
        ID=nixos
        VERSION="14.04.526.dbadfad (Baboon)"
        VERSION_ID="14.04.526.dbadfad"
        PRETTY_NAME="NixOS 14.04.526.dbadfad (Baboon)"
        HOME_URL="http://nixos.org/"

5.  Desktop Environment:

    Cannot determine desktop environment.

# Environment:
1.  DISPLAY:

        DISPLAY=':0.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+us+inet(evdev)+ctrl(swapcaps)"  };
                xkb_geometry  { include "pc(pc104)" };
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc104", "us", "", "ctrl:swapcaps"

3.  Locale:

    1.  All locale:

            aa_DJ
            aa_DJ.iso88591
(...)
            ja_JP
            ja_JP.eucjp
            ja_JP.ujis
            ja_JP.utf8
            japanese
            japanese.euc
(...)
            zh_TW.big5
            zh_TW.euctw
            zh_TW.utf8
            zu_ZA
            zu_ZA.iso88591
            zu_ZA.utf8

    2.  Current locale:

            LANG=en_US.UTF-8
            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/d_gosnell

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is set to `/home/d_gosnell/.config`.

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

    3.  Fcitx Settings Directory:

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

5.  Current user:

    The script is run as d_gosnell (1000).

# Fcitx State:
1.  executable:

    Found fcitx at `/home/d_gosnell/.nix-profile/bin/fcitx`.

2.  version:

    Fcitx version: `4.2.8.5`

3.  process:

    Found 2 fcitx processes:

        32627 fcitx
        32636 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` works properly.

# Fcitx Configure UI:
1.  Config Tool Wrapper:

    Found fcitx-configtool at `/home/d_gosnell/.nix-profile/bin/fcitx-configtool`.

2.  Config GUI for gtk2:

    **Config GUI for gtk2 not found.**

3.  Config GUI for gtk3:

    Found `fcitx-config-gtk3` at `/home/d_gosnell/.nix-profile/bin/fcitx-config-gtk3`.

4.  Config GUI for kde:

    **`kcmshell4` 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:

    Xim server name is the same with that set in the environment variable.

## 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:
    **Cannot find fcitx input method module for Qt4.**
    **Cannot find fcitx input method module for Qt5.**

## 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 fcitx im module for gtk 2.**

    2.  gtk 3:

        **Cannot find `gtk-query-immodules` for gtk 3**

        **Cannot find fcitx im module for gtk 3.**

3.  Gtk IM module cache:

    1.  gtk 2:

        **Cannot find immodules cache for gtk 2**

        **Cannot find fcitx im module for gtk 2 in cache.**

    2.  gtk 3:

        **Cannot find immodules cache for gtk 3**

        **Cannot find fcitx im module for gtk 3 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.

# Configuration:
## Fcitx Addons:
1.  Addon Config Dir:

    Found fcitx addon config directory: `/nix/store/105x7rxh6ws6qbp8vj6zh9psdjnqsfcy-fcitx-4.2.8.5/share/fcitx/addon`.

2.  Addon List:

    1.  Found 25 enabled addons:

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-imselector
            fcitx-ipc
            fcitx-keyboard
            fcitx-kimpanel-ui
            fcitx-notificationitem
            fcitx-pinyin
            fcitx-pinyin-enhance
            fcitx-punc
            fcitx-quickphrase
            fcitx-remote
            fcitx-spell
            fcitx-table
            fcitx-unicode
            fcitx-vk
            fcitx-x11
            fcitx-xim
            fcitx-xkb
            fcitx-xkbdbus

    2.  Found 1 disabled addons:

            fcitx-qw

3.  Addon Libraries:

    All libraries for all addons are found.

4.  User Interface:

    Found 2 enabled user interface addons:

        fcitx-classic-ui
        fcitx-kimpanel-ui

## Input Methods:
1.  Found 1 enabled input methods:

        fcitx-keyboard-us

2.  Default input methods:

    You only have one keyboard input method enabled. You may want to add another input method to input other languages.

# Log:
1.  `date`:

        Thu Oct 16 13:55:50 JST 2014

2.  `~/.config/fcitx/log/`:

        total 0

3.  `~/.config/fcitx/log/crash.log`:

    `~/.config/fcitx/log/crash.log` not found.
@cdepillabout
Copy link
Member Author

It looks like the problem might be the following line:

1.  Addon Config Dir:

    Found fcitx addon config directory: `/nix/store/105x7rxh6ws6qbp8vj6zh9psdjnqsfcy-fcitx-4.2.8.5/share/fcitx/addon`.

The anthy addon will not be here, so fcitx will not be able to find it.

@ghost
Copy link

ghost commented Oct 16, 2014

sorry, for now you have to set FCITXDIR to the dir contains both fcitx and fcitx-anthy.

$ nix-env -i fcitx fcitx-anthy
$ FCITXDIR=$HOME/.nix-profile fcitx -D

@ghost
Copy link

ghost commented Oct 16, 2014

I'm not using NixOS now and English is not my language,
if anyone contribute a nixos module or wiki page, that's cool.

@cdepillabout
Copy link
Member Author

@iyzsong, thank for the response.

I'll try bringing this up on the NixOS mailing list and seeing if I get a response with a good solution.

@cdepillabout
Copy link
Member Author

Here's the thread on the nix-dev list:

http://lists.science.uu.nl/pipermail/nix-dev/2014-October/014675.html

@ghost
Copy link

ghost commented Oct 18, 2014

Have you try FCITXDIR? It does works for me :)

fcitx will search its addons in the environment variable FCITXDIR.

@cdepillabout
Copy link
Member Author

FCITXDIR will not work because each plugin will be installed into a different directory. If there was a FCITXPATH environment variable (like PATH) where you could specify multiple FCITXDIRs, then it might be able to be made to would work.

I'm thinking the only way to solve this problem on NIXOS is to get rid of the anthy plugin, and change the fcitx package itself so you can enable/disable plugins. The anthy plugin will only be installed if you enable it in the fctix package's config.

It will work similarly to how the firefox wrapper package works.

https://nixos.org/wiki/Enable_Browser_Plugins

@ghost
Copy link

ghost commented Oct 21, 2014

in nix, every profile is a dir contains all packages symbolic linked in.
when you run nix-env -i fcitx fcitx-anthy,
your $HOME/.nix-profile is a dir contains both fcitx and fcitx-anthy.

yes, make a fcitx wrapper with addons will be great.

@cdepillabout
Copy link
Member Author

The problem with this is that fcitx and fcitx-anthy may not be installed through nix-env.

For instance, fcitx may be installed by writing it in /etc/nixos/configuration.nix and installing it with nixos-rebuild switch. Then, fcitx-anthy may be installed through nix-env. So $HOME/.nix-profile/ will contain fctix-anthy, but fctix itself (and possibly other plugins) will be installed in /run/current-system/sw/. You would need to point FCITXDIR to both $HOME/.nix-profile/ and /run/current-system/sw/ (which I don't think is possible).

But anyway, it seems like an anti-pattern to require the $HOME/.nix-profile/ and /run/current-system/sw/ paths to exist. Are there other packages in Nix that require this?

It seems like the only way to do this would be to create a wrapper fcitx package?

@ghost
Copy link

ghost commented Oct 22, 2014

yes, your are right.

@cdepillabout
Copy link
Member Author

Fixed in #4839.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant