This is a recurrent situation as a bilingual user. I wanted to type spanish characters in the terminal and the following command let me set the keyboard layout to international american with dead keys:
setxkbmap -layout us -variant intl_nodeadkeys
Unfortunately this command does not work as I expected and I needed to fall back to:
and then select us internatilnal which loads us-acentos
After that ' + e leads to é.