Battling Unwanted RDP Windows in Fedora? A Drastic XTEST Tweak Might Be an Answer

Updated on

DISCLAIMER: Expressed views on this blog are my own.

Are you pulling your hair out because a Remote Desktop Connection window (or a similar RDP client window) keeps stubbornly popping up in Fedora, especially when you switch virtual desktops or application windows? It's a frustrating experience that can grind your productivity to a halt.

While the most common culprits are often a misbehaving RDP client (like Remmina, xfreerdp, etc.), a stuck session, or an auto-reconnect feature gone haywire, there's a deeper, more system-level tweak you could try if all else fails: disabling the XTEST extension in your Xorg server.

Disclaimer: This is a "nuke it from orbit" approach. Disabling XTEST will break other applications that rely on it. Proceed with caution and understanding!

What is XTEST and Why Might Disabling It Help?

The XTEST extension is a part of the X Window System (X11) that allows programs to synthesize input events like mouse clicks, key presses, and mouse movements. It's used by:

  • Accessibility tools: On-screen keyboards, screen readers.

  • Automation tools: xdotool, Selenium for browser testing.

  • Remote desktop software: To inject input from the remote user or to monitor local input.

  • Some testing frameworks.

Our theory here is that a rogue or buggy RDP client process might be inappropriately using XTEST (or a related mechanism that hooks into input) in a way that triggers the window to reappear when desktop focus changes. By disabling XTEST, you essentially cut off one of the ways this client might be interacting with your desktop to force itself to the front.

The Big Warning Label: What You'll Break

Before you dive in, understand the consequences:

  • Accessibility features will likely stop working.

  • Automation scripts (like xdotool) will fail.

  • Some remote control/desktop sharing tools (ironically) might stop working correctly if they rely on XTEST locally.

  • Certain games or applications that use synthetic input might be affected.

This is a troubleshooting step of last resort for this specific RDP window issue. Make sure you've tried killing all RDP-related processes (ps aux | grep -i rdp, ps aux | grep -i remmina, ps aux | grep -i xfreerdp) and checking your startup applications first.

How to Disable XTEST in Fedora (Xorg Sessions)

If you're determined to try this, here's how:

  1. Open a Terminal.

  2. Create a new Xorg configuration file:
    We'll create a file in /etc/X11/xorg.conf.d/. The name 10-disable-xtest.conf is a common convention.

          sudo nano /etc/X11/xorg.conf.d/10-disable-xtest.conf
        
  3. Add the following content to the file:

          Section "Extensions"
        Option "XTEST" "Disable"
    EndSection
        
    IGNORE_WHEN_COPYING_START
    IGNORE_WHEN_COPYING_END
  4. Save and close the file:

    • In nano: Press Ctrl+X, then Y to confirm, then Enter.

  5. Restart your X server:
    The simplest way to apply this change is to log out of your graphical session and log back in, or to reboot your system.

          sudo reboot
        
    IGNORE_WHEN_COPYING_START
    IGNORE_WHEN_COPYING_END

Did It Work? How to Verify

After logging back in:

  1. Check if the RDP window issue is resolved. This is your primary goal.

  2. (Optional) Verify XTEST status:
    Open a terminal and run:

          xdpyinfo | grep XTEST
        
    IGNORE_WHEN_COPYING_START
    IGNORE_WHEN_COPYING_END

    If XTEST is successfully disabled, it should not appear in the output. If you see a line like XTEST (X Consortium XTEST Extension), it's still enabled.

  3. Test an XTEST-dependent tool (optional):
    If you have xdotool installed, try:

          xdotool getmouselocation
        
    IGNORE_WHEN_COPYING_START
    IGNORE_WHEN_COPYING_END

    If XTEST is disabled, this command will likely fail with an error.

Reverting the Change: Re-enabling XTEST

If this didn't solve your RDP issue, or if it broke too many other things, you can easily revert the change:

  1. Delete the configuration file:

          sudo rm /etc/X11/xorg.conf.d/10-disable-xtest.conf
        
    IGNORE_WHEN_COPYING_START
    IGNORE_WHEN_COPYING_END
  2. Restart your X server (log out and log back in, or reboot).

A Note on Wayland

Fedora defaults to Wayland for GNOME and some other desktop environments. XTEST is an X11 extension.

  • If you are running a native Wayland session, this change primarily affects XWayland applications (X11 applications running under Wayland). Native Wayland applications use different, generally more restricted, input mechanisms.

  • If you explicitly choose an "Xorg" session at your login screen, this change will apply directly to your entire Xorg session.

The RDP pop-up issue might behave differently or have different solutions under Wayland, often revolving around the specific Wayland compositor and the RDP client's Wayland support.

Final Thoughts

Disabling XTEST is a significant system alteration and should not be taken lightly. While it might stop a persistent RDP window caused by a misbehaving client that relies on this extension, it's more of a diagnostic step or a temporary workaround with considerable side effects.

Always prioritize investigating the RDP client itself, its logs, and system processes before resorting to disabling core X11 extensions. Good luck taming those rogue windows!



You just read "Battling Unwanted RDP Windows in Fedora? A Drastic XTEST Tweak Might Be an Answer". Please share if you liked it!
You can read more recent posts here.