How to Enable a Japanese IME in Rocky Linux 9.6

Here’s a complete, working solution for enabling Japanese Input Method (IME) on Rocky Linux 9.6, which is compatible with RHEL 9:


✅ Step 1: Install Input Method Packages

First install the input method framework and Japanese engine:

sudo dnf install ibus ibus-anthy @input-methods

🛠 Step 2: Configure Environment

Add these lines to ~/.bashrc (or ~/.bash_profile, ~/.zshrc):

export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus

Then reload the shell or log out/in:

source ~/.bashrc

This ensures graphical apps use IBus properly (reddit.com, reddit.com).


🚀 Step 3: Start IBus

Launch the IBus daemon (auto-starts in GUI):

ibus-daemon -drx
  • -d daemonise
  • -r restart existing
  • -x enable XIM support This sets up IME support according to the ArchWiki and Reddit guides (reddit.com, rockylinux.org).

🌐 Step 4: Add Japanese Input in GNOME

If you’re running GNOME (default in Rocky Linux GUI):

  • Go to Settings –> Keyboard –> Japanese and select Anthy.

⌨️ Step 5: Switching Input Modes

  • Ctrl + Space toggles between English and Japanese input once it’s active (askubuntu.com)
  • You can customise shortcuts in IBus Preferences, accessible via the panel icon or running:

    ibus-setup
    

    From there, adjust global shortcuts (e.g., Ctrl + J to toggle).


✅ Quick Validation

  1. Open a text editor (like Gedit or LibreOffice).
  2. Press Ctrl + Space → the panel icon should show “A ち” or “あ”.
  3. Type using romaji (e.g. konnichiwa) — you’ll see hiragana/kanji candidates.

🔧 Alternative: ibus-mozc

If you’d prefer Mozc (Google’s Japanese IME), install it:

sudo dnf install ibus-mozc

Then add Japanese (Mozc) in Input Sources. Everything else remains the same (issuetracker.google.com, wiki.archlinux.org, askubuntu.com, en.wikipedia.org).


🧩 Summary Table

Step Action Purpose
1 dnf install ibus ibus-anthy @input-methods Install IME framework & Anthy
2 Add env variables to shell config Ensure GUI apps use IBus
3 ibus-daemon -drx Start IBus service
4 GNOME Settings → Add Japanese (Anthy/Mozc) Enable IM in GUI
5 Use Ctrl + Space Switch input mode

With these steps, Japanese input will function fully in apps like GNOME Terminal, LibreOffice, VS Code, and more on Rocky Linux 9.6. Need help customising shortcuts, installing Mozc instead, or using KDE instead of GNOME? Let me know!

Updated: