Recently I had to use Citrix on a Linux client to access some Windows remote desktops. I know people like to give Citrix shit all the time, I used to be one of them myself. But the Linux client actually has some really good features:

  • Drive and device redirection actually works
  • Wayland poses no problems for it
  • Many, many things can be customized

I want to focus on the last point. My problem is that in a full-screen Citrix session, it’s not easy to escape to the local desktop environment. I use Plasma with four virtual desktops and would like desktop 2 to show the remote Citrix session in full-screen mode while desktop 1 has all my usual Linux stuff. Switching between them usually means exiting Citrix full-screen mode and going windowed so that local keyboard shortcuts work.

But there’s a better way! What if you could signal to the Citrix client that the next keyboard entry is to be interpreted by the local system, not the remote system? Fortunately, Citrix has a setting for exactly that.

Check your local ~.ICAClient/All_Regions.ini for two keys you can use as an escape sequence:

KeyPassthroughEscapeChar=F1
KeyPassthroughEscapeShift=Ctrl

You can set it to almost whatever you want, see the docs for the exact list.

In my case I use Ctrl-F1 to Ctrl-F4 to select each local virtual desktop 1-4. To switch to the local desktop 1 from inside a full-screen Citrix session, I need to press Ctrl-F1, Ctrl-F1 (so Ctrl-F1 twice in succession). The first Ctrl-F1 triggers the Citrix escape sequence and the second one is sent to the local desktop environment and gets handled there by the global shortcut handling in Plasma.

There’s also a shortcut for exiting full-screen you can use (Ctrl-F2 by default) but you need to enable it separately. I try to avoid this because going windowed means your remote desktop will rescale to the window size and that introduces an awkward pause in the workflow.

Anyhow, Citrix’ Linux support is very polished, especially for such an old product. Compared to things like Horizon which is barely configurable and still breaks in many ways on Wayland, Citrix on Linux is paradise.