systemd-localed.service
Configure system locale and keyboard layout
SYNOPSIS
To manage the systemd-localed.service unit:
systemctl command systemd-localed.service
Examples:
systemctl status systemd-localed.service
systemctl start systemd-localed.service
systemctl stop systemd-localed.service
systemctl enable systemd-localed.service
systemctl disable systemd-localed.service
PARAMETERS
N/A
systemd-localed.service itself, when managed via systemctl, does not accept direct command-line parameters. The underlying systemd-localed daemon also does not expose user-configurable command-line options; its behavior is controlled through D-Bus calls and system configuration files.
DESCRIPTION
systemd-localed.service is a core systemd service responsible for managing the system's locale settings, keyboard layout, and console font. It provides a D-Bus interface for other services and applications to query and modify these configurations. Instead of directly editing configuration files like /etc/locale.conf or /etc/vconsole.conf, users and tools are encouraged to interact with systemd-localed via the localectl command-line utility. This service ensures a consistent and centralized approach to locale management across the system. It is typically activated on demand (socket-activated) when a client requests its services, rather than running continuously as a background daemon from boot. Its primary role is to bridge the gap between user-friendly tools and the underlying system configuration files, ensuring proper validation and application of locale-related settings.
CAVEATS
While systemd-localed.service manages locale settings, the actual locale data (e.g., character sets, collation rules) must be installed on the system (often provided by glibc-locale or similar packages).
Changes made via localectl (which uses systemd-localed) are typically applied immediately but may require a reboot or logging out and back in for some applications to fully recognize the new settings, especially for GUI environments.
For per-user locale settings, environment variables like LANG or LC_* should be set in user-specific shell configuration files (e.g., ~/.bashrc, ~/.profile), which override system-wide settings.
CONFIGURATION FILES
systemd-localed primarily interacts with the following files:
/etc/locale.conf: Defines the system-wide locale settings.
/etc/vconsole.conf: Defines the system-wide console keyboard layout and font.
Changes made via localectl are written to these files by systemd-localed.
D-BUS INTERFACE
The service exposes a D-Bus interface (on the system bus, at org.freedesktop.locale1) that allows applications and tools like localectl to query and set system locale, keyboard, and console font settings. This programmatic interface ensures that all tools use a consistent method for managing these critical system properties.
HISTORY
Before systemd, locale settings were primarily managed by directly editing configuration files such as /etc/locale.conf (or distribution-specific files like /etc/default/locale) and ~/.bashrc. Console keyboard layouts and fonts were often configured via /etc/vconsole.conf. With the advent of systemd, the management of these settings was centralized under the systemd-localed daemon and its systemd-localed.service unit. This shift aimed to provide a more robust, D-Bus-enabled, and programmatically accessible interface for system-wide locale configuration, ensuring consistency and simplifying administration. It integrates closely with the localectl command-line tool, which became the preferred method for users to interact with these settings.