Skip to content

Instantly share code, notes, and snippets.

@nilo
Created July 30, 2015 15:42
Show Gist options
  • Star 60 You must be signed in to star a gist
  • Fork 18 You must be signed in to fork a gist
  • Save nilo/c2a31a0f9f29c88145ca to your computer and use it in GitHub Desktop.
Save nilo/c2a31a0f9f29c88145ca to your computer and use it in GitHub Desktop.
Using cedilha - ArchLinux Cinnamon
Author: Nilo Dantas - n1lo
Based on: https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/518056 - helio-valente post
How to use Cedilha on US Keyboard on ArchLinux
1) Put: English(US, internacional with dead Keys) on your system keyboard layout.
2) Editing the files:
sudo vim /usr/lib/gtk-3.0/3.0.0/immodules.cache
sudo vim /usr/lib/gtk-2.0/2.10.0/immodules.cache
changing the line
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa"
to
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en"
3) replacing "ć" to "ç" and "Ć" to "Ç" on /usr/share/X11/locale/en_US.UTF-8/Compose
sudo cp /usr/share/X11/locale/en_US.UTF-8/Compose /usr/share/X11/locale/en_US.UTF-8/Compose.bak
sed 's/ć/ç/g' < /usr/share/X11/locale/en_US.UTF-8/Compose | sed 's/Ć/Ç/g' > Compose
sudo mv Compose /usr/share/X11/locale/en_US.UTF-8/Compose
4) add two lines on /etc/environment
GTK_IM_MODULE=cedilla
QT_IM_MODULE=cedilla
5)restart your computer
@paulogdm
Copy link

Very nice and quick doc!!!
This works for deepin desktop and others, and the step 3 is not needed in most cases.

@mvrozanti
Copy link

Location /usr/lib/gtk-x.x.0/ does not exist in Mint Cinnamon

@rhiroyuki
Copy link

Thank you, it was really easy to do it :)
Worked on Manjaro Cinnamon flawlessly.

@JMarceloFN
Copy link

Hello there,

I made this account just to say thank you, everything working fine (using Arch Linux with Cinnamon). In brazilian portuguese "Matou a pau!"

Cheers,

Marcelo

@s7agv
Copy link

s7agv commented Jul 28, 2020

Excellent step by step I didn't even have to think about what I was doing lol, works no problem on Arch Linux with GNOME. Obrigadão.

@1johnharrison
Copy link

Logged just to thank you! ;)
Worked niceeeeeeee on Manjaro 20 KDE Plasma.

@clenio
Copy link

clenio commented Nov 28, 2020

Thancks!

@flaprano
Copy link

flaprano commented Jan 2, 2021

Thanks.
Worked on Manjaro 20.2 KDE and Gnome

@psygo
Copy link

psygo commented Mar 7, 2021

Awesome stuff. Just a minor suggestion: put this in a markdown file so it's even easier to read — I took the time to do that here.

If you have a quick solution in the same vein to the annoying union of ' and s (ś), please do share.

@sebastianwebber
Copy link

does anyone found a way to fix this using snap too?

This solution works only for non snap applications =/

@Dssdiego
Copy link

Awesome! Thank you very much!

@victorjatoba
Copy link

Aqui está a prova de que funcionou ç Ç

Thank U so much

@TiuTalk
Copy link

TiuTalk commented Aug 28, 2022

If anyone wants to do this with a single script or from the command line:

#!/usr/bin/env bash

sudo sed -i '/^"cedilla"/s/:pt:/:pt:en:/' /usr/lib/gtk-*/**/immodules.cache

sudo cp /usr/share/X11/locale/en_US.UTF-8/Compose /usr/share/X11/locale/en_US.UTF-8/Compose.bak
sudo sed -i 's/ć/ç/g' /usr/share/X11/locale/en_US.UTF-8/Compose
sudo sed -i 's/Ć/Ç/g' /usr/share/X11/locale/en_US.UTF-8/Compose

grep -q GTK_IM_MODULE /etc/environment || (echo "GTK_IM_MODULE=cedilla" | sudo tee -a /etc/environment)
grep -q QT_IM_MODULE /etc/environment || (echo "QT_IM_MODULE=cedilla" | sudo tee -a /etc/environment)

@emersonbarros
Copy link

You do not need all the script, only this item worked for me:

grep -q GTK_IM_MODULE /etc/environment || (echo "GTK_IM_MODULE=cedilla" | sudo tee -a /etc/environment)
grep -q QT_IM_MODULE /etc/environment || (echo "QT_IM_MODULE=cedilla" | sudo tee -a /etc/environment)

@psygo
Copy link

psygo commented Jan 13, 2024

While configuring FCITX for Asian languages, it's recommended to use:

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export SDL_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

which conflicts with the above mentioned configuration.

I wonder if anyone has an alternative to this.

@nywton
Copy link

nywton commented Feb 13, 2024

I get it working by using setxkbmap on archlinux:

$ setxkbmap -layout us -variant intl

@psygo
Copy link

psygo commented Feb 13, 2024

@nywton Even with FCITX?

@nywton
Copy link

nywton commented Feb 13, 2024

@nywton Even with FCITX?

@psygo How could I check which input method framework I'm current using on arch linux? My desktop is i3wm

 ps aux | grep fcitx && ps aux | grep ibus

kyoris    103201  0.0  0.0   6560  2432 pts/0    S+   15:14   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox fcitx
kyoris    103201  0.0  0.0   6560  2432 pts/0    S+   15:14   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox ibus

@psygo
Copy link

psygo commented Feb 14, 2024

@nywton Typically, I see that FCITX is working by its icon on my top bar icon tray. I'm also using setxkbmap -layout us -variant intl on Arch, but what I get is ć still unfortunately.

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