Ubuntu 14
sudo apt install krdc
Kubuntu 24.04 Server with Plasma 5.27
sudo apt install xrdp
sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp
echo "/usr/bin/startplasma-x11" > ~/.xsession
# Create the session files
nano ~/.xsession
# WITH >
# Essential KDE/Plasma environment variables
export DESKTOP_SESSION=plasma
export XDG_SESSION_DESKTOP=KDE
export XDG_CURRENT_DESKTOP=KDE
export KDE_SESSION_VERSION=5
# Data directories (adjust if needed for snaps/apps)
export XDG_DATA_DIRS=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/usr/share
export XDG_CONFIG_DIRS=/etc/xdg/xdg-plasma:/etc/xdg
# Critical: Launch Plasma with DBus (fixes many blue/black screen issues)
dbus-launch --exit-with-session startplasma-x11
nano ~/.xsessionrc
# WITH >
export XDG_SESSION_DESKTOP=KDE
export XDG_DATA_DIRS=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop
export XDG_CONFIG_DIRS=/etc/xdg/xdg-plasma:/etc/xdg
export KDE_SESSION_VERSION=5
# Force software rendering (often fixes blue screen due to OpenGL issues in xRDP)
export LIBGL_ALWAYS_SOFTWARE=1
# Make it executable
chmod +x ~/.xsession
sudo systemctl restart xrdp
Your blue screen issue when connecting via xRDP to KDE Plasma (likely Plasma 6 on Kubuntu 24.04) is a common problem. xRDP often struggles with proper session startup for Plasma, especially due to missing DBus integration, environment variables, or hardware acceleration conflicts in remote sessions.
### Key Fixes to Try
First, ensure no local session is active for the same user (log out from the physical console if logged in graphically, as xRDP doesn't allow concurrent local + remote sessions for the same user without hacks that can cause instability).
Then, simplify and correct your `~/.xsession` file. Your current version has duplicates and may not launch properly. Replace the entire contents with this:
```bash
#!/bin/bash
# Essential KDE/Plasma environment variables
export DESKTOP_SESSION=plasma
export XDG_SESSION_DESKTOP=KDE
export XDG_CURRENT_DESKTOP=KDE
export KDE_SESSION_VERSION=6 # Use 5 if you're on older Plasma 5.27
# Data directories (adjust if needed for snaps/apps)
export XDG_DATA_DIRS=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/usr/share
export XDG_CONFIG_DIRS=/etc/xdg/xdg-plasma:/etc/xdg
# Critical: Launch Plasma with DBus (fixes many blue/black screen issues)
dbus-launch --exit-with-session startplasma-x11
```
Make it executable:
```bash
chmod +x ~/.xsession
```
For `~/.xsessionrc` (create if missing), use:
```bash
export XDG_SESSION_DESKTOP=KDE
export XDG_DATA_DIRS=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop
export XDG_CONFIG_DIRS=/etc/xdg/xdg-plasma:/etc/xdg
export KDE_SESSION_VERSION=6 # Or 5 if applicable
# Force software rendering (often fixes blue screen due to OpenGL issues in xRDP)
export LIBGL_ALWAYS_SOFTWARE=1
```
### Additional Steps
1. Restart xRDP fully:
```bash
sudo systemctl restart xrdp
sudo systemctl restart xrdp-sesman
```
2. In your RDP client (e.g., Windows Remote Desktop), select the **Xorg** session module (not X11rdp or others) when the xRDP login prompt appears.
3. If still blue:
- Try a different user account for RDP testing (same user can't be logged in locally).
- Install a lighter DE like XFCE temporarily to verify xRDP basics work:
```bash
sudo apt install xfce4 xfce4-goodies
echo "xfce4-session" > ~/.xsession
sudo systemctl restart xrdp
```
If XFCE loads, the issue is Plasma-specific.
4. Check logs for clues:
```bash
tail -f /var/log/xrdp.log
tail -f /var/log/xrdp-sesman.log
```
Look for errors about DBus, OpenGL, or session startup.
### Notes on Kubuntu 24.04 + Plasma
Kubuntu 24.04 uses Plasma 5.27 by default (not Plasma 6 yet; Plasma 6 arrived in later updates or 24.10+). If you've upgraded to Plasma 6, xRDP compatibility can be spotty—consider sticking to Plasma 5 or using alternatives like **RustDesk**, **NoMachine**, or Ubuntu's built-in GNOME Remote Desktop (which supports RDP natively on GNOME).
If these don't resolve it, share output from the logs above for more targeted help. This setup works for many on similar KDE/xRDP configs.
tail -f /var/log/xrdp.log
tail -f /var/log/xrdp-sesman.log
tail -f /var/log/xrdp.log
[20251231-12:31:55] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.0.72 port 53308
[20251231-12:31:55] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20251231-12:31:55] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20251231-12:31:55] [INFO ] Security protocol: configured [SSL|RDP], requested [SSL|HYBRID|RDP], selected [SSL]
[20251231-12:31:55] [ERROR] SSL_accept: Failure in SSL library (protocol error?)
[20251231-12:31:55] [ERROR] SSL: error:0A000102:SSL routines::unsupported protocol
[20251231-12:31:55] [ERROR] trans_set_tls_mode: ssl_tls_accept failed
[20251231-12:31:55] [ERROR] xrdp_sec_incoming: trans_set_tls_mode failed
[20251231-12:31:55] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
[20251231-12:31:55] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
The error in your `/var/log/xrdp.log` (`error:0A000102:SSL routines::unsupported protocol`) is **not** related to the blue screen or Plasma session startup. This is a **TLS handshake failure** during the initial connection setup.
### Why This Happens
Your xRDP server (on Kubuntu 24.04) uses modern OpenSSL, which disables old, insecure TLS versions (TLS 1.0 and 1.1) by default for security reasons.
You're connecting from an **extremely outdated Ubuntu 14.04** client using **KRDC** (KDE Remote Desktop Client). KRDC on Ubuntu 14.04 is based on old FreeRDP libraries that only support TLS 1.0 (or possibly up to 1.1), which your server rejects as "unsupported protocol".
The connection fails **before** authentication or session selection, so you likely see an immediate disconnect or error in KRDC (not even reaching the xRDP login screen or blue Plasma screen).
### Recommended Fixes (Best Options First)
1. **Use a modern RDP client** (strongly recommended – Ubuntu 14.04 is end-of-life since 2019 and insecure):
- Upgrade your client machine to a supported Ubuntu version (22.04+ or 24.04).
- Or install a newer RDP client on Ubuntu 14.04:
- Try Remmina: `sudo apt install remmina remmina-plugin-rdp`
- In Remmina, set Security to **TLS** or **Negotiate**.
- From Windows/Mac/Android: Use the official Microsoft Remote Desktop app (supports modern TLS).
2. **Allow older TLS versions on the server** (less secure – only if you must use the old client and trust your network):
Edit `/etc/xrdp/xrdp.ini`:
```bash
sudo nano /etc/xrdp/xrdp.ini
```
In the `[globals]` section, add or modify:
```
ssl_protocols=TLSv1.2, TLSv1.3, TLSv1.1, TLSv1
```
(Order doesn't matter much; this enables TLS 1.0/1.1.)
Then restart xRDP:
```bash
sudo systemctl restart xrdp
```
**Warning**: This reduces security – avoid on public/internet-exposed servers.
3. **Force non-TLS (RDP-only) security** (least secure – unencrypted traffic):
In `/etc/xrdp/xrdp.ini` `[globals]` section:
```
security_layer=rdp
```
Restart xRDP as above.
In KRDC: Set encryption/security to **Low** or **None** if possible.
### Once Connected
After fixing the TLS issue, if you reach the xRDP login screen but still get a blue Plasma screen, revisit the session config from before (use `dbus-launch --exit-with-session startplasma-x11` in `~/.xsession`, etc.).
Check `/var/log/xrdp-sesman.log` for session-specific errors once the initial connection succeeds.
FAILED TO WORK OUT!!!
No comments:
Post a Comment