summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-leap-15-6/man5/org.freedesktop.locale1.5
blob: 26731543e67b707e8160f17b9d6e2e60ccfac57f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
'\" t
.TH "ORG\&.FREEDESKTOP\&.LOCALE1" "5" "" "systemd 254" "org.freedesktop.locale1"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
org.freedesktop.locale1 \- The D\-Bus interface of systemd\-localed
.SH "INTRODUCTION"
.PP
\fBsystemd-localed.service\fR(8)
is a system service that can be used to control the system locale and keyboard mapping from user programs\&. This page describes the D\-Bus interface\&.
.SH "THE D\-BUS API"
.PP
The service exposes the following interfaces on the bus:
.sp
.if n \{\
.RS 4
.\}
.nf
node /org/freedesktop/locale1 {
  interface org\&.freedesktop\&.locale1 {
    methods:
      SetLocale(in  as locale,
                in  b interactive);
      SetVConsoleKeyboard(in  s keymap,
                          in  s keymap_toggle,
                          in  b convert,
                          in  b interactive);
      SetX11Keyboard(in  s layout,
                     in  s model,
                     in  s variant,
                     in  s options,
                     in  b convert,
                     in  b interactive);
    properties:
      readonly as Locale = [\*(Aq\&.\&.\&.\*(Aq, \&.\&.\&.];
      readonly s X11Layout = \*(Aq\&.\&.\&.\*(Aq;
      readonly s X11Model = \*(Aq\&.\&.\&.\*(Aq;
      readonly s X11Variant = \*(Aq\&.\&.\&.\*(Aq;
      readonly s X11Options = \*(Aq\&.\&.\&.\*(Aq;
      readonly s VConsoleKeymap = \*(Aq\&.\&.\&.\*(Aq;
      readonly s VConsoleKeymapToggle = \*(Aq\&.\&.\&.\*(Aq;
  };
  interface org\&.freedesktop\&.DBus\&.Peer { \&.\&.\&. };
  interface org\&.freedesktop\&.DBus\&.Introspectable { \&.\&.\&. };
  interface org\&.freedesktop\&.DBus\&.Properties { \&.\&.\&. };
};
    
.fi
.if n \{\
.RE
.\}











.SS "Methods"
.PP
If you set a new system locale all old system locale settings will be dropped and the new settings will be saved to disk\&. The locale will also be passed to the system manager, and subsequently started daemons will inherit the new system locale\&. Note that already running daemons will not learn about the new value\&.
.PP
The
\fBSetVConsoleKeyboard()\fR
method may be used to set the key mapping for the virtual console\&. Similarly,
\fBSetX11Keyboard()\fR
may be used to set the default key mapping of any X11 servers\&.
.PP
Note that
\fBSetVConsoleKeyboard()\fR
instantly applies the new key mapping to the console, while
\fBSetX11Keyboard()\fR
simply sets a default that may be used by later sessions\&.
.PP
The boolean argument
\fIconvert\fR
may be set to optionally convert the console keyboard configuration to X11 keyboard mappings and vice versa\&. If true and
\fBSetVConsoleKeyboard()\fR
is used, the nearest X11 keyboard setting for the chosen console setting is set\&. If true and
\fBSetX11Keyboard()\fR
is used, the nearest console keyboard setting for the chosen X11 setting is set\&. Hence, it is usually sufficient to call only one of the two functions\&.
.PP
For graphical UIs that need to set the system keyboard mapping simply invoke
\fBSetX11Keyboard()\fR, set
\fIconvert=true\fR
and ignore
\fBSetVConsoleKeyboard()\fR\&.
.PP
Use the empty string for the keymap parameters you wish not to set\&.
.PP
The
\fIinteractive\fR
boolean parameters can be used to control whether
\m[blue]\fBpolkit\fR\m[]\&\s-2\u[1]\d\s+2
should interactively ask the user for authentication credentials if required\&.
.SS "Signals"
.PP
Whenever the system locale or keymap is changed via the daemon,
\fBPropertyChanged\fR
signals are sent out to which clients can subscribe\&.
.SS "Properties"
.PP
The system locale is shown in the
\fILocale\fR
property\&. It is an array containing environment\-variable\-assignment\-like strings\&. The following strings are known:
\fILANG=\fR,
\fILC_CTYPE=\fR,
\fILC_NUMERIC=\fR,
\fILC_TIME=\fR,
\fILC_COLLATE=\fR,
\fILC_MONETARY=\fR,
\fILC_MESSAGES=\fR,
\fILC_PAPER=\fR,
\fILC_NAME=\fR,
\fILC_ADDRESS=\fR,
\fILC_TELEPHONE=\fR,
\fILC_MEASUREMENT=\fR,
\fILC_IDENTIFICATION=\fR\&.
.PP
The
\fIX11Layout\fR,
\fIX11Model\fR,
\fIX11Variant\fR, and
\fIX11Options\fR
properties show values configurable with
\fBSetX11Keyboard()\fR
described above (or
\fBSetVConsoleKeyboard()\fR
with
\fIconvert=true\fR)\&. The
\fIVConsoleKeymap\fR
and
\fIVConsoleKeymapToggle\fR
properties show values configurable with
\fBSetVConsoleKeyboard()\fR
(or
\fBSetX11Keyboard()\fR
with
\fIconvert=true\fR)\&.
.SS "Security"
.PP
Changing the system locale or keymap using this interface is authenticated via polkit\&. The polkit action for
\fBSetLocale()\fR
is
\fBorg\&.freedesktop\&.locale1\&.set\-locale\fR\&. The polkit action for
\fBSetX11Keyboard()\fR
and
\fBSetVConsoleKeyboard()\fR
is
\fBorg\&.freedesktop\&.locale1\&.set\-keyboard\fR\&.
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&Introspect org\&.freedesktop\&.locale1 on the bus\fR
.sp
.if n \{\
.RS 4
.\}
.nf
$ gdbus introspect \-\-system \e
  \-\-dest org\&.freedesktop\&.locale1 \e
  \-\-object\-path /org/freedesktop/locale1
      
.fi
.if n \{\
.RE
.\}
.SH "VERSIONING"
.PP
These D\-Bus interfaces follow
\m[blue]\fBthe usual interface versioning guidelines\fR\m[]\&\s-2\u[2]\d\s+2\&.
.SH "NOTES"
.IP " 1." 4
polkit
.RS 4
\%https://www.freedesktop.org/software/polkit/docs/latest/
.RE
.IP " 2." 4
the usual interface versioning guidelines
.RS 4
\%https://0pointer.de/blog/projects/versioning-dbus.html
.RE