Skip to content

About

Manage RDP Displays

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

manage-gnome-rdp

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

Features

  • 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

Supported Distributions

  • 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.

Prerequisites

Install the required packages for your distribution:

Fedora/RHEL:

sudo dnf install gnome-remote-desktop freerdp

Ubuntu/Debian:

sudo apt install gnome-remote-desktop winpr3-utils

Arch Linux:

sudo pacman -S gnome-remote-desktop freerdp

openSUSE:

sudo zypper install gnome-remote-desktop freerdp
  • gnome-remote-desktop - Provides the RDP server and grdctl command
  • freerdp/winpr3-utils - Provides certificate generation tool (winpr-makecert or winpr-makecert3)

Installation

git clone <repository-url>
cd extra-display
chmod +x manage-gnome-rdp

Optionally, add to your PATH:

sudo ln -s "$(pwd)/manage-gnome-rdp" /usr/local/bin/manage-gnome-rdp

Usage

manage-gnome-rdp [options] <command>

Commands

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

Options

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

Examples

Basic usage - extend your display

# 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

Specify credentials on command line

./manage-gnome-rdp -u myuser -P mypassword enable

Enable with firewall port opened

./manage-gnome-rdp -f enable

Mirror your primary display

./manage-gnome-rdp -m mirror enable

Create a separate virtual desktop (headless)

./manage-gnome-rdp -m headless enable

Use a custom port

./manage-gnome-rdp -p 13389 enable

Change credentials

# Interactive - prompts for username and password
./manage-gnome-rdp set-credentials

# Non-interactive
./manage-gnome-rdp -u newuser -P newpass set-credentials

Enable view-only mode (screen sharing without input)

# 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

Verbose output for troubleshooting

./manage-gnome-rdp -v status

Dry-run mode (see what would be executed)

./manage-gnome-rdp -n enable

Verify system prerequisites

./manage-gnome-rdp check

Display Modes

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

Configuration

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.

Connecting from an RDP Client

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.

iPadOS RDP Clients

The following free RDP clients work well for using an iPad as an extended display:

Recommended

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

Alternatives

Jump Desktop

  • Supports both RDP and VNC protocols
  • Fluid remote desktop technology for better performance
  • iCloud sync for connection settings

Mocha RDP Lite

  • 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.

Security

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

Troubleshooting

Verify prerequisites first

./manage-gnome-rdp check

This command verifies all required packages, services, and settings are available.

Check service logs

journalctl --user -u gnome-remote-desktop.service -f

Use dry-run to debug

./manage-gnome-rdp -n enable

This shows exactly what commands would be executed without making changes.

Authentication failures

  • 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

Connection refused

  • 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
  • Ensure you're connecting to the correct IP address

Display not extending

  • In GNOME Settings > Displays, verify the RDP display appears
  • Adjust display arrangement by dragging monitors to desired positions

License

MIT License - See LICENSE file for details.

About

Manage RDP Displays

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages