/** * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Client Command-Line Interface * * Copyright 2018 Bernhard Miklautz * Copyright 2018 Thincast Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef CLIENT_COMMON_CMDLINE_H #define CLIENT_COMMON_CMDLINE_H #include #include static const COMMAND_LINE_ARGUMENT_A global_cmd_args[] = { { "a", COMMAND_LINE_VALUE_REQUIRED, "[,]", NULL, NULL, -1, "addin", "Addin" }, { "action-script", COMMAND_LINE_VALUE_REQUIRED, "", "~/.config/freerdp/action.sh", NULL, -1, NULL, "Action script" }, { "admin", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, "console", "Admin (or console) session" }, { "aero", COMMAND_LINE_VALUE_BOOL, NULL, NULL, BoolValueFalse, -1, NULL, "desktop composition" }, { "app", COMMAND_LINE_VALUE_REQUIRED, "program:[|<||alias>],cmd:,file:,guid:,icon:,name:<" "name>,workdir:,hidef:[on|off]", NULL, NULL, -1, NULL, "Remote application program" }, #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "app-cmd", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /app:cmd:] Remote application command-line parameters" }, { "app-file", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /app:file:] File to open with remote application" }, { "app-guid", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /app:guid:] Remote application GUID" }, { "app-icon", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /app:icon:] Remote application icon for user interface" }, { "app-name", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /app:name:] Remote application name for user interface" }, { "app-workdir", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /app:workdir:] Remote application workspace path" }, #endif { "assistance", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Remote assistance password" }, { "auto-request-control", COMMAND_LINE_VALUE_FLAG, "", NULL, NULL, -1, NULL, "Automatically request remote assistance input control" }, { "async-channels", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Asynchronous channels (experimental)" }, { "async-update", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Asynchronous update" }, { "audio-mode", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Audio output mode" }, { "auth-only", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Authenticate only" }, { "auth-pkg-list", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Authentication package filter (comma-separated list, use '!' to exclude)" }, { "authentication", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "Authentication (experimental)" }, { "auto-reconnect", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Automatic reconnection" }, { "auto-reconnect-max-retries", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Automatic reconnection maximum retries, 0 for unlimited [0,1000]" }, #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "bitmap-cache", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "[DEPRECATED, use /cache:bitmap[:on|off]] bitmap cache" }, { "persist-cache", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "[DEPRECATED, use /cache:persist[:on|off]] persistent bitmap cache" }, { "persist-cache-file", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /cache:persist-file:] persistent bitmap cache file" }, #endif { "bpp", COMMAND_LINE_VALUE_REQUIRED, "", "16", NULL, -1, NULL, "Session bpp (color depth)" }, { "buildconfig", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT_BUILDCONFIG, NULL, NULL, NULL, -1, NULL, "Print the build configuration" }, { "cache", COMMAND_LINE_VALUE_REQUIRED, "[bitmap[:on|off],codec[:rfx|nsc],glyph[:on|off],offscreen[:on|off],persist,persist-file:<" "filename>]", NULL, NULL, -1, NULL, "" }, { "cert", COMMAND_LINE_VALUE_REQUIRED, "[deny,ignore,name:,tofu,fingerprint::[,fingerprint::]]", NULL, NULL, -1, NULL, "Certificate accept options. Use with care!\n" " * deny ... Automatically abort connection if the certificate does not match, no " "user interaction.\n" " * ignore ... Ignore the certificate checks altogether (overrules all other options)\n" " * name ... Use the alternate instead of the certificate subject to match " "locally stored certificates\n" " * tofu ... Accept certificate unconditionally on first connect and deny on " "subsequent connections if the certificate does not match\n" " * fingerprints ... A list of certificate hashes that are accepted unconditionally for a " "connection" }, #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "cert-deny", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "[DEPRECATED, use /cert:deny] Automatically abort connection for any certificate that can " "not be validated." }, { "cert-ignore", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "[DEPRECATED, use /cert:ignore] Ignore certificate" }, { "cert-name", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /cert:name:] Certificate name" }, { "cert-tofu", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "[DEPRECATED, use /cert:tofu] Automatically accept certificate on first connect" }, #endif #ifdef _WIN32 { "connect-child-session", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, "", "connect to child session (win32)" }, #endif { "client-build-number", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Client Build Number sent to server (influences smartcard behaviour, see [MS-RDPESC])" }, { "client-hostname", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Client Hostname to send to server" }, { "clipboard", COMMAND_LINE_VALUE_BOOL | COMMAND_LINE_VALUE_OPTIONAL, "[[use-selection:],[direction-to:[all|local|remote|off]],[files-to[:all|local|remote|" "off]]]", BoolValueTrue, NULL, -1, NULL, "Redirect clipboard:\n" " * use-selection: ... (X11) Specify which X selection to access. Default is " "CLIPBOARD. PRIMARY is the X-style middle-click selection.\n" " * direction-to:[all|local|remote|off] control enabled clipboard direction\n" " * files-to:[all|local|remote|off] control enabled file clipboard directiont" }, #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "codec-cache", COMMAND_LINE_VALUE_REQUIRED, "[rfx|nsc|jpeg]", NULL, NULL, -1, NULL, "[DEPRECATED, use /cache:codec:[rfx|nsc|jpeg]] Bitmap codec cache" }, #endif { "compression", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, "z", "compression" }, { "compression-level", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Compression level (0,1,2)" }, { "credentials-delegation", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "credentials delegation" }, { "d", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Domain" }, { "decorations", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "Window decorations" }, { "disp", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Display control" }, { "drive", COMMAND_LINE_VALUE_REQUIRED, ",", NULL, NULL, -1, NULL, "Redirect directory as named share . Hotplug support is enabled with " "/drive:hotplug,*. This argument provides the same function as \"Drives that I plug in " "later\" option in MSTSC." }, { "drives", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Redirect all mount points as shares" }, { "dump", COMMAND_LINE_VALUE_REQUIRED, ",", NULL, NULL, -1, NULL, "record or replay dump" }, { "dvc", COMMAND_LINE_VALUE_REQUIRED, "[,]", NULL, NULL, -1, NULL, "Dynamic virtual channel" }, { "dynamic-resolution", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Send resolution updates when the window is resized" }, { "echo", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, "echo", "Echo channel" }, { "encryption", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "Encryption (experimental)" }, { "encryption-methods", COMMAND_LINE_VALUE_REQUIRED, "[40,][56,][128,][FIPS]", NULL, NULL, -1, NULL, "RDP standard security encryption methods" }, { "f", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Fullscreen mode (++ toggles fullscreen)" }, { "fipsmode", COMMAND_LINE_VALUE_BOOL, NULL, NULL, NULL, -1, NULL, "FIPS mode" }, { "floatbar", COMMAND_LINE_VALUE_OPTIONAL, "sticky:[on|off],default:[visible|hidden],show:[always|fullscreen|window]", NULL, NULL, -1, NULL, "floatbar is disabled by default (when enabled defaults to sticky in fullscreen mode)" }, { "fonts", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "smooth fonts (ClearType)" }, { "force-console-callbacks", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Use default callbacks (console) for certificate/credential/..." }, { "frame-ack", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Number of frame acknowledgement" }, { "args-from", COMMAND_LINE_VALUE_REQUIRED, "|stdin|fd:|env:", NULL, NULL, -1, NULL, "Read command line from a file, stdin or file descriptor. This argument can not be combined " "with any other. " "Provide one argument per line." }, { "from-stdin", COMMAND_LINE_VALUE_OPTIONAL, "force", NULL, NULL, -1, NULL, "Read credentials from stdin. With the prompt is done before connection, otherwise " "on server request." }, { "gateway", COMMAND_LINE_VALUE_REQUIRED, "g:[:],u:,d:,p:,usage-method:[" "direct|detect],access-token:<" "token>,type:[rpc|http[,no-websockets][,extauth-sspi-ntlm]|auto[,no-websockets][,extauth-" "sspi-ntlm]]|arm,url:,bearer:", NULL, NULL, -1, "gw", "Gateway Hostname" }, #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "g", COMMAND_LINE_VALUE_REQUIRED, "[:]", NULL, NULL, -1, NULL, "[DEPRECATED, use /gateway:g:] Gateway Hostname" }, { "gateway-usage-method", COMMAND_LINE_VALUE_REQUIRED, "[direct|detect]", NULL, NULL, -1, "gum", "[DEPRECATED, use /gateway:usage-method:] Gateway usage method" }, { "gd", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /gateway:d:] Gateway domain" }, #endif { "gdi", COMMAND_LINE_VALUE_REQUIRED, "sw|hw", NULL, NULL, -1, NULL, "GDI rendering" }, { "geometry", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Geometry tracking channel" }, { "gestures", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Consume multitouch input locally" }, #ifdef WITH_GFX_H264 { "gfx", COMMAND_LINE_VALUE_OPTIONAL, "[[progressive[:on|off]|RFX[:on|off]|AVC420[:on|off]AVC444[:on|off]],mask:,small-" "cache[:on|off],thin-client[:on|off],progressive[:on|" "off]]", NULL, NULL, -1, NULL, "RDP8 graphics pipeline" }, #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "gfx-h264", COMMAND_LINE_VALUE_OPTIONAL, "[[AVC420|AVC444],mask:]", NULL, NULL, -1, NULL, "[DEPRECATED, use /gfx:avc420] RDP8.1 graphics pipeline using H264 codec" }, #endif #else { "gfx", COMMAND_LINE_VALUE_OPTIONAL, "[progressive[:on|off]|RFX[:on|off]|AVC420[:on|off]AVC444[:on|off]],mask:,small-cache[" ":on|off],thin-client[:on|off],progressive[:on|off]]", NULL, NULL, -1, NULL, "RDP8 graphics pipeline" }, #endif #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "gfx-progressive", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "[DEPRECATED, use /gfx:progressive] RDP8 graphics pipeline using progressive codec" }, { "gfx-small-cache", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "[DEPRECATED, use /gfx:small-cache] RDP8 graphics pipeline using small cache mode" }, { "gfx-thin-client", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "[DEPRECATED, use /gfx:thin-client] RDP8 graphics pipeline using thin client mode" }, { "glyph-cache", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "[DEPRECATED, use /cache:glyph[:on|off]] Glyph cache (experimental)" }, #endif #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "gp", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /gateway:p:] Gateway password" }, #endif { "grab-keyboard", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "Grab keyboard" }, { "grab-mouse", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "Grab mouse" }, #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "gt", COMMAND_LINE_VALUE_REQUIRED, "[rpc|http[,no-websockets][,extauth-sspi-ntlm]|auto[,no-websockets][,extauth-sspi-ntlm]]", NULL, NULL, -1, NULL, "[DEPRECATED, use /gateway:type:] Gateway transport type" }, { "gu", COMMAND_LINE_VALUE_REQUIRED, "[[\\]|[@]]", NULL, NULL, -1, NULL, "[DEPRECATED, use /gateway:u:] Gateway username" }, { "gat", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /gateway:access-token:] Gateway Access Token" }, #endif { "h", COMMAND_LINE_VALUE_REQUIRED, "", "768", NULL, -1, NULL, "Height" }, { "heartbeat", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "Support heartbeat PDUs" }, { "help", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT_HELP, NULL, NULL, NULL, -1, "?", "Print help" }, { "home-drive", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Redirect user home as share" }, { "ipv6", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, "6", "Prefer IPv6 AAA record over IPv4 A record" }, #if defined(WITH_JPEG) { "jpeg", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "JPEG codec support" }, { "jpeg-quality", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "JPEG quality" }, #endif { "kbd", COMMAND_LINE_VALUE_REQUIRED, "[layout:[0x|],lang:<0x>,fn-key:,type:,subtype:,unicode[:" "on|off],remap:=,remap:=,pipe:]", NULL, NULL, -1, NULL, "Keyboard related options:\n" " * layout: set the keybouard layout announced to the server\n" " * lang: set the keyboard language identifier sent to the server\n" " * fn-key: Function key value\n" " * pipe: Name of a named pipe that can be used to type text into the RDP session\n" }, #if defined(WITH_FREERDP_DEPRECATED_COMMANDLINE) { "kbd-lang", COMMAND_LINE_VALUE_REQUIRED, "0x", NULL, NULL, -1, NULL, "[DEPRECATED, use / kbd:lang:] Keyboard active language identifier" }, { "kbd-fn-key", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /kbd:fn-key:] Function key value" }, { "kbd-list", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT, NULL, NULL, NULL, -1, NULL, "[DEPRECATED, use /list:kbd] List keyboard layouts" }, { "kbd-scancode-list", COMMAND_LINE_VALUE_FLAG | COMMAND_LINE_PRINT, NULL, NULL, NULL, -1, NULL, "[DEPRECATED, use list:kbd-scancode] List keyboard RDP scancodes" }, { "kbd-lang-list", COMMAND_LINE_VALUE_OPTIONAL | COMMAND_LINE_PRINT, NULL, NULL, NULL, -1, NULL, "[DEPRECATED, use /list:kbd-lang] List keyboard languages" }, { "kbd-remap", COMMAND_LINE_VALUE_REQUIRED, "[DEPRECATED, use /kbd:remap] List of =,... pairs to remap scancodes", NULL, NULL, -1, NULL, "Keyboard scancode remapping" }, { "kbd-subtype", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /kbd:subtype]Keyboard subtype" }, { "kbd-type", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /kbd:type] Keyboard type" }, { "kbd-unicode", COMMAND_LINE_VALUE_FLAG, "", NULL, NULL, -1, NULL, "[DEPRECATED, use /kbd:unicode[:on|off]] Send unicode symbols, e.g. use the local " "keyboard map. ATTENTION: Does not work with every " "RDP server!" }, #endif { "kerberos", COMMAND_LINE_VALUE_REQUIRED, "[kdc-url:,lifetime: