How to enable Japanese Input on Lubuntu 22.04LTS?

Hi, I’m new here, hoping to find a way to enable Japanese input on Lubuntu 22.04LTS.

Please note, I’m not trying to change the Locale. I’m an English speaker who knows multiple languages, among them Japanese, and when I’m writing an email to Japanese friends I want to type in Japanese…but that’s all. Most of the info I’ve found so far is assuming people want their entire system changed, docs, menus, etc. I don’t. I just want to add a language and use it. Usually this involves adding the language support (libraries, etc.) to the system, choosing an input method, enabling dictionaries, and switching via a key command (usually Cntl-Space).

This Howto is for Ubuntu and might work except that the first line doesn’t have a Lubuntu equivalent. How do I “add a Language” to the system? It just seems so simple, so common, yet somehow it’s been impossible to figure out.

It’s seemed that this is the case every time I upgrade…I spend weeks or months trying to accomplish this simple goal. Can someone help walk me through the steps needed here? Or confirm that it’s currently impossible? Thank you in advance.

1 Like

Seems like your answer is on AskUbuntu:

Thanks, @wxl, but this is an 8 year old thread and fcitx caused my system to hang. Did these instructions work for you? I’ve done this successfully in the past and had it just fine in 20.04LTS, but somehow it’s eluding me thus far for 22.04LTS.

1 Like

I just gave it a try and added a keyboard layout to type in Japanese. Because my system language is German, I translated the keywords to English what might not be exactly in accordance with the real words used. But I hope it’s understandable:

applications menu → settings → LXQt system settings → keyboard and mouse → keyboard layout

There add Japanese and remember the shown keys for changing the layout (for instance it’s left Ctrl + left Win). At last, click on ‘Apply’.
Now you should be able to change from the English keyboard to the Japanese and back by pressing simultaneously the mentioned keys.

Would you be so kind and give a feedback after you tried this? Thanks in advance! :slightly_smiling_face:

Addendum: Please press the keys for changing the layout for 5 seconds at least.

1 Like

Hi @Wolf314, thank you for this and probably we are on different pages. I’m not trying to add a keyboard (such as one I might buy in Japan that has the keys labeled “あ” and “か” and so on. (Nor do I want my English keyboard to have those key mappings.) What I need – and maybe I’m simply understanding this incorrectly – is this to map from the English, Latin “a” to a hiragana “あ” and the Latin two-letter “ka” to the single “か” and such. It’s a little different. There’s also a note (at least there in my English system) that says specifically that if I’m trying to do the latter the Keyboard option may not work.

(I did not actually do this though, as I’m worried it may cause conflicts. If you’re saying you can now type “o tearai ha doko desu ka” in Latin letters and it shows up as “お手洗いはどこですか” then that IS what I’m looking for.)

Thank you again, and please let me know what your result is, that’s probably the most important thing.

Yep, it works.

Clear methodology:

  1. Install the language-pack-ja package
  2. Install the fcitx-mozc package
  3. Open Fcitx (in System Tools)
  4. Logout and back in
  5. Right click on the keyboard looking icon in your system tray and click configure
  6. Click the Plus button
  7. Uncheck “Only Show Current Language”
  8. Search for “mozc”
  9. Click on the one and only result (“Mozc Japanese”) and click OK
  10. Open an application with an input field (here I use Featherpad)
  11. Type and it should be normal English input
  12. Hold down Ctrl and hit Space
  13. Start typing your Anglicized Japanese (Romanji, right?)
  14. When you want to switch back to English, hold down Ctrl and hit Space

I don’t know what I’m doing here but it seems that particular inputs, there are a variety of possible outputs. For example, here’s what comes up with “tearai:”

image

If you look at what’s in the input area, you’ll see it doesn’t match what you’re looking for. I could just hit enter at this point and accept what its given me, or I can hit tab to go through the list below. You can also click on it.

Hopefully you already understand all this :slight_smile:

4 Likes

So, I’ve been totally wrong, sorry.

In case the solution wxl found seems to be a bit too elaborate for you the conversion could also easily be done online, e.g. at this website.

1 Like

@wxl YES!!! This is EXACTLY it, though I haven’t yet had time to perform the steps. But the output you’re showing is perfect, and the reason there are other options in that pull down is that Japanese has an alphabet and you can write only in that (such as kids might), but then as you get better, you can put the actual pictographic words in (called Kanji). They all look the same to someone who doesn’t read Japanese but it’s a key part of the process. So seeing that you’ve got all these working is huge.

Thank you!

And @Wolf314 , thank you for your time but no, I’m not looking for anything online like that. One, it’s very time consuming and two, it isn’t particularly private. Either way, an online tool isn’t the best. But in an emergency, yes, I’ve had to use those kinds of things. But the other solution is what I’ve been looking for.

2 Likes

So, trying to get into this and I’m unable to install fcitx-mozc. I’m getting a lot of “…depends on XYZ but it is not going to be installed” errors. I tried “sudo apt --fix-broken install fcitx-mozc” but get the same message. Which may be (hard to remember, as I’ve been trying this for so long) what caused me to move away from Fcitx in the first place. (It was causing my system to hang.)

Any clues as to what the next steps might be? Is it because I have Ibus-anthy installed and that’s conflicting?

Probably, yes. Generally, two things doing the same thing tend to cause problems. You should be able to disable one or the other, in any case. They can both be installed on the same system but will probably cause issues if you actually run them at the same time.

The only way we can help you diagnose your specific broken package problem is to know the exact error message in all of its explicit detail.

For that matter, why doesn’t ibus-anthy meet your needs? Maybe your issue is with Anthy as an input method being different than Mozc? FWIW there is ibus-mozc.

1 Like

@wxl , thank you for (yet again!) helping.

Here’s the response to: sudo apt install ibus-mozc

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 bdsup2sub : Depends: openjdk-7-jre but it is not installable
 ibus-mozc : Depends: libprotobuf23 (>= 3.12.4) but it is not going to be installed
             Depends: mozc-data but it is not going to be installed
             Depends: mozc-server (= 2.26.4220.100+dfsg-5.2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

But when I run --fix-broken install it removes the package bdsup2sub, which I want to keep. And I don’t know why it’s saying “…not going to be installed.”

I have the input switcher. Just…no Japanese ever shows up.

It might help to know what you do have installed. Give us dpkg -l but maybe hide it.

Like so:
  1. Click the “Hide Details” option:
    image
  2. Change the value of “details” to the text you want shown (probably “dpkg -l”; note in this example, it’s “Like so:”
  3. Paste in your output between the [details] tags.
2 Likes

Sorry, I hope I’m doing this right. It took me a couple days to get back to this. My “dpkg -l” gives thousands of lines, is there a particular filter I can use to get this a little more manageable? Just seems like maybe I should grep for certain strings and get only the pertinent info?

Thanks!

Normally, I would say so, but, in this case, the only real way to unravel it is to know every single package installed on the system.

1 Like

Shucks, I tried, but the “Hide” option only allows 32,000 chars and my “dpkg -l” is 339,810. So I think we have to opt for some other way.

Try dpkg -l | pastebinit and leave the resulting link here.

1 Like

Here you go: Ubuntu Pastebin

1 Like

By looking at the output of (sudo apt install ibus-mozc),
I’m guessing at some point you probably forced the install of
bdsup2sub-5.1.2.deb

which has an unmet dependency of openjdk-7-jre.
This will hold up all other installs, which is why
you are getting those ‘not going to be installed’ msgs.

apt --fix-broken install
quite rightly will remove bdsup2sub-5.1.2.

After that you can install
sudo apt install ibus-mozc

After, you’ll have to find an alternative e.g bdsup2sub_4.0.0-dmo1_all.deb
which uses default-jre (instead of openjdk-7-jre).

Btw, ibus and fcitx won’t clash because they go through a selector (im-config aka. Preferences > Input Method).

4 Likes

出来ました!!!!!

Thank you guys for all the help. It was not quite as easy as the steps above, and when I got to Fcitx it hung my system…twice. But removing bdsup2sub got ibus-mozc installed, then I reinstalled fcitx-mozc, then I removed “Japanese” from my current Ibus input…and after that, I added the “fcitx-mozc” (which had an orange hiragana).

THEN I had to still logout and log back in, and when I did, I noticed the input field was showing. But still, it was only showing the romaji. Finally, I right clicked and shifted from the “A” to the hiragana, and it worked. Whew.

THANK YOU again for taking time to help me with this. I really appreciate it!!!

5 Likes

Big ups to @humpty for butting in and unraveling your dependency issues.

Just be extra careful when you’re installing software from outside the Ubuntu archives. It can cause all sorts of issues, including extra maintenance (unless you get a repo like e.g. with VirtualBox) and potential problems with your packages (as you’ve discovered). My general advice is to avoid outside software unless you really know what you’re doing.

One thing that might help you (although I’m not sure because I know probably less about subtitles than I do about Japanese input methods— and that’s not much) is using some package from the archives. There’s this Aegisub that seems like it could do what you want and a lot more.

As for your situation, I’m pretty sure that the only reason why my instructions didn’t work as written is because you were already using ibus. I bet if you start from a fresh system, it would work just fine. In fact, if you wanted to return the favor of our help, boot up Lubuntu live installation media and try it out in that situation. I’d do it myself, but, like I said, I don’t know anything about Japanese input!

2 Likes