Skip to content

Instantly share code, notes, and snippets.

@ericdouglas
Last active April 23, 2025 01:03
Show Gist options
  • Save ericdouglas/74469cb97188751f71bfdcd7d28f75fd to your computer and use it in GitHub Desktop.
Save ericdouglas/74469cb97188751f71bfdcd7d28f75fd to your computer and use it in GitHub Desktop.
Cedilla under C (ç) in 'US international' keyboard layout in Linux

Add English (US, alt. intl.)

It's because the cedilla module isn't loaded by default when the locale is set to en, so you have to change the configuration files for gtk to add them:

  1. Edit configuration files:
sudo vim /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache

sudo vim /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache

On both, find the lines starting with "cedilla" "Cedilla" and add :en to the line. Something like this:

"cedilla" "Cedilla" "gtk30" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en"
  1. Change the Compose file:
sudo sed -i /usr/share/X11/locale/en_US.UTF-8/Compose -e 's/ć/ç/g' -e 's/Ć/Ç/g'
  1. Instruct the system to load the cedilla module:

Add those lines to /etc/environment:

GTK_IM_MODULE=cedilla
QT_IM_MODULE=cedilla

Reboot and you are done.

source

@mende1
Copy link

mende1 commented Jul 25, 2024

Works just fine for X11. But how about Wayland? Anyone have any idea?

Same question here. Besides that, what about on KDE environments rather than GNOME?

@esdrasbeleza
Copy link

Works just fine for X11. But how about Wayland? Anyone have any idea?

Same question here. Besides that, what about on KDE environments rather than GNOME?

@mende1: I got this working on KDE + Wayland:

  1. This is my ~/.XCompose:
include "/usr/share/X11/locale/pt_BR.UTF-8/Compose"
<dead_acute> <s> : "'s"
<dead_acute> <t> : "'t"
  1. Added this to ~/.config/environment.d/im.conf:
GTK_IM_MODULE=cedilla
QT_IM_MODULE=cedilla

This is incredibly user-unfriendly...

@Fuhrmann
Copy link

Única coisa que funcionou pra mim (ç):

Segue isso daqui -> https://www.danielkossmann.com/pt/ajeitando-cedilha-errado-ubuntu-linux/ e quando ele fala de GTK 4 tu faz: cp /usr/share/X11/locale/pt_BR.UTF-8/Compose ~/.XCompose Desloga e loga de novo. E sim, funciona no Wayland.
https://www.reddit.com/r/linuxbrasil/comments/1jj3o42/comment/mjkytw4/

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