Skip to content

Instantly share code, notes, and snippets.

@CJHarmath
Created June 23, 2025 03:04
Show Gist options
  • Save CJHarmath/876d86e56c1611a90039e2abeaad0f25 to your computer and use it in GitHub Desktop.
Save CJHarmath/876d86e56c1611a90039e2abeaad0f25 to your computer and use it in GitHub Desktop.
send shortcut keys to Citrix in fullscreen mode on Fedora
#!/bin/bash
CONFIG_FILE="$HOME/.ICAClient/wfclient.ini"
REQUIRED_SETTINGS=(
"KeyboardSendSpecial=On"
"TransparentKeyPassthrough=FullScreenOnly"
"FullScreenShortcutSupport=true"
"KeyboardMode=1"
"OverrideDesktopKeyPassthrough=True"
)
# Make sure the file and directory exist
mkdir -p "$(dirname "$CONFIG_FILE")"
touch "$CONFIG_FILE"
# Ensure [WFClient] section exists
if ! grep -q "^\[WFClient\]" "$CONFIG_FILE"; then
echo -e "\n[WFClient]" >> "$CONFIG_FILE"
fi
# Add missing settings
for setting in "${REQUIRED_SETTINGS[@]}"; do
key="${setting%%=*}"
if ! grep -q "^$key=" "$CONFIG_FILE"; then
sed -i "/^\[WFClient\]/a $setting" "$CONFIG_FILE"
echo "Added: $setting"
else
echo "Already present: $key"
fi
done
echo "✅ Citrix keyboard passthrough settings ensured in $CONFIG_FILE"
gsettings set org.gnome.mutter.wayland xwayland-grab-access-rules "['Wfica']"
gsettings set org.gnome.mutter.wayland xwayland-allow-grabs true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment