The API can be accessed by any WBEM-capable client. OpenLMI already provides:
- Python module lmi.scripts.locale, part of OpenLMI scripts.
- Command line tool: LMI metacommand, with ‘locale’ subcommand.
- Get/set system locale represented by environment variables (LANG, LANGUAGE, LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES, LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT and LC_IDENTIFICATION).
- Get/set the default key mapping of the X11 servers (keyboard layouts, model, variant and options).
- Get/set the default key mapping for virtual console.
- Set the system time.
- Get/set the system timezone.
- Get/set whether RTC is maintained in local time or UTC.
- Get/set whether the system clock is synchronized with a remote NTP server using systemd-timesyncd.
If you set a new system locale with SetLocale() method, all old system locale settings will be dropped, and the new settings will be saved to disk. It will also be passed to the system manager, and subsequently started daemons will inherit the new system locale from it. Already running daemons will not learn about the new system locale.
Setting key mapping with SetVConsoleKeyboard() method instantly applies the new keymapping to the console, while setting the key mapping of X11 server using SetX11Keyboard() method simply sets a default that may be used by later sessions.
Table of Contents
- Getting locale settings
- Setting system locale
- Setting default key mapping of the X11 servers
- Setting default key mapping of the virtual console
- Setting system time
- Setting system timezone
- Setting whether the RTC is maintained in local time/UTC
- Setting whether the system clock is syncrhonized with a remote NTP server