Skip to main content
xfreerdp is the X11 RDP client and the reference frontend for FreeRDP. It exposes every FreeRDP setting through a rich command-line interface and is the best client to use when scripting connections or working on a traditional Linux desktop.

Synopsis

xfreerdp [file.rdp] [options] [/v:<server>[:port]]
Options can use either Windows-style (/option:value) or POSIX-style (--option value) syntax. FreeRDP auto-detects which style is in use.

Quick examples

xfreerdp /v:rdp.example.com /u:alice /p:secret

Keyboard shortcuts (X11 client)

ShortcutAction
Right CtrlRelease keyboard and mouse grab
Ctrl+Alt+ReturnToggle fullscreen
Ctrl+Alt+MMinimise window
Ctrl+Alt+DDisconnect and exit
Ctrl+Alt+CToggle remote control in remote-assistance session

Global config file

The X11 client reads a JSON config at @SYSCONF_DIR@/xfreerdp.json.
KeyTypeDefaultDescription
isActionScriptAllowedbooleantrueAllow or block action scripts
An action script can be placed at ~/.config/freerdp/action.sh or specified with /action-script:<path>. It receives the current key combination as an argument; output containing key-local signals the script consumed the shortcut.

Full option reference

Connection options

OptionFormatDefaultDescription
/v:<server>[:port]Server hostname, IP, IPv6, vsock URI, or pipe path
/port:<number>3389Server port
/u:[[<domain>\\]<user>|<user>[@<domain>]]Username
/d:<domain>Domain
/p:<password>Password (omit value to silence interactive prompt)
/pth:<hash>Pass-the-hash (restricted admin mode)
/adminflagAdmin / console session
/vmconnect:<vmid>Hyper-V console (port 2179, disables negotiation)
/shell:<shell>Alternate shell on the server
/shell-dir:<dir>Shell working directory
/from-stdin[force]Read credentials from stdin
/args-from:<file>|stdin|fd:<n>|env:<name>Read command-line arguments from a source
/timeout:<ms>9000Connection timeout in milliseconds
/auto-reconnecttoggleoffAutomatic reconnection on disconnect
/auto-reconnect-max-retries:<n>Maximum reconnect attempts (0 = unlimited)
/reconnect-cookie:<base64>Resume session with reconnect cookie
/load-balance-info:<string>Load-balancer routing token
/pcb:<blob>Preconnection Blob (Hyper-V)
/pcid:<id>Preconnection Id
/ipv4[:force]Prefer IPv4 A record
/ipv6[:force]Prefer IPv6 AAAA record

Authentication

OptionFormatDefaultDescription
/sec:rdp|tls|nla|ext|aad[:[on|off]]autoForce specific security protocol
/cert:deny|ignore|name:<n>|tofu|fingerprint:<hash>:<hex>Certificate handling policy
/tls:ciphers:<list>|seclevel:<0-5>|secrets-file:<path>|enforce[:<ver>]TLS tuning
/negotoggleonProtocol security negotiation
/smartcard-logon[cert:<p>,key:<k>,pin:<p>,csp:<c>,reader:<r>,card:<c>]Smartcard logon authentication
/restricted-adminflagRestricted admin mode
/auth-onlytoggleoffAuthenticate then disconnect
/credentials-delegationtoggleoffDelegate credentials (CredSSP)
/auth-pkg-list:[[none],][!ntlm,kerberos,!u2u]allAuthentication package filter
/kerberos:kdc-url:<url>,cache:<path>,armor:<path>,...Kerberos options
/assistance:<password>Remote assistance password
/spn-class:<class>SPN authentication service class
/sspi-module:<path>External SSPI shared library

Display and window

OptionFormatDefaultDescription
/w:<width>1024Window/session width in pixels
/h:<height>768Window/session height in pixels
/size:<w>x<h> or <pct>%[wh]1024x768Screen size (alternative to /w: + /h:)
/fflagFullscreen mode (Ctrl+Alt+Enter to toggle)
/multimon[force]Span across all monitors
/monitors:<id>[,<id>...]Select specific monitor IDs (use with /f or /multimon)
/spanflagSpan screen over multiple monitors
/dynamic-resolutiontoggleoffSend resize events when the window is resized
/smart-sizing[<w>x<h>]Scale remote desktop to fit the window
/orientation:0|90|180|2700Display rotation
/scale:100|140|180100Global display scaling factor
/scale-desktop:<pct>100Scaling for desktop apps (100–500)
/scale-device:100|140|180100Scaling for Store/app-store apps
/workareaflagUse the available work area (excludes taskbar)
/decorationstoggleonWindow decorations
/floatbar[sticky:[on|off],default:[visible|hidden],show:[always|fullscreen|window]]offFloating toolbar
/t:<title>Window title
/wm-class:<class>X11 WM_CLASS hint
/window-position:<x>x<y>Initial window position
/parent-window:<id>Embed into an existing X11 window
/pwidth:<mm>Physical display width (millimetres)
/pheight:<mm>Physical display height (millimetres)

Performance and codecs

OptionFormatDefaultDescription
/gfx[progressive|RFX|AVC420|AVC444,mask:<v>,small-cache,thin-client,frame-ack]autoRDP8 Graphics Pipeline (GFX)
/rfxflagRemoteFX codec
/rfx-mode:image|videoRemoteFX mode
/nscflagNSCodec (NS Codec) support
/bpp:<depth>16Colour depth (8, 15, 16, 24, 32)
/network:modem|broadband|broadband-low|broadband-high|wan|lan|autoautoNetwork type preset
/compressiontoggleonBulk data compression
/compression-level:0|1|2Compression level
/gdi:sw|hwswGDI rendering backend (software or hardware)
/videoflagVideo-optimised remoting channel
/max-fast-path-size:<bytes>Maximum fast-path PDU size
/frame-ack:<n>Number of frame-acknowledgement PDUs
/wallpapertoggleonShow remote wallpaper
/themestoggleonEnable remote themes
/aerotoggleoffDesktop composition (Aero)
/window-dragtoggleoffFull-window drag
/menu-animstoggleoffMenu animations
/fontstoggleonClearType / font smoothing

Audio

OptionFormatDescription
/sound[sys:<sys>,dev:<dev>,format:<fmt>,rate:<r>,channel:<ch>,latency:<ms>,quality:<q>]Audio output (RDPSND + dynamic channel)
/microphone[sys:<sys>,dev:<dev>,format:<fmt>,rate:<r>,channel:<ch>]Audio input (audin dynamic channel)
/audio-mode:<mode>Audio output mode (0=local, 1=remote, 2=none)
Examples:
# ALSA audio output
xfreerdp /v:host /sound:sys:alsa

# OSS audio with specific device
xfreerdp /v:host /sound:sys:oss,dev:1,format:1

# Microphone with ALSA
xfreerdp /v:host /microphone:sys:alsa

Device redirection

OptionFormatDescription
/drive:<name>,<path>Redirect a local directory as a named share
/drivestoggleRedirect all mount points
/home-drivetoggleRedirect the user’s home directory
/clipboard[[use-selection:<atom>],[direction-to:[all|local|remote|off]],[files-to:[...]]]Clipboard redirection
/printer[<name>[,<driver>[,default]]]Redirect a printer
/smartcard[<str>[,<str>...]]Redirect smartcard(s) matching name fragment
/serial[<name>[,<path>[,<driver>[,permissive]]]]Redirect a serial port
/parallel[<name>[,<path>]]Redirect a parallel port
/usb:[id:<vid>:<pid>#...,addr:<bus>:<addr>#...,auto]Redirect USB device (requires URBDRC)
/multitouchtoggleRedirect multitouch input
/rdp2tcp:<executable[:arg...]>TCP tunnel via external process
Drive redirection examples:
# Named share from a specific path
xfreerdp /v:host /drive:home,/home/alice

# Hotplug all removable drives
xfreerdp /v:host /drive:hotplug,*

# Redirect the home directory shortcut
xfreerdp /v:host /home-drive

RemoteApp

OptionFormatDescription
/app:program:[<path>||<alias>],cmd:<cmd>,file:<f>,guid:<g>,icon:<f>,name:<n>,workdir:<d>,hidef:[on|off]Launch a RemoteApp
# Launch Notepad as RemoteApp
xfreerdp /v:rdp.example.com /u:alice /app:program:||notepad

# Launch with explicit path and working directory
xfreerdp /v:host /app:program:"C:\\Windows\\system32\\notepad.exe",workdir:"C:\\\"

Gateway and proxy

OptionFormatDescription
/gateway:g:<host>[:<port>],u:<user>,d:<domain>,p:<pass>,type:[rpc|http|auto|arm],access-token:<token>RD Gateway
/proxy:[<proto>://][<user>:<pass>@]<host>[:<port>]HTTP/SOCKS5 proxy
# Connect through an RD Gateway
xfreerdp /v:internal.host /gateway:g:gateway.example.com,u:alice,d:CORP,p:secret

# Use HTTPS_PROXY for gateway connections
export https_proxy=http://proxy.example.com:3128/
xfreerdp /gateway:g:rdp.example.com ...

Virtual channels

OptionFormatDescription
/vc:<channel>[,<options>]Add a static virtual channel
/dvc:<channel>[,<options>]Add a dynamic virtual channel
/dispflagDisplay control channel (disp)
/geometryflagGeometry tracking channel
/echoflagEcho channel
/ssh-agentflagSSH agent forwarding channel
/multitouchtoggleMultitouch input channel
/heartbeattoggleHeartbeat PDU support
/multitransporttoggleMultitransport (UDP) support

Keyboard

OptionFormatDescription
/kbd:layout:<id|name>,lang:<id>,fn-key:<v>,type:<v>,subtype:<v>,unicode[:on|off],remap:<k>=<v>,pipe:<path>Keyboard settings
/grab-keyboardtoggleGrab keyboard and forward all keys to remote
/grab-mousetoggleGrab mouse inside the window
# Set keyboard layout by name
xfreerdp /v:host /kbd:layout:en-US

# Remap scancode: swap 'a' and 's' on a US keyboard
xfreerdp /v:host /kbd:remap:0x1e=0x1f,remap:0x1f=0x1e

# Enable Unicode keyboard input
xfreerdp /v:host /kbd:unicode:on

Listing / discovery

OptionValueDescription
/list:monitorList detected monitors
/list:kbdList available keyboard layouts
/list:kbd-lang[:<filter>]List keyboard language IDs
/list:kbd-scancodeList RDP scancodes
/list:smartcardList smartcard readers
/list:timezonesList supported Windows time zones
/list:tuneList all internal settings
/versionflagPrint FreeRDP version
/buildconfigflagPrint build configuration

Miscellaneous

OptionFormatDefaultDescription
/timezone:<windows tz name>Override time zone sent to server
/client-hostname:<name>Client hostname sent to the server
/client-build-number:<n>Client build number (affects smartcard behaviour)
/server-name:<name>Alternate server name for TLS/Kerberos validation
/redirect-prefer:FQDN|IP|NETBIOSOverride redirection preference order
/tune:<key:value>[,...]Directly set internal FreeRDP settings (expert use)
/log-level:OFF|FATAL|ERROR|WARN|INFO|DEBUG|TRACEDefault log level
/log-filters:<tag>:<level>[,...]Per-tag log filters (see wLog(7))
/dump:record|replay,file:<path>[,nodelay]Record or replay an RDP session
/disable-outputflagDisable all graphics decoding (for load testing)
/prevent-session-lock[<secs>]180sInject idle mouse events to keep session alive
/action-script:<path>~/.config/freerdp/action.shKey-combination action script

Environment variables

VariableDescription
WLOG_LEVELDefault log level (e.g. DEBUG, TRACE)
WLOG_FILTERLog filter string (e.g. com.freerdp.core:TRACE)
https_proxy / HTTPS_PROXYProxy used for RD Gateway connections
FREERDP_WLROOTS_HACK(SDL3 only) Multimonitor detection workaround for wlroots compositors

Exit codes

CodeMeaning
0Successful disconnect
1Logoff
2Idle timeout
3Logon timeout
4Connection replaced by another session
Non-zeroError (connection failure, bad arguments, etc.)