Connecting from Linux

Chapter 3 — Connecting to Windows from Linux

The mstsc client is Windows-only. From a Linux machine — your Debian server, a Raspberry Pi, or a Linux laptop — you connect to a Windows RDP host using either Remmina (a polished GUI client) or xfreerdp (the powerful command-line tool that Remmina itself uses under the hood). Both are free, open source, and available in every major distro's package manager.

Remmina vs xfreerdp — Which to Use

Remmina
GUI client · GTK
Saved connection profiles, drag-and-drop file transfer, tabbed sessions, system tray integration. Supports RDP, VNC, SSH, SPICE — one app for all remote access needs.
✓ Best for daily interactive use
✓ Stores credentials securely
⚠ Needs a desktop environment (not headless)
xfreerdp
Command-line · FreeRDP
Full RDP implementation with fine-grained flag control. Scriptable, works over SSH, usable from a headless server. Remmina calls xfreerdp internally for its RDP connections.
✓ Scriptable and automatable
✓ Works without a desktop environment
⚠ No session management or saved profiles

Installing Both

philip@debian — installing Remmina and xfreerdp
# Debian / Ubuntu philip@debian:~$ sudo apt update && sudo apt install remmina remmina-plugin-rdp freerdp2-x11 # Fedora / RHEL philip@fedora:~$ sudo dnf install remmina remmina-plugins-rdp freerdp # Arch philip@arch:~$ sudo pacman -S remmina freerdp # Confirm xfreerdp is available philip@debian:~$ xfreerdp --version This is FreeRDP version 2.11.2 (git n/a)
FreeRDP vs freerdp2: Debian/Ubuntu package the command as xfreerdp from the freerdp2-x11 package. On newer systems you may find xfreerdp3 from FreeRDP 3.x. The flags are nearly identical — the examples in this chapter work on both versions.

Using Remmina

Launch Remmina from your applications menu or run remmina in a terminal. Click the + button to create a new connection profile:

Remmina Remote Desktop Client — New Connection Profile
Basic
Advanced
SSH Tunnel
Exec
Name
Work Windows PC
Protocol
RDP — Remote Desktop Protocol ▾
Server
192.168.0.50
Port
3389
Username
philip
Password
••••••••••
Domain
leave blank for local accounts
Resolution
Use client resolution ▾
Colour depth
True colour (32 bpp) ▾
Share clipboard
☑ Enabled
Share drives
☑ /home/philip

Save the profile and double-click it to connect. Remmina stores all profiles in ~/.local/share/remmina/ — back them up or sync them between machines to carry your connection list with you.

The SSH Tunnel tab

Remmina has built-in SSH tunnelling — go to the SSH Tunnel tab in the connection profile and tick Enable SSH tunnel. Set the SSH server details and Remmina will automatically open the tunnel before connecting RDP through it. This is the cleanest way to use RDP securely over the internet without any manual port-forwarding setup.

Using xfreerdp on the Command Line

xfreerdp is the direct CLI tool. The basic connection is straightforward; additional flags layer on features:

philip@debian — xfreerdp examples
# Minimal connection — will prompt for password philip@debian:~$ xfreerdp /v:192.168.0.50 /u:philip # Full desktop, clipboard, drives, audio — the everyday command philip@debian:~$ xfreerdp /v:192.168.0.50 /u:philip /p:'MyPassword' \ /w:1920 /h:1080 \ +clipboard \ /drive:home,/home/philip \ /sound:sys:alsa # Full screen philip@debian:~$ xfreerdp /v:192.168.0.50 /u:philip /f # Non-standard port philip@debian:~$ xfreerdp /v:192.168.0.50:3390 /u:philip # Dynamic resolution — window resizes update remote desktop size philip@debian:~$ xfreerdp /v:192.168.0.50 /u:philip /dynamic-resolution # Ignore certificate warning (self-signed or NLA mismatch) philip@debian:~$ xfreerdp /v:192.168.0.50 /u:philip /cert:ignore

Sharing local folders with the remote Windows machine

philip@debian — sharing drives via xfreerdp
# Share a single directory — appears as a network drive in Windows Explorer philip@debian:~$ xfreerdp /v:192.168.0.50 /u:philip \ /drive:LinuxHome,/home/philip # In Windows: This PC → LinuxHome (\\tsclient\LinuxHome) # Share multiple directories philip@debian:~$ xfreerdp /v:192.168.0.50 /u:philip \ /drive:Projects,/home/philip/projects \ /drive:Downloads,/home/philip/Downloads # Share entire filesystem (useful for file transfers) philip@debian:~$ xfreerdp /v:192.168.0.50 /u:philip \ /drive:Linux,/

xfreerdp Flag Reference

