Writing Japanese with Ubuntu 20.04 LTS Focal Fossa
04.08.2020 [Software]
This is a follow-up on the former articles Writing Japanese with Ubuntu 18.04 LTS Bionic Beaver, Writing Japanese with Ubuntu 16.04 LTS Xenial Xerus, Writing Japanese with Ubuntu 14.04 Trusty Tahr, Writing Japanese with Ubuntu 12.04 Precise Pangolin and Writing Japanese with Ubuntu 10.04 Lucid Lynx.

Again, Ubuntu looks slightly different from the previous LTS version and some buttons moved around, but the general process is still the same along with the small stumbling stone that is also still present (Mozc won't show up in the input sources until you restarted the session by logging out once).

So, to uphold my long standing tradition of making this guide, here we go with "Writing Japanese with Ubuntu 20.04 LTS Focal Fossa". Have fun 😀️

Step one: Language support

Open the Language Support by clicking on Settings in the menu that comes up when clicking on the icons at the right top of the screen, followed by selecting Region & Language on the left side of the opened window and clicking on Manage Installed Languages.

Step two: Install / Remove Languages...

When you open the Language Support for the first time, it will most likely show you the message The language support is not installed completely.
You can either click on Remind me later or on Install to install fonts, dictionaries for spell checking, translations for applications and so on for the language you use Ubuntu in (It will show each time you open the window until you actually installed these things, so it's save to ignore for now if you want).
Once you have the Language Support window open, click on Install / Remove Languages...

Step three: Let's install Japanese

Find the Japanese entry in the list inside the newly opened dialog titled Installed Languages, click on the checkbox next to it to enable it and click on Apply.

Step four: Enter your password

Installing languages requires system administration privileges, hence you have to authenticate the action by typing in your password in the dialog that appears and click on Authenticate.

Step five: Applying changes

The necessary packages will now be downloaded and installed. Nothing to do for you in this step, but you can already start to save open documents and close unused windows in preparation for the next one.

Step six: Log out

After the Japanese language support is installed, you have to log out. This is the small stumbling stone mentioned above. For the newly installed input source to show up, the session needs to be restarted. This is really kind of annoying but there's nothing you can do about that at this point. 😓️

Step seven: Add Japanese as an Input Source

Once you've logged in again, re-open the Region & Language window from step one.
This time click one the plus sign below the Input Sources.
In the newly opened Add an Input Source dialog, first click on Japanese, followed by Japanese (Mozc). This entry won't show up unless you logged out before, you've been warned. By the way, Mozc is the open source version of Google's Japanese IME that is used e.g. in Chrome OS and Android.

Step eight: Almost done

The entry "Japanese (Mozc)" should now appear in the list of Input Sources along with the system icon, which let's you switch between the input sources. I recommend to bring up the Input Source Options by clicking on the cog to the right of the Input Sources title in the Region & Language window and set it to Allow different sources for each window.

Step nine: Write some Japanese

You should be ready to go now. Open the text editor, click on the system icon to switch between the input sources, select Japanese (Mozc) and then Hiragana as the Input Mode. You should now be able to type Japanese.

Switching between candidates is done by pressing the spacebar and conversion between Kana/Romaji can be done with the following function keys:
Hiragana: F6
Katakana: F7
Hankaku-Katakana: F8
Zenkaku-Romaji: F9
Hankaku-Romaji: F10

Additional notes

If you want to switch between input sources using Alt+Shift, which is used in Windows by default, you can open a terminal and run the following commands:
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['Shift_L']"
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['Alt_L']" 

Other flavors of Ubuntu (Xubuntu...)

If you're running another flavor of Ubuntu or a derivative, what you want to do is actually still the same, but the options will look different or be put in other configuration tools. It basically always comes down to bring up the Language support dialog, then do steps two to five, choose IBus as the Keyboard input method system in that dialog once you installed the Japanese support and then log out. After you log in again, there should be the IBus system icon sitting in your system tray (Look for a keyboard). A right click on that brings up a menu, click on Preferences to bring up the IBus Preferences, go to the tab Input Method, click on Add and then add Japanese - Mozc. Now go to step nine. 😁️
Should you be in the situation, where the Language Support tool isn't installed, you can install it by installing the package language-selector-gnome. I discourage the manual installation of input sources since I have seen things breaking while upgrading Ubuntu installations in the past and also will the Language Support tool install fonts and properly configure Ubuntu how it is intended to be configured. I've seen my fair share of questions over the years like "I can't type Japanese in application xy" or "Why doesn't the system icon show up", and it pretty much always came down to missing packages, missing environment variables or other such things when playing around with the installation of input sources.

That's it

I hope, this article answered your first questions regarding Japanese input in Ubuntu.

If this article was useful to you, you might also be interested in my (short) list of Japanese learning materials and software for Linux and how to type specific symbols and radicals in Mozc / Google’s Japanese IME.