Fixing XRDP Keyboard Issues on Ubuntu

Googled777 avatar   
Googled777
This tutorial documents a real‑world issue: keyboard input not working in an XRDP session on Ubuntu — even when Xfce is running — while the exact same setup works flawlessly on Debian. We’ll walk thro..


Fixing XRDP Keyboard Issues on Ubuntu (And Why Debian Just Works)

Fixing XRDP Keyboard Issues on Ubuntu
(And Why Debian Just Works Out of the Box)

XRDP Ubuntu Xfce Input stack quirks

This tutorial documents a real‑world issue: keyboard input not working in an XRDP session on Ubuntu — even when Xfce is running — while the exact same setup works flawlessly on Debian. We’ll walk through the diagnosis, the Ubuntu‑specific root cause, and the cleanest fixes.


1. Symptoms and scenario

You’re connecting to a remote machine (for example, an RS2000 box) via RDP. Once inside the Ubuntu session:

  • Mouse works in the remote desktop.
  • Desktop environment loads (Xfce, GNOME, etc.).
  • Keyboard does not work in the XRDP session, or only works in some apps.
  • On the same hardware, Debian + XRDP + Xfce works perfectly.

If you recognize this pattern, you’re dealing with an Ubuntu input stack problem, not a hardware or XRDP core problem.

Key insight: Debian uses a relatively clean Xorg + XKB input stack by default. Ubuntu layers IBus and GNOME integrations on top, which can break XRDP keyboard handling.

2. Why this happens on Ubuntu (but not on Debian)

2.1 The core difference

Both Debian and Ubuntu can run XRDP with Xfce (or other lightweight desktops), but Ubuntu adds:

  • IBus as the default input method framework.
  • GNOME integration hooks and session logic, even when you’re not using GNOME directly.
  • Various patches and defaults around keyboard layouts and input methods.

In XRDP sessions, those extra layers can interfere with how keyboard events are delivered, resulting in a session where Xfce is visible but the keyboard is effectively “muted”.

2.2 Typical Ubuntu XRDP failure modes

  • No keyboard input at all in the XRDP session.
  • Keyboard works in some apps but not in others (for example, Firefox).
  • Layout seems wrong or random, despite correct settings in the GUI.
Debian comparison: Debian’s default configuration does not enforce IBus and does not bundle the same GNOME‑centric input stack logic that Ubuntu does. As a result, XRDP + Xfce on Debian tends to “just work”.

3. Quick diagnosis checklist

From an XRDP session on Ubuntu, run these commands in a terminal:

Check the current desktop session:

echo "$XDG_SESSION_DESKTOP"
echo "$XDG_CURRENT_DESKTOP"

If you see something like ubuntu or GNOME, GNOME logic may still be involved, even if you think you’re running Xfce.

Check if IBus is running:

ps aux | grep ibus

If you see processes like:

ibus-daemon
ibus-x11
ibus-portal

then IBus is active in your XRDP session, and is a prime suspect for blocked or broken keyboard input.


4. Fixing XRDP keyboard issues on Ubuntu

Below are practical fixes, ordered from most targeted to most structural. You can choose the approach that best fits your environment and tolerance for change.

4.1 Ensure a sane desktop for XRDP (Xfce)

Step 1 — Install Xfce:

sudo apt update
sudo apt install xfce4

Step 2 — Tell XRDP to start Xfce for your user:

Create or edit ~/.xsession:

nano ~/.xsession

Add:

xfce4-session

Save the file, then log out of the XRDP session and reconnect.

This ensures XRDP runs a clean Xfce session instead of trying to start a GNOME/Ubuntu session, which often carries problematic input logic.

4.2 The real lever: disable IBus (recommended)

On many Ubuntu systems, the root cause of broken keyboard input in XRDP is the IBus input framework interfering with XRDP’s keyboard handling.

Option A — Completely remove IBus (cleanest for servers)

Step 1 — Purge IBus:

sudo apt purge ibus
sudo apt autoremove

Step 2 — Reboot the machine:

sudo reboot

After reboot, reconnect via RDP. In many cases, keyboard input will now work normally across Xfce, terminal, Firefox, and other applications.

This approach is ideal for server or appliance‑style Ubuntu installs where you don’t need advanced input method features (multiple complex language IMEs, etc.).

Option B — Disable IBus without uninstalling it

If you want to keep IBus installed but deactivate it as the input method framework:

Step 1 — Switch input method to “none”:

im-config -n none

Step 2 — Reboot:

sudo reboot

After reboot, reconnect via XRDP and test the keyboard again. This approach is less invasive than purging IBus, but typically enough to stop it from interfering.

4.3 Verify XRDP and Xorg components

On some Ubuntu setups, XRDP keyboard or mouse issues also occur when the XRDP/Xorg glue packages are missing. Make sure these are installed:

sudo apt install xserver-xorg-core xserver-xorg-input-all xorgxrdp
sudo systemctl restart xrdp

Then reconnect via RDP and retest. This doesn’t fix the IBus issue by itself, but it ensures your XRDP stack is complete.


5. Debian vs Ubuntu: when to stop fighting and just switch

In your own experience, switching the RS2000 from Ubuntu to Debian made the XRDP keyboard issues disappear instantly. This isn’t an accident — it reflects fundamental differences in defaults.

5.1 Why Debian “just works” with XRDP + Xfce

  • Defaults to a simpler Xorg + XKB input stack.
  • Does not push IBus as aggressively as Ubuntu does.
  • Doesn’t entangle GNOME session logic with everything by default.
  • Is generally more “minimalist” and predictable for server and remote desktop roles.

For a machine like the RS2000, acting as a sovereign, multi‑role server, Debian often provides a more stable foundation for XRDP‑based workflows with fewer surprises in the input stack.

If you value predictability, stability, and minimal background magic, Debian is often a better fit for remote desktop and infrastructure nodes than stock Ubuntu with GNOME.

6. Summary and recommended doctrine

6.1 Direct conclusions

  • Problem Ubuntu + XRDP + GNOME/IBus can break keyboard input, even with Xfce installed.
  • Observation Debian + XRDP + Xfce on the same hardware works without keyboard issues.
  • Root cause Ubuntu’s input stack (especially IBus and GNOME logic) interferes with XRDP.

6.2 Recommended approaches

  • For Ubuntu servers: Use Xfce for XRDP and disable or purge IBus.
  • For maximum stability: Consider Debian as the base OS for XRDP‑centric nodes.
  • For consistency: Standardize a “remote desktop profile” (Xfce + XRDP + no IBus) in your doctrine.

Once this is in place, you avoid the “ghost keyboard” problem entirely and keep your remote workflow smooth and predictable across your infrastructure.

0 Comments

No comments found