alacritty: thread 'main' panicked at 'XOpenIM failed'
Which operating system does the issue occur on?
Linux gurdit-lp 4.9.31-1-MANJARO #1 SMP PREEMPT Wed Jun 7 19:39:15 UTC 2017 x86_64 GNU/Linux
If on linux, are you using X11 or Wayland? X11
I followed the installation instruction of arch linux as specified in the readme. The installation completed with no errors. But when I try to execute alacritty
from my old terminal. I get this error
thread 'main' panicked at 'XOpenIM failed', /home/gurditsbedi/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.7.6/src/platform/linux/x11/mod.rs:692:16
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Now I run again alacritty
after executing export RUST_BACKTRACE=1
and I get this.
thread 'main' panicked at 'XOpenIM failed', /home/gurditsbedi/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.7.6/src/platform/linux/x11/mod.rs:692:16
stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: __libc_start_main
13: <unknown>
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 22 (5 by maintainers)
this can be worked around by setting
LANG=en_US.UTF-8
I confirm that
sudo apt install fcitx-bin && fcitx
can fix the problem right away. I am running Ubuntu 17.10 with XMonad. This issue only happened when I login XMonad after logout Gnome tho…I’ve filed a PR to
winit
: https://github.com/tomaka/winit/pull/424. It uses the workaround proposed by @jwilm from https://github.com/tomaka/winit/issues/277#issuecomment-337751136.Anything that helps to fix this issue for good is welcome!
Well, geeze, it’s been a while. For now, everything should work on this branch: https://github.com/francesca64/alacritty/tree/winit-git
glutin 0.14.0 has been released, which uses winit 0.12.0. This includes @hcpl’s tomaka/winit#424, meaning this issue (and #701) should no longer be a problem.
Additionally, tomaka/winit#451 isn’t released yet, but it will further assure that there aren’t issues with XIM. When that’s released,
platform_window_init
can be completely removed, and the panic caused by failing to open any input method is much more verbose and includes diagnostic information (however, it seems quite unlikely it would fail now).Not just installing. After rebooting I have to call
fcitx
again. Otherwise this error appears again.This bug is terrible for me. Somehow installing
fcitx
messed my keyboard config in general as it seems. Now I always have to callfcitx
. Otherwise my keyboard settings are wrong. So if someone does not havefcitx
installed and is planning to install it to fix this alacritty issue: use rather another terminal.I have the same problem on Ubuntu 17.10 with KDE/Plasma and a valid locale
en_US.UTF-8
:Sergei’s workaround solved the issue for me as well (
sudo apt install fcitx-bin && fcitx
)@farid-fari not yet. tomaka/winit#468
Note that after that merges, you’ll still be waiting for a new glutin release that uses that winit release, though it should be fairly speedy. I’ll probably make a PR here when that happens, since it will include a (minor) breaking API change.
FYI, I’m running on Fedora 25 with non-DE environment (i3wm) and solved the problem by running
fcitx
(got idea from https://github.com/jwilm/alacritty/issues/732)This is related to this bug: https://github.com/tomaka/winit/issues/277
I solved it by setting a default input method using
im-config
and setting it to iBus this command writes a~/.xinputrc
that contains:then I restarted X11 and now alacritty launches with no problem.