A portable bash script to manage GNOME's RDP service for extending or mirroring displays across multiple Linux distributions. Turn a tablet, laptop, or any RDP client into an additional monitor.
Version: 1.0.0
- Extend mode: RDP client becomes an additional monitor you can drag windows to
- Mirror mode: RDP client shows a copy of your primary display
- Headless mode: Creates a separate virtual desktop session
- Auto-generates TLS certificates for secure connections
- Optional firewall configuration
- Simple status and connection info commands
- Fedora/RHEL (tested) - Also Rocky, AlmaLinux, CentOS
- Ubuntu/Debian (tested) - Also Linux Mint, Pop!_OS
- Arch Linux - Also Manjaro, EndeavourOS
- openSUSE
The script auto-detects the distribution and configures the appropriate package manager, FreeRDP package names, and firewall commands.
Install the required packages for your distribution:
Fedora/RHEL:
sudo dnf install gnome-remote-desktop freerdpUbuntu/Debian:
sudo apt install gnome-remote-desktop winpr3-utilsArch Linux:
sudo pacman -S gnome-remote-desktop freerdpopenSUSE:
sudo zypper install gnome-remote-desktop freerdpgnome-remote-desktop- Provides the RDP server andgrdctlcommandfreerdp/winpr3-utils- Provides certificate generation tool (winpr-makecertorwinpr-makecert3)
git clone <repository-url>
cd extra-display
chmod +x manage-gnome-rdpOptionally, add to your PATH:
sudo ln -s "$(pwd)/manage-gnome-rdp" /usr/local/bin/manage-gnome-rdpmanage-gnome-rdp [options] <command>
| Command | Description |
|---|---|
enable |
Enable RDP service (generates certs/credentials if needed) |
disable |
Disable RDP service |
restart |
Restart the RDP service |
status |
Show service status, credentials, and configuration |
setup |
Interactive setup without enabling |
connect |
Show connection info (IP addresses and port) |
set-credentials |
Set or update RDP username and password |
clear-credentials |
Remove stored credentials |
view-only [on|off] |
Enable/disable view-only mode (no remote input) |
check |
Verify system prerequisites are met |
| Option | Description |
|---|---|
-m <mode> |
Display mode: extend, mirror, or headless (default: extend) |
-p <port> |
Set RDP port (default: 3389) |
-u <user> |
Set RDP username |
-P <pass> |
Set RDP password (prompts if omitted) |
-f |
Open RDP port in firewalld |
-n |
Dry-run mode (show commands without executing) |
-v |
Verbose output |
-h |
Show help |
# Enable with default settings (extend mode, prompts for credentials)
./manage-gnome-rdp enable
# Check status
./manage-gnome-rdp status
# Show connection info for RDP clients
./manage-gnome-rdp connect
# Disable when done
./manage-gnome-rdp disable./manage-gnome-rdp -u myuser -P mypassword enable./manage-gnome-rdp -f enable./manage-gnome-rdp -m mirror enable./manage-gnome-rdp -m headless enable./manage-gnome-rdp -p 13389 enable# Interactive - prompts for username and password
./manage-gnome-rdp set-credentials
# Non-interactive
./manage-gnome-rdp -u newuser -P newpass set-credentials# Check current status
./manage-gnome-rdp view-only
# Enable view-only (disable remote keyboard/mouse)
./manage-gnome-rdp view-only on
# Disable view-only (allow remote input)
./manage-gnome-rdp view-only off./manage-gnome-rdp -v status./manage-gnome-rdp -n enable./manage-gnome-rdp check| Mode | Service | Use Case |
|---|---|---|
| extend | gnome-remote-desktop.service | RDP client becomes additional monitor - drag windows to it |
| mirror | gnome-remote-desktop.service | Share your screen for presentations or collaboration |
| headless | gnome-remote-desktop-headless.service | Separate session, independent of physical displays |
The script has user-configurable defaults at the top of the file:
# Display mode when not specified: extend, mirror, or headless
DEFAULT_MODE="extend"
# RDP port number
DEFAULT_PORT=3389
# Directory for TLS certificates
CERT_DIR="${HOME}/.local/share/gnome-remote-desktop"Distribution-specific settings (package manager, firewall type, certificate tool) are auto-detected. Run ./manage-gnome-rdp check to see detected values.
After enabling, run ./manage-gnome-rdp connect to see available IP addresses:
=== RDP Connection Info ===
Mode: extend
Port: 3389
Username: myuser
Available IP addresses:
192.168.1.100 (eth0)
Connect: 192.168.1.100
192.168.229.10 (vpn0)
Connect: 192.168.229.10
Enter the IP address and credentials in your RDP client to connect.
The following free RDP clients work well for using an iPad as an extended display:
Windows App (formerly Microsoft Remote Desktop)
- Free, official Microsoft client
- Excellent performance and compatibility
- Supports external monitor mode
- Audio/video streaming and clipboard sync
- Tested and confirmed working with GNOME Remote Desktop
- Supports both RDP and VNC protocols
- Fluid remote desktop technology for better performance
- iCloud sync for connection settings
- Free with 5-minute session limit
- Lightweight and simple
- Good for testing connectivity
For the best experience as an extended display, the Windows App (Microsoft Remote Desktop) is recommended due to its stability and full feature support.
Connections are secured with:
- TLS encryption using auto-generated certificates
- NLA (Network Level Authentication) - credentials verified before session starts
- CredSSP for secure credential handling
When connecting over Tailscale or another VPN, you get additional WireGuard encryption.
To view the TLS certificate fingerprint:
./manage-gnome-rdp -v status./manage-gnome-rdp checkThis command verifies all required packages, services, and settings are available.
journalctl --user -u gnome-remote-desktop.service -f./manage-gnome-rdp -n enableThis shows exactly what commands would be executed without making changes.
- Ensure username and password are entered exactly (case-sensitive)
- Try a simple alphanumeric password without special characters
- Check logs for "MIC verification failed" which indicates credential mismatch
- Verify the service is running:
./manage-gnome-rdp status - Check firewall:
- Fedora/RHEL:
sudo firewall-cmd --list-services | grep rdp - Ubuntu/Debian:
sudo ufw status | grep 3389
- Fedora/RHEL:
- Ensure you're connecting to the correct IP address
- In GNOME Settings > Displays, verify the RDP display appears
- Adjust display arrangement by dragging monitors to desired positions
MIT License - See LICENSE file for details.