0

In about 5 years of using Ubuntu, I could never the Compose Key to behave as I wanted despite a few attempts. Until Ubuntu 16.04 the Compose Key gave me the characters "œ", "Œ", "…" and "ğ" so I was satisfied. Those 4 were gone when I upgraded to Ubuntu 16.10. Among others, Compose "o" "e" did "½" instead of the French digram "œ". I'm pretty sure no sane mind programmed this behaviour (and a search in Compose files shows nothing like this), so I'm assuming there was some encoding problem, with œ being incorrectly displayed as ½ (in the same way that accentuated cyrillic letters can be displayed as latin letters when there is an encoding issue.

I upgraded to Ubuntu 17.04 and now this is fixed. Hurray for "œ", "Œ" and "…". However it has another strange behaviour. For example with "g" "u" it does ψ. In total I get 12 small Greek letters and a few capital ones. With "B" "A" until "B" "Z" I get 𝔸 until ℤ. I also get:

  • <:> <)> → ☺
  • <;)> <)> → 😉
  • <8> <8> → ∞

And I know exactly where this unique behaviour is from. It's the behaviour I had customized in the ISO8859-15 Compose file before my upgrade to Ubuntu 17.04... but it never worked, and I moved this file to another folder and renamed it, so the system cannot be using it (and shouldn't anyway since I'm not in ISO8859-15). Obviously it made a copy of the file I had started to customized (it didn't work, which is why I didn't finish). Please tell me where is the Compose file actually that is used, so I can modify it as needed ???? My "locale" output is

LANG=fr_FR.UTF-8
LANGUAGE=fr_FR:en
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=fr_FR.UTF-8
LC_NAME=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8 LC_MEASUREMENT=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_ALL=

I did sudo dpkg-reconfigure locales and selected fr_FR.ISO-8859-15@euro as default, then rebooted, that didn't change the locale output: Why??? I also did sudo locale-gen fr_FR@euro, still no change to the locale output.

I should mention that AltGr+a does "æ" (same as Compose "a" "e"). With ISO-8859-15 I think it should do "@" (not sure 100%...). My /etc/default/locale file says LANG=fr_FR@euro

It can be related or not (both are problems related to keyboard input), the Anthy thingy (to write in Japanese) in the upper bar (the bar with the time, date , sound volume...) disappeared and I cannot get it back (reinstalled, no result). Thank you!

closed as too broad by Gunnar Hjalmarsson, Ravexina, Eric Carvalho, Zanna, David Foerster Nov 1 '17 at 10:05

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I would really recommend you to split this question into at least two: One about the compose key, one about the effective locale. As it's currently written it's hard to help. – Gunnar Hjalmarsson Oct 25 '17 at 19:08
  • Thank you @GunnarHjalmarsson. The problem is I don't understand the problem. It seems to me that if I could either set the locale then edit the corresponding Compose file, or find the Compose file actually used, it would solve the issue, so to me it's only one problem. Currently the locale is set on fr_FR.UTF-8, but there is no fr_FR.UTF-8 folder in the /usr/share/X11/locale folder so I assumed initially I should change the Compose file in the en_US.UTF_8 folder. There is however a fi_FI.UTF-8 folder. Thanks for any idea you might have about this double problem. – Nicolas Oct 26 '17 at 12:58
  • compose key sequences are hardcoded in gnome and in kde. If you want to use a custom compose key layout, you need to use xim as in @GunnarHjalmarsson 's answer. – chaskes Oct 27 '17 at 1:21
  • @chaskes: They're not hard-coded. Everybody with super-user privileges can edit the key mapping files which also define composed sequences. – David Foerster Nov 1 '17 at 10:05
  • @DavidFoerster That hasn't been true for a while. But you can get around this by using xim, which is why Gunnar's answer says to use xim. See ubuntu wiki – chaskes Nov 1 '17 at 11:05
2

It sounds to me as if you want to create the file ~/.XCompose and put whatever you want to be used there. As the first line you may want to have:

include "/usr/share/X11/locale/en_US.UTF-8/Compose"

For that to work, you also need to set "xim" as your input method. It can be done from terminal:

im-config -n xim

~/.XCompose will be used whatever your locale is.

  • Thank you very much for pointing in the right direction. Switching to xim was a disaster. I couldn't write in French any more, with no access to dead keys (for ï, ô, ë, ê…). However after this I upgraded from 17.04 to 17.10, and now (in iBus) the layout more or less follows the .XCompose file (which I did not know about) and I finally could make changes that are applied after reboot. I have α, β, γ… yay! However some changes I tried do not work (but I can use a variation that does), and for example Compose "! s" gives ṣ which comes from the eu_US-UTF-8 Compose file, so some mystery remains. – Nicolas Nov 3 '17 at 13:17
  • @Nicolas: I suspect that you run into bug #1573755. If so, and if you create an additional user, it might work without mysteries with xim enabled. – Gunnar Hjalmarsson Nov 3 '17 at 14:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.