I needed to write a few things in Portuguese and have never had to type accented characters on Linux before.
Since this was kind of a pain to figure out and I will likely forget how to do this, I wrote down the steps.
Here’s how I set this up in Ubuntu 20.04.
- Install gnome-tweaks:
apt install gnome-tweaks
- Run
gnome-tweaks
from a terminal. - Set a “Compose Key”. I set mine to the right Alt key.
- Compose + letter + [ ‘ ” ` ~ , ] will type the accented character. For example to type a