Actually there is nothing so special about this feature, it’s just come freely with the multiple X server support. I just realized that WAYLAND_SOCKET passed from compositor can be just sent via DBus to the actual fcitx5 server, without the need to let compositor start Fcitx 5 directly. There will be a new small tool included in the next release (fcitx5-wayland-launcher). It can be used to initiate a new wayland connection from Fcitx, even if WAYLAND_SOCKET is required to be used link kwin or weston.
Some people may find it useful if they want to keep Fcitx as a user-level daemon. I didn’t test it, but I think this is what can be done:
- Remove all other method of auto start mechanism.
- create a user systemd unit, with command fcitx5 -k. The “-k” allows fcitx 5 to be kept running even if display server is gone.
- Make your X11 or wayland desktop to run a command to start a new X connection or Wayland connection.