You are not logged in.

#1 2020-11-11 05:28:08

rarsa
Member
Registered: 2020-11-03
Posts: 7

Fcitx - US keyboard maps disappeared (SOLVED)

I have been working with Arch for a couple of weeks.

I'm still going through the process of fine tuning some things and I've documented all I've done. For the most part things were working well, until...

I've been using fcitx to switch from US  english to chinese. I also use US Inernational with dead keys to write in French and Spanish. That's one of the first things that I had configured and I hadn't touched other than recently adding a hot key to show the list of input methods.

This morning, when I started my french class, I realized that my normal normal trigger key didn't do anything.

I went to the fcitx-configtool and I saw that all the US keyboards showed (Unavailable). and Strangely, the "appearance" tab is empty when before it was showing some configuration parameters.

All the configuration I remember doing in Arch in the last few days is:

  • Configure the GTK Theme using MintThemes and Icons from AUR.

  • Configure the bash prompt editing .bashrc

  • Configure the Xterm colours modifying .Xresources

  • Configure the color profile in Vim

  • Install and then remove xsecurelock and xautolock

  • Install updates with "sudo pacman -Syu"

  • Add some keybindings in Xmonad

Doing

localectl list-x11-keymap-layouts

Shows me correctly all the layouts

Doing

localectl list-x11-keymap-variants us

Gives me the proper us variants including alt-intl

Doing

setxkbmap -print -verbose 10

Gives me

Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)"     };
        xkb_geometry  { include "pc(pc105)"     };
};

I've tried

  • Uninstalling and reinstalling fcitx and all the dependencies, including rebooting the computer

  • Renaming the .config/fcitx to generate a new one

  • Reinstalling kbd

  • This computer also has Linux mint configured with fcitx, I ran fcitx-diagnose in both and did a diff of the outputs and couldn't see any meaningful difference.

  • Googling high and low for this problem. I am usually good at that but in this case I've come up empty handed

Still, I can't switch input method with fcitx. So for now for my french classes or to write in chinese I need to switch to Linux Mint.

Here are the screenshots
Unavailable keyboards
Appearance tab
SelectKey

Last edited by rarsa (2020-11-20 03:53:03)

Offline

#2 2020-11-20 04:08:26

rarsa
Member
Registered: 2020-11-03
Posts: 7

Re: Fcitx - US keyboard maps disappeared (SOLVED)

I was finally able to figure out what the problem was:

The symptom that helped me figure out things was:

  • Even if I removed the fcitx-autostart from my xmonad configuration file, when my system started, fcitx was being launched. I could see it with top/htop but it didn't work.

  • Even if I killed the process it would respawn again

I checked files to see if something had been aded to systemd or other startup files. Nothing.

Then I remembered that I had created a little script to check for the current keyboard input method. That script was being executed by xmobar and xmobar was being started when xmonad started and then executed at intervals to update the xmobar display.

The command to get the current input method is:

gdbus call -e -d org.fcitx.Fcitx -o "/inputmethod" -m "org.fcitx.Fcitx.InputMethod.GetCurrentIM"

It seems that gdbus was starting Fcitx when it wasn't running, but somehow that instance of Fcitx was initialized incorrectly.

It still didn't fully explain why the problem was happening even when I was starting fcitx in my xmonad "startupHook"

--myStartupHook = do
    spawn "fcitx-autostart"

Then I saw that I am starting xmobar in my main function!

main = do
    xmproc <- spawnPipe "xmobar -x 1 /home/papa/.config/xmobar/xmobarrc"
    xmonad $ docks defaults

xmobar was starting and executing the script before I had instantiated fcitx!!!

The solution was to move the fcitx-autostart to .xinitrc

What made the problem more confusing is that fcitx had been working correctly the whole day until I shut down the computer and turned it on the next day. That's because I had written the script in the morning, added it to xmobar and used it the whole day. Which means that fcitx was already running, so all was well.
I decided to post this question in this subforum because the last thing I did before turning off my computer was update my system, so I was attributing the problem to the update. hmm my bad, really.

Now I know I need to consider xmonad initialization sequence when I modify the configuration.

Last edited by rarsa (2020-11-20 04:17:56)

Offline

Board footer

Powered by FluxBB