Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

75%
+4 −0
Q&A Disable transient symbols for compose and dead keys in GTK programs

This is originally Ibus' (an input method) behavior. It provides some facilities to extend the basic "input by typing". Examples: Ctrl+Shift+U for hex Unicode input. Ctrl+. for emoji selector. ...

posted 3y ago by Quasímodo‭  ·  edited 2y ago by Quasímodo‭

Answer
#3: Post edited by user avatar Quasímodo‭ · 2022-12-04T00:19:30Z (almost 2 years ago)
Ibus must also be killed
  • This is related to [GTK having its own][0] [input method][1], which overrules the native X Window System method and even other third-party methods, such as Ibus and Fcitx.
  • An user with basic needs (for instance, one who only inputs ASCII) wouldn't notice the differences between them. One such difference is [`Ctrl+Shift+U` allowing for hex Unicode input in GTK][2]. Another is the one mentioned in the question.
  • Fortunately, you can tell GTK which input method to use with the [`GTK_IM_MODULE` environment variable][7]. The available modules can be listed with
  • gtk-query-immodules-3.0
  • One who doesn't do fancy things beyond dead keys or compose, which the native X Input Method supports, can simply choose `xim` from that list.
  • To verify if it works, launch the GTK application (here, Firefox) with
  • GTK_IM_MODULE=xim firefox
  • Once satisfied with the selected input method, put that variable in a initialization file so that you don't have to type it by hand every time. The right file depends on your system; Since I always start my session at a login shell, I find `.profile` ideal, but others to consider are `.xinitrc` and `.xsession`. Note that `.bashrc` may not be good enough if you log-in via a display manager and want to keep using launchers to start your programs.
  • ### Conclusion
  • Add this line to `~/.profile` and reboot.
  • export GTK_IM_MODULE=xim
  • ### Additional references
  • - [Fcitx: Input method related environment variables][3].
  • - [Unix & Linux: Dead (compose) keys not working in GTK apps since upgrade][4].
  • - [Unix & Linux: Understanding and setting up different input methods][5].
  • - [Wikipedia: List of input methods for Unix platforms][6].
  • [0]: https://docs.gtk.org/gtk3/class.IMContext.html
  • [1]: https://en.wikipedia.org/wiki/Input_method
  • [2]: https://wiki.gentoo.org/wiki/Input_methods
  • [3]: https://fcitx-im.org/wiki/Input_method_related_environment_variables#GTK_IM_MODULE
  • [4]: https://unix.stackexchange.com/questions/39547/dead-compose-keys-not-working-in-gtk-apps-since-upgrade
  • [5]: https://unix.stackexchange.com/questions/260601/understanding-setting-up-different-input-methods/262220
  • [6]: https://en.wikipedia.org/wiki/List_of_input_methods_for_Unix_platforms
  • [7]: https://docs.gtk.org/gtk3/running.html
  • This is originally Ibus' (an [input method][1]) behavior. It provides some facilities to extend the basic "input by typing". Examples:
  • - [`Ctrl+Shift+U` for hex Unicode input][2].
  • - [`Ctrl+.` for emoji selector][22].
  • Now, to complicate matters, [GTK has its own][0] input method too, which is inspired in Ibus, and overrules the native X Window System method and perhaps (it's not clear to me) even other third-party input methods.
  • An user with basic needs, who doesn't do much beyond dead keys or compose, which the native X Input Method supports, can do away with all that extra functionality.
  • So first uninstall Ibus, or, if unsure, just kill it:
  • pkill ibus
  • Then, use [`GTK_IM_MODULE=xim` environment variable][7] to tell GTK you don't want its input method, but X's.
  • <sup>
  • As an aside, the available modules can be listed with `/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0` in Debian systems or in a similar path in others.
  • </sup>
  • To verify if it works, launch the GTK application (here, Firefox) with
  • GTK_IM_MODULE=xim firefox
  • Once satisfied with the selected input method, put that variable in a initialization file so that you don't have to type it by hand every time. The right file depends on your system; Since I always start my session at a login shell, I find `.profile` ideal, but others to consider are `.xinitrc` and `.xsession`. Note that `.bashrc` may not be good enough if you log-in via a display manager and want to keep using launchers to start your programs.
  • ### Conclusion
  • 1. Uninstall Ibus.
  • 2. Add this line to `~/.profile` and reboot.
  • export GTK_IM_MODULE=xim
  • It might be that only one of those is needed depending on your set up.[]()
  • ### Additional references
  • - [Fcitx: Input method related environment variables][3].
  • - [Unix & Linux: Dead (compose) keys not working in GTK apps since upgrade][4].
  • - [Unix & Linux: Understanding and setting up different input methods][5].
  • - [Wikipedia: List of input methods for Unix platforms][6].
  • [0]: https://docs.gtk.org/gtk3/class.IMContext.html
  • [1]: https://en.wikipedia.org/wiki/Input_method
  • [2]: https://wiki.gentoo.org/wiki/Input_methods
  • [22]: https://askubuntu.com/questions/1039008/how-can-i-change-the-keyboard-shortcut-for-emoji-picker
  • [3]: https://fcitx-im.org/wiki/Input_method_related_environment_variables#GTK_IM_MODULE
  • [4]: https://unix.stackexchange.com/questions/39547/dead-compose-keys-not-working-in-gtk-apps-since-upgrade
  • [5]: https://unix.stackexchange.com/questions/260601/understanding-setting-up-different-input-methods/262220
  • [6]: https://en.wikipedia.org/wiki/List_of_input_methods_for_Unix_platforms
  • [7]: https://docs.gtk.org/gtk3/running.html
#2: Post edited by user avatar Quasímodo‭ · 2022-01-22T14:38:47Z (almost 3 years ago)
Additional references
  • This is related to GTK having its own [input method][1], which overrules the native X Window System method and even other third-party methods, such as Ibus and Fcitx.
  • An user with basic needs (for instance, one who only inputs ASCII) wouldn't notice the differences between them. One such difference is [`Ctrl+Shift+U` allowing for hex Unicode input in GTK][2]. Another is the one mentioned in the question.
  • Fortunately, you can tell GTK which input method to use with the `GTK_IM_MODULE` environment variable. The available modules can be listed with
  • gtk-query-immodules-3.0
  • One who doesn't do fancy things beyond dead keys or compose, which the native X Input Method supports, can simply choose `xim` from that list.
  • To verify if it works, launch the GTK application (here, Firefox) with
  • GTK_IM_MODULE=xim firefox
  • Once satisfied with the selected input method, put that variable in a initialization file so that you don't have to type it by hand every time. The right file depends on your system; Since I always start my session at a login shell, I find `.profile` ideal, but others to consider are `.xinitrc` and `.xsession`. Note that `.bashrc` may not be good enough if you log-in via a display manager and want to keep using launchers to start your programs.
  • ### Conclusion
  • Add this line to `~/.profile` and reboot.
  • export GTK_IM_MODULE=xim
  • ### Additional references
  • - [Fcitx: Input method related environment variables][3].
  • - [Unix & Linux: Dead (compose) keys not working in GTK apps since upgrade][4].
  • - [Unix & Linux: Understanding and setting up different input methods][5].
  • - [Wikipedia: List of input methods for Unix platforms][6].
  • [1]: https://en.wikipedia.org/wiki/Input_method
  • [2]: https://wiki.gentoo.org/wiki/Input_methods
  • [3]: https://fcitx-im.org/wiki/Input_method_related_environment_variables#GTK_IM_MODULE
  • [4]: https://unix.stackexchange.com/questions/39547/dead-compose-keys-not-working-in-gtk-apps-since-upgrade
  • [5]: https://unix.stackexchange.com/questions/260601/understanding-setting-up-different-input-methods/262220
  • [6]: https://en.wikipedia.org/wiki/List_of_input_methods_for_Unix_platforms
  • This is related to [GTK having its own][0] [input method][1], which overrules the native X Window System method and even other third-party methods, such as Ibus and Fcitx.
  • An user with basic needs (for instance, one who only inputs ASCII) wouldn't notice the differences between them. One such difference is [`Ctrl+Shift+U` allowing for hex Unicode input in GTK][2]. Another is the one mentioned in the question.
  • Fortunately, you can tell GTK which input method to use with the [`GTK_IM_MODULE` environment variable][7]. The available modules can be listed with
  • gtk-query-immodules-3.0
  • One who doesn't do fancy things beyond dead keys or compose, which the native X Input Method supports, can simply choose `xim` from that list.
  • To verify if it works, launch the GTK application (here, Firefox) with
  • GTK_IM_MODULE=xim firefox
  • Once satisfied with the selected input method, put that variable in a initialization file so that you don't have to type it by hand every time. The right file depends on your system; Since I always start my session at a login shell, I find `.profile` ideal, but others to consider are `.xinitrc` and `.xsession`. Note that `.bashrc` may not be good enough if you log-in via a display manager and want to keep using launchers to start your programs.
  • ### Conclusion
  • Add this line to `~/.profile` and reboot.
  • export GTK_IM_MODULE=xim
  • ### Additional references
  • - [Fcitx: Input method related environment variables][3].
  • - [Unix & Linux: Dead (compose) keys not working in GTK apps since upgrade][4].
  • - [Unix & Linux: Understanding and setting up different input methods][5].
  • - [Wikipedia: List of input methods for Unix platforms][6].
  • [0]: https://docs.gtk.org/gtk3/class.IMContext.html
  • [1]: https://en.wikipedia.org/wiki/Input_method
  • [2]: https://wiki.gentoo.org/wiki/Input_methods
  • [3]: https://fcitx-im.org/wiki/Input_method_related_environment_variables#GTK_IM_MODULE
  • [4]: https://unix.stackexchange.com/questions/39547/dead-compose-keys-not-working-in-gtk-apps-since-upgrade
  • [5]: https://unix.stackexchange.com/questions/260601/understanding-setting-up-different-input-methods/262220
  • [6]: https://en.wikipedia.org/wiki/List_of_input_methods_for_Unix_platforms
  • [7]: https://docs.gtk.org/gtk3/running.html
#1: Initial revision by user avatar Quasímodo‭ · 2022-01-21T16:18:08Z (almost 3 years ago)
This is related to GTK having its own [input method][1], which overrules the native X Window System method and even other third-party methods, such as Ibus and Fcitx.

An user with basic needs (for instance, one who only inputs ASCII) wouldn't notice the differences between them. One such difference is [`Ctrl+Shift+U` allowing for hex Unicode input in GTK][2]. Another is the one mentioned in the question.

Fortunately, you can tell GTK which input method to use with the `GTK_IM_MODULE` environment variable. The available modules can be listed with

    gtk-query-immodules-3.0

One who doesn't do fancy things beyond dead keys or compose, which the native X Input Method supports, can simply choose `xim` from that list. 

To verify if it works, launch the GTK application (here, Firefox) with

    GTK_IM_MODULE=xim firefox

Once satisfied with the selected input method, put that variable in a initialization file so that you don't have to type it by hand every time. The right file depends on your system; Since I always start my session at a login shell, I find `.profile` ideal, but others to consider are `.xinitrc` and `.xsession`. Note that `.bashrc` may not be good enough if you log-in via a display manager and want to keep using launchers to start your programs.

### Conclusion

Add this line to `~/.profile` and reboot.

    export GTK_IM_MODULE=xim

### Additional references

- [Fcitx: Input method related environment variables][3].
- [Unix & Linux: Dead (compose) keys not working in GTK apps since upgrade][4].
- [Unix & Linux: Understanding and setting up different input methods][5].
- [Wikipedia: List of input methods for Unix platforms][6].

[1]: https://en.wikipedia.org/wiki/Input_method
[2]: https://wiki.gentoo.org/wiki/Input_methods
[3]: https://fcitx-im.org/wiki/Input_method_related_environment_variables#GTK_IM_MODULE
[4]: https://unix.stackexchange.com/questions/39547/dead-compose-keys-not-working-in-gtk-apps-since-upgrade
[5]: https://unix.stackexchange.com/questions/260601/understanding-setting-up-different-input-methods/262220
[6]: https://en.wikipedia.org/wiki/List_of_input_methods_for_Unix_platforms