I was developing on an Ubuntu EC2 instance via NICE DCV and ran into a frustrating issue: after installing kime (a Korean IME for Linux), it would only type one Korean character before immediately switching back to English mode.
Environment
- Ubuntu (GNOME, X11)
- NICE DCV 2025.0 (web client)
- kime 3.1.1
Symptom
After toggling to Korean mode with Shift+Space or Hangul key, only one character gets typed before it reverts to English. For example, trying to type “안녕하세요” would result in just “ㅇ” followed by English characters.
Root Cause Analysis
1. kime config syntax error
The system config /etc/xdg/kime/config.yaml had Shift-Space, but kime 3.x requires the S-Space syntax.
kime-check
# Config file ... Fail (Can't parse config.yaml: engine.global_hotkeys:
# invalid value: string "Shift-Space", expected Key)
2. GNOME ibus hangul conflict
Having ('ibus', 'hangul') in GNOME input sources conflicts with kime.
3. The real culprit: DCV intercepting keyboard events
Even after fixing the above two issues, the one-character symptom persisted. Enabling trace-level logging in kime revealed that kime never registered a toggle to Hangul mode — the indicator kept showing “Latin” only.
DCV interprets keyboard events on the client side before forwarding them to the server. This means kime, running on the server, never receives the raw key events it needs to function properly.
Solution
1. Create user kime config
Create ~/.config/kime/config.yaml to override the broken system config:
daemon:
modules:
- Xim
- Wayland
- Indicator
indicator:
icon_color: Black
engine:
default_category: Latin
global_category_state: true
global_hotkeys:
S-Space:
behavior: !Toggle
- Hangul
- Latin
result: Consume
AltR:
behavior: !Toggle
- Hangul
- Latin
result: Consume
Hangul:
behavior: !Toggle
- Hangul
- Latin
result: Consume
Esc:
behavior: !Switch Latin
result: Bypass
latin:
layout: Qwerty
preferred_direct: true
hangul:
layout: dubeolsik
word_commit: false
preedit_johab: Needed
Key changes: Shift-Space → S-Space, global_category_state: true
2. Clean up GNOME input sources
# Remove ibus hangul, keep only US keyboard
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us')]"
# Set im-config to kime
im-config -n kime
3. Enable DCV server-side keyboard layout (the key fix!)
Add to /etc/dcv/dcv.conf:
[input]
use-server-keyboard-layout='always-on'
This tells DCV to pass keyboard events to the server as-is instead of interpreting them on the client side.
4. Set system-wide environment variables
Add to /etc/environment so the DCV session picks up kime:
GTK_IM_MODULE=kime
QT_IM_MODULE=kime
XMODIFIERS=@im=kime
5. Apply changes
sudo systemctl restart dcvserver
Reconnect from the DCV client and Korean input should work.
Result
Right Altfor Korean/English toggle: works reliablyShift+Space: still intercepted by the DCV web clientHangulkey: depends on your keyboard
In a DCV environment, Right Alt is the most reliable toggle key.
Summary
| Config file | Change |
|---|---|
~/.config/kime/config.yaml | User config (syntax fix + global_category_state) |
/etc/dcv/dcv.conf | use-server-keyboard-layout='always-on' |
/etc/environment | 3 kime environment variables |
| GNOME input sources | ('xkb', 'us') only |
If Korean input doesn’t work on DCV, it’s most likely because DCV is intercepting key events before the server-side IME can process them. use-server-keyboard-layout='always-on' is the key fix.