How to use fcitx on Ubuntu 17.10

Since ubuntu moves to GNOME 3, there’s some difference if you want to use fcitx. It’s not hard to do, but need some manual tweak on user configurations.

Here is the instruction about how to use fcitx on a fresh installed ubuntu 17.10 system. Personally I just choose English as system language for this instruction, but it should make no difference.

So first of all, you will need to install fcitx and the input method you want anyway.

sudo apt-get install fcitx fcitx-mozc

Under GNOME the old im-config seems not working because GNOME only supports ibus and they don’t want any other input method related system to use it. We’ll need to set the environment variable manually because of that.

I used to recommend people use ~/.xprofile. but since this file is X only, I’d suggest to use .pam_environment file to set the variable.

On a freshly installed ubuntu 17.10, you will not have ~/.pam_environment file. So you can use

gedit ~/.pam_environment

to edit and create this file with following content.

XMODIFIERS DEFAULT=@im=fcitx
GTK_IM_MODULE DEFAULT=fcitx
QT_IM_MODULE DEFAULT=fcitx

Then, you’ll also need to add an autostart entry to start fcitx. Search “Startup applications Preferences” and add an new entry for fcitx.

After that, you’ll already be able to get Fcitx working. But I still recommend you to install this extension for better experience under GNOME. https://extensions.gnome.org/extension/261/kimpanel/. It also provides extra functionality on correctly setting keyboard layout under GNOME with fcitx. Otherwise any keyboard layout group change outside mutter will be reset to mutter’s internal value. (See https://bugzilla.gnome.org/show_bug.cgi?id=756543#c18 for more information)

Unfortunately, it’s hard to install gnome shell extension from browser in a default installation.

To use firefox you may follow the instruction on the website and install firefox extension. (I have no idea why Ubuntu doesn’t include this package and use firefox as default browser, probably this issue is worth a bug report.) You’ll also need to install

sudo apt-get install chrome-gnome-shell

Or you can use gnome’s browser

sudo apt-get install epiphany-browser

To install extension from browser. That are many other way to install gnome shell extensions so I’m not gonna to cover it all.

P. S.

My system does not gives me Wayland session for some reason, so I can’t test the GNOME wayland on Ubuntu 17.10. But just to let you know, as described in my last post, you may use fcitx on GNOME’s wayland session. Though, to get the input method window displayed at right location you currently will need to use fcitx’s master branch and use kimpanel extension.

This entry was posted in fcitx development and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.