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
Installing Both
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:
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:
Sharing local folders with the remote Windows machine
xfreerdp Flag Reference
| Flag | What it does | Example |
|---|---|---|
| /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 |
/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:
Performance Tuning on Slow Connections
Common Errors and Fixes
/d:DOMAIN /u:user./cert:tofu to accept and remember the certificate. On a trusted LAN, /cert:ignore skips the check entirely.ping 192.168.0.50. Check Windows Firewall has the Remote Desktop rule enabled for the correct network profile./sec:rdp to fall back to standard RDP security instead of NLA. Not ideal for production — update FreeRDP if possible./gdi:sw to force software rendering instead of hardware-accelerated GDI. Slower but reliable./sound:sys:alsa and /sound:sys:pulse. Run pactl info to confirm whether PulseAudio or PipeWire is your audio server.Quick Reference
| Task | Command |
|---|---|
| Install on Debian/Ubuntu | sudo apt install remmina remmina-plugin-rdp freerdp2-x11 |
| Basic xfreerdp connection | xfreerdp /v:192.168.0.50 /u:philip |
| Full-featured connection | xfreerdp /v:host /u:user +clipboard /dynamic-resolution /sound:sys:pulse |
| Share a local folder | xfreerdp /v:host /u:user /drive:name,/local/path |
| Non-standard port | xfreerdp /v:host:3390 /u:user |
| Skip certificate check | xfreerdp /v:host /u:user /cert:ignore |
| Slow-connection profile | xfreerdp /v:host /u:user /bpp:16 /compression -wallpaper -themes |
| Save as alias | alias rdp-home='xfreerdp /v:host /u:user +clipboard' |