FlagWhat it doesExample
/v:host Target host — IP, hostname, or hostname:port /v:192.168.0.50
/u:user Username on the Windows machine /u:philip
/p:pass Password (omit to be prompted securely) /p:'MyPass!'
/d:domain Domain — leave out for local accounts /d:CORP
/w: /h: Window width and height in pixels /w:1920 /h:1080
/f Full screen mode /f
/dynamic-resolution Remote desktop resizes when you resize the window /dynamic-resolution
/bpp:16 Colour depth — 16 reduces bandwidth on slow links /bpp:16
+clipboard Enable clipboard sharing (copy/paste both ways) +clipboard
/drive:name,path Share a local Linux directory as a Windows network drive /drive:home,/home/philip
/sound:sys:alsa Redirect remote audio to local ALSA output /sound:sys:alsa
/sound:sys:pulse Redirect remote audio to local PulseAudio /sound:sys:pulse
/microphone Redirect local microphone to the remote machine /microphone
/printer Redirect local printers to remote session /printer
/cert:ignore Skip certificate verification (use on trusted networks only) /cert:ignore
/cert:tofu Trust on first use — accept and remember the certificate /cert:tofu
/compression Enable RDP compression — useful on slow connections /compression
-wallpaper Disable remote desktop wallpaper (speeds up redraws) -wallpaper
-themes Disable visual themes on remote (further speeds redraws) -themes
Prefix rules: xfreerdp uses /flag for most options, +flag to explicitly enable something, and -flag to explicitly disable it. So +clipboard enables clipboard, -wallpaper disables the desktop wallpaper.

Saving a Command as a Shell Alias

xfreerdp has no built-in profile system, but a shell alias or script gives you the same single-command convenience:

# Add to ~/.bashrc or ~/.bash_aliases alias rdp-work='xfreerdp /v:192.168.0.50 /u:philip +clipboard /dynamic-resolution /sound:sys:pulse' alias rdp-server='xfreerdp /v:192.168.0.24 /u:philip +clipboard /w:1600 /h:900' # Reload and use source ~/.bashrc rdp-work # connects and prompts for password

Performance Tuning on Slow Connections

# Lean profile for slow/remote connections xfreerdp /v:host /u:user \ /bpp:16 \ # 16-bit colour — half the pixel data /compression \ # compress the data stream -wallpaper \ # no desktop wallpaper -themes \ # flat window decorations -aero \ # no Windows Aero effects -fonts \ # no ClearType (font smoothing) -animations # no UI animations

Common Errors and Fixes

ERRCONNECT_LOGON_FAILURE
Wrong username or password
Double-check credentials. If using a Microsoft account, try the local account name only (not the email). On a domain machine use /d:DOMAIN /u:user.
Certificate / TLS error on connection
Self-signed cert or NLA mismatch
Add /cert:tofu to accept and remember the certificate. On a trusted LAN, /cert:ignore skips the check entirely.
ERRCONNECT_CONNECT_FAILED
Can't reach the host — network or firewall
Confirm the host is on and reachable: ping 192.168.0.50. Check Windows Firewall has the Remote Desktop rule enabled for the correct network profile.
CredSSP / NLA auth failure
Windows patched, CredSSP version mismatch
Add /sec:rdp to fall back to standard RDP security instead of NLA. Not ideal for production — update FreeRDP if possible.
Black screen after connecting
Display driver or GPU acceleration issue
Add /gdi:sw to force software rendering instead of hardware-accelerated GDI. Slower but reliable.
No audio / sound not redirected
Wrong audio system specified
Try both /sound:sys:alsa and /sound:sys:pulse. Run pactl info to confirm whether PulseAudio or PipeWire is your audio server.

Quick Reference

TaskCommand
Install on Debian/Ubuntusudo apt install remmina remmina-plugin-rdp freerdp2-x11
Basic xfreerdp connectionxfreerdp /v:192.168.0.50 /u:philip
Full-featured connectionxfreerdp /v:host /u:user +clipboard /dynamic-resolution /sound:sys:pulse
Share a local folderxfreerdp /v:host /u:user /drive:name,/local/path
Non-standard portxfreerdp /v:host:3390 /u:user
Skip certificate checkxfreerdp /v:host /u:user /cert:ignore
Slow-connection profilexfreerdp /v:host /u:user /bpp:16 /compression -wallpaper -themes
Save as aliasalias rdp-home='xfreerdp /v:host /u:user +clipboard'
Next — Chapter 4: Connecting to Windows from Windows. mstsc in depth — saved .rdp files, multi-monitor spanning, audio redirection, RemoteApp for running individual Windows apps rather than a full desktop, and the Remote Desktop app from the Microsoft Store (the modern replacement for mstsc).