Setxkbmap configuratin file used by X11… Which one!?

I use setxkbmap -option compose:menu to get my special binding to be enabled. In 90% of applications, this is enough. However, some flatpack/snap ones do not seem to pick the added ones.

I have:

√ ; localectl status
   System Locale: LANG=en_GB.UTF-8
       VC Keymap: gb
      X11 Layout: gb

But where is the configuration file for gb that defines the basic ones? I can then add my changes there and it should work everywhere. But where is it?…

My configuration file, in case you wanted to know:

include "%L"

<Multi_key> <Z> <Z> : "ℤ" # Blackboard bold Z (set of integers)
<Multi_key> <i> <i> : "⸮" # Irony mark.
<Multi_key> <h> <h> : "←" # Left arrow.
<Multi_key> <j> <j> : "↓" # Down arrow.
<Multi_key> <k> <k> : "↑" # Up arrow.
<Multi_key> <l> <l> : "→" # Right arrow.
<Multi_key> <1> <1> : "☺" # Happy.
<Multi_key> <2> <2> : "☹" # Sad.
<Multi_key> <3> <3> : "¯\\_(ツ)_/¯" # Shrug.

Have a look if this helps ?

https://discussion.fedoraproject.org/t/how-to-define-custom-keyboard-mappings-under-fedora-silverblue/77368

Kind of… This is talking about xmodmap which sadly is not supported by many applications or was not at the time I moved to XCompose which worked fine for everything till now.

Here’s the funny thing. In Signal (installed via flatpack), the ellipses works fine but the irony mark does not. So, I greped for those in /usr/share/X11 thinking that I could add the irony mark to whichever file had my local (en_GB) like so:

√ X11 # pwd
/usr/share/X11
√ X11 # rg '⸮' ** | rg Multi_key
locale/en_US.UTF-8/Compose:<Multi_key> <i> <i> : "⸮" # Irony mark.
√ X11 # rg '…' ** | rg Multi_key
locale/el_GR.UTF-8/Compose:<Multi_key> <period> <period>		: "…"	ellipsis
locale/en_US.UTF-8/Compose:<Multi_key> <period> <period>    	: "…"   ellipsis # HORIZONTAL ELLIPSIS
locale/en_US.UTF-8/Compose.bak:<Multi_key> <period> <period>    	: "…"   ellipsis # HORIZONTAL ELLIPSIS

el_GR is not what I use, so I ignored it. en_US was the closest to en_GB I could find so that’s where it went.

A reboot later, I still get ellipsis fine but not irony mark! ¯\_(ツ)_/¯ WTH?

Therefore, I strongly suspect there is yet-another-file that controls this.

Hi, if you already enable compose key, most of the time it need to reload the session (log out and login again) to apply the changes.

Update:

Below are what I did.

Enable compose key using Gnome Tweaks app “Keboard & Mouse” → “Compose Key” (for me the Gnome Settings sometimes not reliable to select the compose key).

Create file ~/.XCompose:

[testcase@fedora ~]$ cat ~/.XCompose 
include "%L"

<Multi_key> <i> <i>     : "⸮" # irony

Log out and login again.

That is literally what I am doing… Signal, via flatpack is not picking the changes. ¯\_(ツ)_/¯

If you already create ~/.XCompose in your user home dir, you need to give org.signal.Signal flatpak app permission to access you home dir. Here how:

# Give permission to access home dir.
sudo flatpak override --filesystem=home org.signal.Signal

# Check current permission.
# On part `filesystems=` there will be new variable, home.
[testcase@fedora ~]$ flatpak info --show-permissions org.signal.Signal
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;
devices=all;
filesystems=xdg-music;xdg-pictures;xdg-public-share;xdg-videos;xdg-download;home;xdg-documents;xdg-desktop;xdg-run/pipewire-0;

[Session Bus Policy]
org.kde.StatusNotifierWatcher=talk
org.freedesktop.Notifications=talk
org.freedesktop.portal.Background=talk
org.freedesktop.portal.Fcitx=talk
org.kde.*=own

# To remove the permission of accessing home dir.
sudo flatpak override --nofilesystem=home org.signal.Signal

Logout and login again then open again Signal app.

3 Likes

:tada: :grin:

Thank you so much for this! I followed your clear instructions and it worked. Much appreciated!!!

It appears this is no longer working…

√ ; sudo flatpak override --filesystem=home org.signal.Signal
√ ; flatpak info --show-permissions org.signal.Signal
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;
devices=all;
filesystems=xdg-documents;xdg-desktop;xdg-music;xdg-download;xdg-pictures;xdg-videos;xdg-public-share;

[Session Bus Policy]
org.freedesktop.Notifications=talk
com.canonical.indicator.application=talk
org.freedesktop.portal.Background=talk
org.freedesktop.portal.Fcstrong textx=talk
org.gnome.Mutter.IdleMonitor=talk
org.kde.StatusNotifierWatcher=talk
org.ayatana.indicator.application=talk
com.canonical.AppMenu.Registrar=talk
org.kde.*=own

[Environment]
SIGNAL_DISABLE_GPU=0
SIGNAL_USE_TRAY_ICON=0
SIGNAL_USE_WAYLAND=0
SIGNAL_START_IN_TRAY=0
SIGNAL_DISABLE_GPU_SANDBOX=0
XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons```

Any idea why?

This is the script I use to launch Signal:

√ ; cat bin/signal
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: bin/signal
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ #!/bin/bash
   2   │ #
   3   │ # https://github.com/flathub/org.signal.Signal/issues/259
   4   │ # https://discussion.fedoraproject.org/t/setxkbmap-configuratin-file-used-by-x11-which-one/73503/73503
   5   │ #
   6   │ sudo flatpak override --filesystem=home org.signal.Signal
   7   │ sudo flatpak override --filesystem=/home/yann/.XCompose org.signal.Signal
   8   │ flatpak run org.signal.Signal --use-tray-icon
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────

In case that helps… Yeah, probably overkill. :grin:

Anyone? … :neutral_face: :expressionless:

flatpak run --filesystem=~/.XCompose:ro org.signal.Signal --use-tray-icon

This works…