How to Enable a Japanese IME in Rocky Linux 9.6
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
ibus– the input frameworkibus-anthy– Japanese IME using Anthy@input-methods– includes CJK IMEs (docs.redhat.com, en.wikipedia.org)
🛠 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
-ddaemonise-rrestart existing-xenable 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-setupFrom there, adjust global shortcuts (e.g.,
Ctrl + Jto toggle).
✅ Quick Validation
- Open a text editor (like Gedit or LibreOffice).
- Press Ctrl + Space → the panel icon should show “A ち” or “あ”.
- 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!