Skip to main content
rdpSettings is the opaque configuration object that holds every parameter for an RDP session: server address, credentials, display geometry, security protocols, performance flags, and much more. Settings are accessed exclusively through the typed accessor functions described on this page.
The rdpSettings struct is opaque by default (controlled by WITH_OPAQUE_SETTINGS). Always use the freerdp_settings_get_* / freerdp_settings_set_* API rather than accessing struct fields directly.

Lifecycle

When using freerdp_client_context_new(), the settings object is created automatically and is accessible at context->settings. You do not need to call freerdp_settings_new() yourself.

Settings Lifetime and Instances

FreeRDP maintains up to three simultaneous settings objects per connection:
  1. Initial configuration — set by the client application, persists for the whole process lifetime.
  2. Remote peer settings — received from the server during capability exchange; valid until disconnect.
  3. Merged settings — combined result used for the active session.
Always be aware of which settings instance you are operating on, especially in proxy or reconnect scenarios. Call freerdp_persist_credentials() after modifying credentials post-PreConnect so they survive reconnects.

Typed Accessor Functions

Settings keys are typed; each key belongs to exactly one accessor family.

Boolean

Integer (16/32/64-bit, signed and unsigned)

String

freerdp_settings_get_string() returns a pointer into the internal buffer. The pointer is invalidated after any call that modifies the same key. Copy the value if you need to retain it.

Pointer

Set by Name

For scripting, configuration files, or command-line handling you can set any key by its string name:
The value string is parsed according to the key type. Boolean values accept "true", "false", "on", "off", "0", "1" (case-insensitive).

Validation

Use this as a single post-setup check instead of inspecting every freerdp_settings_set_* return value individually.

Key Settings Reference

Connection Target

Credentials

Display

Security

Performance

Miscellaneous

Introspection Helpers

Code Example

A typical PreConnect callback that configures connection parameters: