CommandLineInterface

jstapels edited this page Oct 21, 2014 · 13 revisions

There are currently two command line interfaces, an old, deprecated one and a new one which was designed to give better interoperability with Windows and is easier to use. Generally speaking, you can now use both --long-option or /long-option. You should use the new interface now the old interface is just kept for compatibility and will be dropped at some point.

New style options

Plugins

  • +clipboard : redirect clipboard
  • /drive:<sharename>,<path> : Redirect <path> as share <sharename>
  • /smartcard:<device> : Redirect smartcard <device>
  • /printer:<device>,<driver> : Redirect a specific printer. Redirecting all printers does not currently work.
  • /serial:<device> : redirect serial port <device>
  • /parallel:<device> : redirect parallel port <device>
  • /microphone:sys:alsa : Redirect audio input
  • /sound:sys:alsa : Redirect audio output
  • /multimedia:sys:alsa : Multimedia redirection
  • /usb:id,<usbid> : Redirect usb device <usbid>. Usbid is a string like dev:054c:0268

Other options

Syntax: /flag enables flag, +toggle or -toggle enables or disables toggle. /toggle and +toggle are the same. Options with values work like this: /option:<value>

  • /v:<server>[:port] Server hostname
  • /port:<number> Server port
  • /w:<width> Width
  • /h:<height> Height
  • /size:<width>x<height> Screen size
  • /f Fullscreen mode
  • /bpp:<depth> Session bpp (color depth)
  • /kbd:0x<layout id> or <layout name> Keyboard layout
  • /kbd-list List keyboard layouts
  • /kbd-type:<type id> Keyboard type
  • /kbd-subtype:<subtype id> Keyboard subtype
  • /kbd-fn-key:<function key count> Keyboard function key count
  • /admin Admin (or console) session
  • /multimon Multi-monitor
  • /workarea Work area
  • /t:<title> Window title
  • +decorations (default:off) Window decorations
  • /a Addin (additional plugins)
  • /vc Static virtual channel, see plugins section
  • /dvc Dynamic virtual channel, see plugins section
  • /u:[<domain>&#93;<user> or <user>[@<domain>] Username
  • /p:<password> Password
  • /d:<domain> Domain
  • /g:<gateway>[:port] Gateway Hostname
  • /gu:[<domain>&#93;<user> or <user>[@<domain>] Gateway username
  • /gp:<password> Gateway password
  • /gd:<domain> Gateway domain
  • /app:||<alias> or <executable path> Remote application program
  • /app-name:<app name> Remote application name for user interface
  • /app-icon:<icon path> Remote application icon for user interface
  • /app-cmd:<parameters> Remote application command-line parameters
  • /app-file:<file name> File to open with remote application
  • /app-guid:<app guid> Remote application GUID
  • +compression (default:off) Compression
  • /shell Alternate shell
  • /shell-dir Shell working directory
  • /audio-mode: Audio output mode
    (mode can 0 - redirect locally, 1 - leave on server, 2 - none)
  • /mic Audio input (microphone)
  • /network:<type> Network connection type
    (type can be modem, broadband[-low|-high], wan, lan, auto[detect])
  • +clipboard (default:off) Redirect clipboard
  • +fonts (default:off) Smooth fonts (cleartype)
  • +aero (default:off) Desktop composition
  • +window-drag (default:off) Full window drag
  • +menu-anims (default:off) Menu animations
  • -themes (default:on) Themes
  • -wallpaper (default:on) Wallpaper
  • /gdi:<sw|hw> GDI rendering
  • /rfx RemoteFX
  • /rfx-mode:<image|video> RemoteFX mode
  • /frame-ack:<number> Frame acknowledgement
  • /nsc NSCodec
  • /jpeg JPEG codec
  • /jpeg-quality:<percentage> JPEG quality
  • -nego (default:on) protocol security negotiation
  • /sec:<rdp|tls|nla|ext> force specific protocol security
  • -sec-rdp (default:on) rdp protocol security
  • -sec-tls (default:on) tls protocol security
  • -sec-nla (default:on) nla protocol security
  • +sec-ext (default:off) nla extended protocol security
  • /cert-name:<name> certificate name
  • /cert-ignore ignore certificate
  • /pcb:<blob> Preconnection Blob
  • /pcid:<id> Preconnection Id
  • /vmconnect:<vmid> Hyper-V console (use port 2179, disable negotiation)
  • -authentication (default:on) authentication (hack!)
  • -encryption (default:on) encryption (hack!)
  • -grab-keyboard (default:on) grab keyboard
  • -mouse-motion (default:on) mouse-motion
  • /parent-window:<window id> Parent window id
  • -bitmap-cache (default:on) bitmap cache
  • -offscreen-cache (default:on) offscreen bitmap cache
  • -glyph-cache (default:on) glyph cache
  • /codec-cache:<rfx|nsc|jpeg> bitmap codec cache
  • -fast-path (default:on) fast-path input/output
  • /version print version
  • /help print help

Old style options

Plugins

Option handling was very counter intuitive. The general syntax was --plugin <pluginname> [ --data <plugindata> -- ]

  • -- plugin cliprdr : Synchronize client and server clipboard data. Plain text, Unicode text, HTML content and images are supported on UX platforms. For xfreerdp on Mac, only text works due to the interaction between X Server and the Mac. For windows, cliprdr does not work.

  • --plugin rdpdr --data <subplugin> [<subplugin> ...] -- : Redirects file system devices on your client to the server. <subplugin> can be one of more of the following:

    • disk:<sharename>:<path> Redirect <path> to the server as shared folder \tsclient&lt;sharename>.

    • printer[:<printername>&#91:<driver>]] Redirect printers to the server. Redirecting all printers does not work right now.

    • serial:<sharename>:<device> Redirect serial <device> to the server. It will be referenced by <sharedname>.

    • parallel:<sharedname>:<lptdevice> Redirects parallel device <lptdevice> on your client to the server, where it will be referenced by . Bidirectional/Read support requires Windows XP or newer.

  • --plugin drdynvc --data <subplugin> [<subplugin> ...] -- : Load the Dynamic Virtual Channel. <ubplugin> can be the DVC sub-plugin name, or a path specifying the sub-plugin module. If the DVC sub-plugin name was passed, xfreerdp will try to locate the sub-plugin in its plugin path. Allowed subplugins:

    • audin Redirect audio recording device to the server. This is an RDP 7.0 feature available in Windows 7, Windows 2008 and Windows 2008 R2. Note that Windows 7 Enterprise edition and Windows 2008 Server has audio redirection disabled by default.

Other options

  • -0: connect to console session
  • -a: set color depth in bit, default is 16
  • -c: initial working directory
  • -D: hide window decorations
  • -T: window title
  • -d: domain
  • -f: fullscreen mode
  • -g: set geometry, using format WxH or X% or 'workarea', default is 1024x768
  • -h: print this help
  • -k: set keyboard layout ID
  • -K: do not interfere with window manager bindings
  • -n: hostname
  • -o: console audio
  • -p: password
  • -s: set startup-shell
  • -t: alternative port number, default is 3389
  • -u: username
  • -x: performance flags (m[odem], b[roadband] or l[an])
  • -X: embed into another window with a given XID.
  • -z: enable compression
  • --app: RemoteApp connection. This implies -g workarea
  • --ext: load an extension
  • --no-auth: disable authentication
  • --authonly: authentication only, no UI
  • --from-stdin: unspecified username, password, domain and hostname params are prompted
  • --no-fastpath: disable fast-path
  • --no-motion: don't send mouse motion events
  • --gdi: graphics rendering (hw, sw)
  • --no-osb: disable offscreen bitmaps
  • --no-bmp-cache: disable bitmap cache
  • --bcv3: codec for bitmap cache v3 (rfx, nsc, jpeg)
  • --rfx: enable RemoteFX
  • --rfx-mode: RemoteFX operational flags (v[ideo], i[mage]), default is video
  • --frame-ack: number of frames pending to be acknowledged, default is 2 (disable with 0)
  • --nsc: enable NSCodec (experimental)
  • --disable-wallpaper: disables wallpaper
  • --composition: enable desktop composition
  • --disable-full-window-drag: disables full window drag
  • --disable-menu-animations: disables menu animations
  • --disable-theming: disables theming
  • --no-nego: disable negotiation of security layer and enforce highest enabled security protocol
  • --no-rdp: disable Standard RDP encryption
  • --no-tls: disable TLS encryption
  • --no-nla: disable network level authentication
  • --ntlm: force NTLM authentication protocol version (1 or 2)
  • --ignore-certificate: ignore verification of logon certificate
  • --certificate-name: use this name for the logon certificate, instead of the server name
  • --sec: force protocol security (rdp, tls or nla)
  • --tsg: Terminal Server Gateway ( )
  • --kbd-list: list all keyboard layout ids used by -k
  • --no-salted-checksum: disable salted checksums with Standard RDP encryption
  • --pcid: preconnection id
  • --pcb: preconnection blob
  • --version: print version information

Source

Command line options are derived from a datastructure. You can dump this using xfreerdp --help or xfreerdp /help