Score:0

How to use fcitx in wslg on win11?

ru flag

WSLg on Windows 11 can run Linux GUI.

The writing method in Linux GUI (e.g. gedit) is different from the Windows input methods

I installed fcitx, but there are several problems:

  1. the icon doesn't show on the Windows toolbar panel, so cannot toggle different input methods by clicking icons

  2. some keyboards don't work. Wubi and Polish keyboards works, but Hebrew, Greek, and Russian are still using Polish alphabets

  3. how to autostart fcitx? When starting Linux GUI, I should manually start fcitx, this is boring. So I try to install a Linux desktop LxQt, but the desktop cannot fill the whole screen (I will ask in seperated post for this).

So would you please help me to solve these problems?

guiverc avatar
cn flag
This is rather unclear; you've tagged LXQt, but an example of application you use is GTK (`gedit`) and not Qt5. Your post is mixing different things; why not use `featherpad` or a Qt5 editor... You don't mention an on-topic OS, this isn't a Linxu support site; refer https://askubuntu.com/help/on-topic `LXQt Session Settings` has a autostart feature which will cause programs to start at login.
Gunnar Hjalmarsson avatar
uz flag
Tried the more modern fcitx5? As regards autostarting at login, please make use of `im-config`.
ru flag
@GunnarHjalmarsson Thank you for this information, I first tried fcitx5 on Lubuntu, it works very well. Then I tried on wsl2, always has the error "Cannot connect to Fcitx by Dbus, is Fcitx running?" And I could find someone who shared their experience with fcitx5 on WSLg
Gunnar Hjalmarsson avatar
uz flag
@JohnPaulQiangChen: I know nothing about WSL. Maybe you want to bring up the issue at https://discourse.ubuntu.com
Score:0
kz flag

At the moment I have only half solved this problem.

According to this post, the problem is with wayland, so need to add some lines to .profile or .bashrc

# https://yanqiyu.info/2021/06/29/wslg-gpu/
daemonize -e /tmp/fcitx5.log -o /tmp/fcitx5.log -p /tmp/fcitx5.pid -l /tmp/fcitx5.pid -a /usr/bin/fcitx5 --disable=wayland
export INPUT_METHOD=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

But my WSL2 use top shows that fcitx5 is running on starting the system, however, I just couldn't activate it!!

I will be gratitude if someone could tell me what's wrong there.

So now I couldn't put these lines in .profile or .bashrc. I put in a file called source_fcitx5.sh, and need manually activate fcitx5

source source_fcitx5.sh
NotTheDr01ds avatar
vn flag
It looks like you posted under a new/different account from your original question. Any reason why? It's no problem to post (and even accept) a self-answer. You can always accept a different answer if something better comes along.
John Chen avatar
kz flag
@NotTheDr01ds Thank you for pointing it out, I appreciate it, God bless!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.