- Added learning doc for 2026-07-03 session: diagnosed SIGSEGV in
XKeysymToKeycode (missing NULL check on XOpenDisplay), forked Remmina
to gitlab.com/satware, built with FreeRDP3, verified fix, submitted MR.
- Added manual override entry for patched remmina-plugin-rdp.so in
~/.config/remmina/plugins/
Session record (2026-07-03): diagnosed a Remmina SIGSEGV on Wayland when keymap was set, traced it to a missing NULL check on XOpenDisplay in remmina-plugin-rdp, forked Remmina to gitlab.com/satware, built from source, verified the fix, and submitted MR !2757 upstream.
Remmina crashed (SIGSEGV) every time the "Mothership" RDP profile was
selected. The root cause was a missing NULL check on XOpenDisplay(0) in
remmina_get_rdp_kbd_remap() (plugins/rdp/rdp_plugin.c), triggered only
when a keymap profile setting was non-empty (e.g. Map Meta Keys) and
the session was Wayland without accessible X11.
Forked Remmina to gitlab.com/satware/Remmina, built from source with
FreeRDP3, reproduced the crash, applied a 4-line fix, verified it, and
submitted merge request !2757
to the upstream project.
Incident
Field
Value
Symptom
Remmina closes immediately when selecting "Mothership" and clicking connect
Signal
SIGSEGV (segfault)
Crash location
XKeysymToKeycode() in libX11.so.6, called from remmina-plugin-rdp.so
In plugins/rdp/rdp_plugin.c, function remmina_get_rdp_kbd_remap():
display=XOpenDisplay(0);// Returns NULL on Wayland
// NO NULL CHECK
XKeysymToKeycode(display,table[i])// SIGSEGV - dereferences NULL
The function is only called when keymap is non-empty in the profile.
The working profile had keymap= (empty), which skipped the entire code
path. The crashing profile had keymap=Map Meta Keys.
DISPLAY=:0 (Xwayland) but XOpenDisplay(0) fails from RDP worker thread
Key config difference
Setting
Mothership (crashes)
srv-app-2 (works)
keymap
Map Meta Keys
(empty)
Fix
4-line addition in plugins/rdp/rdp_plugin.c, function remmina_get_rdp_kbd_remap():
display = XOpenDisplay(0);
+if (!display) {
+ g_free(rdp_kbd_remap);
+ return NULL;
+}
for (i = 0; table[i] > 0; i += 2) {
The caller at line ~2148 already checks if (rdp_kbd_remap != NULL) before
use, so returning NULL causes graceful degradation (empty
KeyboardRemappingList) instead of a crash.
Verification
Test
Result
Reproduce crash (unpatched, keymap=Map Meta Keys)
SIGSEGV - new coredump at 12:05:54
Apply fix, rebuild, same profile
No crash - exit code 0, no new coredump
Debug log after fix
rdp_keyboard_remapping_list: (empty, as expected)
Local workaround (applied)
Item
Value
Mothership profile keymap
Set to empty (keymap=) as safe setting
Patched plugin
~/.config/remmina/plugins/remmina-plugin-rdp.so (loads before system plugin)