.. meta::
   :description: Overview of how ThinLinc client configuration settings
                 are stored and managed on Linux, macOS, and Windows
                 systems, including file formats, directory locations,
                 and registry usage.

.. _clientconf:

Configuration storage
~~~~~~~~~~~~~~~~~~~~~

The ThinLinc client uses a plain text format with key/value pairs to
store the configuration, except on Windows where the registry is used
for this purpose. When running on a network-booted ThinStation terminal,
configuration options can also be provided remotely via TFTP. See
:ref:`thinstation` for further information.

Configuration file format
^^^^^^^^^^^^^^^^^^^^^^^^^

Each parameter is written on one line, followed by an equal sign (``=``)
and the value of the parameter, as in the following example::

   SOUND_ENABLED = 0
   SERVER_NAME = tl.example.com

For descriptions of all configuration parameters, see
:ref:`clientconf_params`.

Configuration file locations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On Linux systems, including Linux-based thin terminals, the ThinLinc
client first reads the file :file:`/opt/thinlinc/etc/tlclient.conf`, if
it exists. It then reads the file :file:`.thinlinc/tlclient.conf` in the
user's home directory, and the values there override the ones from
:file:`/opt/thinlinc/etc/tlclient.conf`. This way, a system
administrator can set global defaults for client operations, while each
user can still customize the client behavior.

On macOS, the behavior is the same, except that the global configuration
file is located at :file:`/Library/Application Support/ThinLinc
Client/tlclient.conf`.

On all platforms, the command-line option :option:`-C` can be used to
specify a configuration file in an arbitrary location. Any name is
accepted, but the file extension :file:`.tlclient` is recommended. The
Windows, Linux, and macOS packages configure the system to automatically
recognize such files as configuration files for the ThinLinc client.
Additionally, the Internet Media Type
:mimetype:`application/vnd.cendio.thinlinc.clientconf` is linked to such
configuration files.

Windows client configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On Windows, the ThinLinc client reads its configuration from the
registry. All ThinLinc client data is stored under
``Software\Cendio\ThinLinc\tlclient`` in the HKLM and HKCU hives. The
parameter names are the same as for the Linux client.

The behavior of global and user-specific settings is identical to that
of other platforms, where settings in HKLM correspond to the global
settings, and those in HKCU correspond to user-specific settings.
