Ask Your Question
1

How to use XCompose on Wayland?

asked 2016-10-09 16:50:35 -0500

Constantine0 gravatar image

I'm using a popular ~/.XCompose file. For that to work on X11 one had to set environment variables like:

XMODIFIERS=@im=xim
GTK_IM_MODULE="xim"
QT_IM_MODULE="xim"

But with Gnome-On-Wayland session this doesn't seem to do anything, perhaps because xim is X11 specific. Alternatively I could probably try IBus, but its Compose table never produces anything defined in the ~/.XCompose, i.e. greek letters, math symbols, nothing. It probably just ignores the file.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-10-12 06:33:47 -0500

Constantine0 gravatar image

updated 2016-10-12 06:34:48 -0500

I am not sure whether ibus simulates xkb settings, or using the libxkbcommon, but setxkbmap is the way to go.

  1. Remove the *_IM_MODULE and XMODIFIERS variables. It should probably work upon setting to ibus, but I tested with them cleared off.
  2. Make sure if ibus is running (in Fedora it should by default, it's just in case you disabled it previously).
  3. Execute setxkbmap with -option to choose compose key. E.g. to use the right logo key: setxkbmap -option compose:rwin. Here's a full command I execute:

    setxkbmap -layout us,ru -option grp:rctrl_rshift_toggle,grp_led:scroll,lv3:ralt_switch,compose:rwin
    

    You'd probably want to set a command to be executed for every start up.

Works for both Wayland and X11.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-10-09 16:50:35 -0500

Seen: 1,003 times

Last updated: Oct 12 '16