1ORG.FREEDESKTOP.LOCALE1(5) org.freedesktop.locale1 ORG.FREEDESKTOP.LOCALE1(5)
2
3
4
6 org.freedesktop.locale1 - The D-Bus interface of systemd-localed
7
9 systemd-localed.service(8) is a system service that can be used to
10 control the system locale and keyboard mapping from user programs. This
11 page describes the D-Bus interface.
12
14 The service exposes the following interfaces on the bus:
15
16 node /org/freedesktop/locale1 {
17 interface org.freedesktop.locale1 {
18 methods:
19 SetLocale(in as locale,
20 in b interactive);
21 SetVConsoleKeyboard(in s keymap,
22 in s keymap_toggle,
23 in b convert,
24 in b interactive);
25 SetX11Keyboard(in s layout,
26 in s model,
27 in s variant,
28 in s options,
29 in b convert,
30 in b interactive);
31 properties:
32 readonly as Locale = ['...', ...];
33 readonly s X11Layout = '...';
34 readonly s X11Model = '...';
35 readonly s X11Variant = '...';
36 readonly s X11Options = '...';
37 readonly s VConsoleKeymap = '...';
38 readonly s VConsoleKeymapToggle = '...';
39 };
40 interface org.freedesktop.DBus.Peer { ... };
41 interface org.freedesktop.DBus.Introspectable { ... };
42 interface org.freedesktop.DBus.Properties { ... };
43 };
44
45
46
47
48
49
50
51
52
53
54
55
56
57 Methods
58 If you set a new system locale all old system locale settings will be
59 dropped and the new settings will be saved to disk. The locale will
60 also be passed to the system manager, and subsequently started daemons
61 will inherit the new system locale. Note that already running daemons
62 will not learn about the new value.
63
64 The SetVConsoleKeyboard() method may be used to set the key mapping for
65 the virtual console. Similarly, SetX11Keyboard() may be used to set the
66 default key mapping of any X11 servers.
67
68 Note that SetVConsoleKeyboard() instantly applies the new key mapping
69 to the console, while SetX11Keyboard() simply sets a default that may
70 be used by later sessions.
71
72 The boolean argument convert may be set to optionally convert the
73 console keyboard configuration to X11 keyboard mappings and vice versa.
74 If true and SetVConsoleKeyboard() is used, the nearest X11 keyboard
75 setting for the chosen console setting is set. If true and
76 SetX11Keyboard() is used, the nearest console keyboard setting for the
77 chosen X11 setting is set. Hence, it is usually sufficient to call only
78 one of the two functions.
79
80 For graphical UIs that need to set the system keyboard mapping simply
81 invoke SetX11Keyboard(), set convert=true and ignore
82 SetVConsoleKeyboard().
83
84 Use the empty string for the keymap parameters you wish not to set.
85
86 The interactive boolean parameters can be used to control whether
87 polkit[1] should interactively ask the user for authentication
88 credentials if required.
89
90 Signals
91 Whenever the system locale or keymap is changed via the daemon,
92 PropertyChanged signals are sent out to which clients can subscribe.
93
94 Properties
95 The system locale is shown in the Locale property. It is an array
96 containing environment-variable-assignment-like strings. The following
97 strings are known: LANG=, LC_CTYPE=, LC_NUMERIC=, LC_TIME=,
98 LC_COLLATE=, LC_MONETARY=, LC_MESSAGES=, LC_PAPER=, LC_NAME=,
99 LC_ADDRESS=, LC_TELEPHONE=, LC_MEASUREMENT=, LC_IDENTIFICATION=.
100
101 The X11Layout, X11Model, X11Variant, and X11Options properties show
102 values configurable with SetX11Keyboard() described above (or
103 SetVConsoleKeyboard() with convert=true). The VConsoleKeymap and
104 VConsoleKeymapToggle properties show values configurable with
105 SetVConsoleKeyboard() (or SetX11Keyboard() with convert=true).
106
107 Security
108 Changing the system locale or keymap using this interface is
109 authenticated via polkit. The polkit action for SetLocale() is
110 org.freedesktop.locale1.set-locale. The polkit action for
111 SetX11Keyboard() and SetVConsoleKeyboard() is
112 org.freedesktop.locale1.set-keyboard.
113
115 Example 1. Introspect org.freedesktop.locale1 on the bus
116
117 $ gdbus introspect --system \
118 --dest org.freedesktop.locale1 \
119 --object-path /org/freedesktop/locale1
120
121
123 These D-Bus interfaces follow the usual interface versioning
124 guidelines[2].
125
127 1. polkit
128 https://www.freedesktop.org/software/polkit/docs/latest/
129
130 2. the usual interface versioning guidelines
131 https://0pointer.de/blog/projects/versioning-dbus.html
132
133
134
135systemd 253 ORG.FREEDESKTOP.LOCALE1(5)