Skip to content

Instantly share code, notes, and snippets.

@bus710
Last active December 29, 2025 03:43
Show Gist options
  • Select an option

  • Save bus710/5bbe40535ebf492c19228129f9cdb15b to your computer and use it in GitHub Desktop.

Select an option

Save bus710/5bbe40535ebf492c19228129f9cdb15b to your computer and use it in GitHub Desktop.

How to configure Sway, Fcitx, and Chrome for Korean IME

A brief note for Fcitx5 as the Korean Input Method in Debian Sid + Wayland + Sway

For more details: https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland


Steps

Install packages:

$ sudo apt install -y \
    fcitx5 \
    fcitx5-config-qt \
    fcitx5-hangul \
    qt5ct

# If need
$ sudo apt install -y \
        fonts-nanum \
        fonts-nanum-coding \
        fonts-noto-cjk 

Configure the env variables:

$ sudo vi /etc/environment # or ~/.profile

export GTK_IM_MODULE=fcitx # fcitx5 might show a warning if enable, but should be enabled for Chrome.
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export GLFW_IM_MODULE=ibus
export SDL_IM_MODULE=fcitx
export QT_SCALE_FACTOR=2 # for 4k monitors
export QT_QPA_PLATFORMTHEME=qt5ct

Add the fcitx daemon and Chrome launching parameters in the sway config:

$ vi ~/.config/sway/config

exec --no-startup-id fcitx5 -d
bindsym $mod+y exec google-chrome-stable --enable-features=UserOzonePlatform --ozone-platform=wayland --gtk-version=4 --enable-wayland-ime 

Update Chrome flags:

  1. Launch Chrome
  2. Open the flags page - chrome://flags
  3. Search for Preferred Ozone platform and configure it as Wayland

Fcitx5 and qt5ct configuration

Start the fcitx5-config-qt and configure it as needed.

  • Input Method: add Hangul and English(US)
  • Global Options:
    • Trigger Input Method: Control+Space or Shift+Space
    • Enumerate Input Method Forward: Control+Space or Shift+Space
    • Enumerate Input Method Backward: Empty
  • Apply and Save

Start the qt5ct and configure it as needed.

  • Appearance
    • Style: Fusion
    • Pallette: Custom
    • Color scheme: darker

Then reboot.


History

  • v0.0.1: initial note.
@sephid86
Copy link

sephid86 commented Dec 11, 2024

안녕하세요. Realtime 님 오랜만입니다...

어...

내용중에 크롬 한글 입력은 그렇게 하는거 보다

~/.config/chromium-flags.conf 파일 내용에 아래 옵션을
(또는 ~/.config/chrome-flags.conf)

--ozone-platform=wayland
--gtk-version=4

이렇게 처리 하는게 좋아요...

그리고 DE 마다 다른 입력기를 쓸때는 /etc/environment 에 설정하는거 보다

배쉬파일 하나 만들어서 export 뜨는게 좋습니다.
export 후에 gnome 이든 sway 든 kde 든 실행 하도록 하는 배쉬파일을 /bin 에 넣어주는거지요.

그리고 나서

/usr/share/wayland-sessions/ 여기에 세션 실행파일들 있어요.
세션 실행 desktop 파일 에서 Exec= 부분에 위에 만든 배쉬 파일 실행되도록 하면 됩니다.
기존 파일 수정하면 업데이트때 날아가니까 복사해서 새로 추가해주는게 좋습니다.

@bus710
Copy link
Author

bus710 commented Dec 11, 2024

@sephid86
오랜만입니다~ 요즘 참 시끌벅적한데, 잘 지내시죠?

좋은 팁들 감사합니다.

  • 크롬 플래그를 저렇게 외부로 뺄 수 있을 줄 몰랐네요.
  • 저 환경변수 설정도 저렇게 하면 확실히 유연하겠네요.

정 붙이고 지낼만한 리눅스 커뮤니티가 많지 않아서 아쉬운 요즘 입니다.
연말연시 잘 보내세요~

@sephid86
Copy link

sephid86 commented Dec 27, 2025

안녕하세요 Realtime 님. 오랜만입니다.

이제 크롬이나 크로미움에서 아래 플래그 없어도 될겁니다.

--ozone-platform=wayland
--gtk-version=4

정확히 언제 날짜 기준부터 되는지는 몰라도 아마 데비안 13부터는 될겁니다.

리눅스 새로설치한 시스템에 hyprland 랑 niri 에서 위 플래그 추가 설정 안해줘도
한글 입력 잘 되는거 확인 했습니다.

아치리눅스랑 nixos 에서 테스트 했어요.
물론 환경변수는 기존 처럼 존재해야 합니다.

환경변수 처리 방법이 sway 에서는 제가 위에 코멘트 한것처럼 처리하는게 좋고
(최근 sway 설정파일에서도 환경변수 추가가 가능한지는 확인 못했습니다.)

hyprland 나 niri 에선 설정파일에서 환경변수 추가해주면 됩니다.

niri 써보셨는지 모르겠는데. 써보세요. 정말 잘만들어졌습니다. 😄

새해 복 많이 받으세요~!

✨ Happy New Year 2026! 🚀

@bus710
Copy link
Author

bus710 commented Dec 29, 2025

@sephid86
새로운 좋은 팁 주셔서 감사 드립니다.
새해 복 많이 받으세요!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment