I recently upgraded my Ubuntu system from 20.04 (Xorg) to 22.04, and switched to Wayland. This upgrade created several unexpected challenges for my environment, particularly in terms of configuration. After the necessary troubleshooting and adjustments, I've become more familiar with the nuances of Linux, however, I've hit a brick wall and cannot figure this out. No forum, SO question, or reddit post on this topic applies to my case.
Context:
- I'm looking to establish a consistent custom keyboard layout both for regular local use and for SSH sessions into my machine.
- Wayland relies on
xkb
for keyboard configurations or Sway. I've tried using both theinput
directive in the Sway config and thesetxkbmap
command to ensure compatibility with xwayland apps. - Logging in directly to my machine (e.g., via TTY) works perfectly with the custom layout, but this is not the case when I SSH into it. For some reason, regular dvorak is being used during SSH sessions, this is weird since it should either be QWERTY or my Custom layout, but for some reason its neither?
- I'm also considering using
mosh
, which, to my knowledge, doesn't support XForwarding that would be needed to have xwayland working and in terms setxkbmap. Of course I still have gaps in my knowledge so I have no idea if what I am saying makes any sense
Configuration: Here is a snippet from my Sway config:
input * xkb_layout custom
exec_always setxkbmap custom
How can I ensure my custom keyboard layout is consistently applied, especially for non-interactive shells or SSH sessions?
Thank you for your insights and suggestions!