html
When the Citrix Workspace app (formerly Receiver) on Linux fails to process CTRL key combinations while ALT-based shortcuts work normally, we're typically dealing with one of these scenarios:
- Keyboard mapping conflicts between local and remote sessions
- X Window System key event handling issues
- Client configuration file misalignment
- Session-specific keyboard policy restrictions
First, verify your current keyboard mapping in the ICA session:
# Check active keyboard layout in terminal
setxkbmap -print
# Compare with remote session layout
env | grep LANG
If you notice discrepancies between local (X11) and remote (ICA) keyboard layouts, you'll need to force alignment:
# Force specific keyboard layout in Citrix config
echo "KeyboardMapping=en-us" >> ~/.ICAClient/wfclient.ini
The issue often stems from X11 not properly forwarding modifier keys. Test with:
# Install xev if missing
sudo apt install x11-utils
# Run event viewer
xev | grep -A2 --line-buffered 'KeyRelease'
When pressing CTRL in the ICA window, you should see output like:
state 0x10, keycode 37 (Control_L), same_screen YES
state 0x14, keycode 37 (Control_L), same_screen YES
Edit the Citrix configuration file with these critical parameters:
# ~/.ICAClient/wfclient.ini
[WFClient]
KeyboardMapping=en-us
KeyboardHookLevel=full
For system-wide deployments, also check:
# /etc/icaclient/nls/en-us/module.ini
[Keyboard]
EnableDirectKeyInput=On
If standard fixes fail, consider these workarounds:
# Force keyboard layout at session start
env LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/share/citrix-receiver/./wfica
For Wayland users, try forcing XWayland compatibility:
export GDK_BACKEND=x11
/opt/Citrix/ICAClient/wfica.sh
For enterprise deployments, modify registry values via PowerShell:
# Remote registry modification example
$regPath = "HKLM:\SOFTWARE\WOW6432Node\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Keyboard"
Set-ItemProperty -Path $regPath -Name "KeyboardMapping" -Value "en-us"
When working with Citrix Receiver on Linux systems, many developers encounter a frustrating scenario where standard keyboard shortcuts (CTRL+A, CTRL+C, CTRL+V) fail to function while ALT-based shortcuts continue to work normally. This problem typically manifests in these specific conditions:
- X11 forwarding sessions
- Multi-monitor setups
- Non-US keyboard layouts
- Wayland display server environments
The core issue stems from how Linux window managers handle key event propagation to virtual applications. The Citrix ICA client intercepts keyboard events differently on Linux compared to Windows due to:
// Example of key event handling difference
Windows:
WM_KEYDOWN → TranslateMessage → WM_CHAR
Linux:
XKeyEvent → XLookupString → KeySym mapping
Solution 1: Keyboard Mapping Adjustment
Create or modify the ~/.ICAClient/keyboard
file:
# Keyboard mapping override
override=1
ctrl_shortcuts=1
disable_alt_space=0
Solution 2: Environment Variable Fix
Add this to your shell startup file (.bashrc
or .zshrc
):
export CTX_KEYBOARD_HANDLER_LINUX=1
export CTX_ENABLE_UNICODE_KEYBOARD=1
Solution 3: CLI Configuration
For headless configurations:
/opt/Citrix/ICAClient/util/set_ica_client keyboard \
--layout us \
--variant altgr-intl \
--options compose:rctrl,terminate:ctrl_alt_bksp
To monitor key events in real-time:
xev | grep -A2 --line-buffered 'KeyPress\|KeyRelease'
Check active keyboard rules:
gsettings get org.gnome.desktop.input-sources xkb-options
Create a systemd service file at /etc/systemd/system/citrix-keyfix.service
:
[Unit]
Description=Citrix Keyboard Fix Service
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/setxkbmap -option compose:rctrl
[Install]
WantedBy=multi-user.target
After applying fixes, verify with this Python test script:
import tkinter as tk
def key_press(event):
print(f"Key pressed: {event.keysym}")
root = tk.Tk()
root.bind_all('<Key>', key_press)
root.mainloop()