Debian Codegraph @

upstream/debian-unstable/man5/org.freedesktop.hostname1.5

raw
1 '\" t
2 .TH "ORG\&.FREEDESKTOP\&.HOSTNAME1" "5" "" "systemd 261~rc3" "org.freedesktop.hostname1"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 org.freedesktop.hostname1 \- The D\-Bus interface of systemd\-hostnamed
24 .SH "INTRODUCTION"
25 .PP
26 \fBsystemd-hostnamed.service\fR(8)
27 is a system service that can be used to control the hostname and related machine metadata from user programs\&. This page describes the hostname semantics and the D\-Bus interface\&.
28 .SH "THE D\-BUS API"
29 .PP
30 The service exposes the following interfaces on the bus:
31 .sp
32 .if n \{\
33 .RS 4
34 .\}
35 .nf
36 node /org/freedesktop/hostname1 {
37 interface org\&.freedesktop\&.hostname1 {
38 methods:
39 SetHostname(in s hostname,
40 in b interactive);
41 SetStaticHostname(in s hostname,
42 in b interactive);
43 SetPrettyHostname(in s hostname,
44 in b interactive);
45 SetIconName(in s icon,
46 in b interactive);
47 SetChassis(in s chassis,
48 in b interactive);
49 SetDeployment(in s deployment,
50 in b interactive);
51 SetLocation(in s location,
52 in b interactive);
53 SetTags(in as tags);
54 GetProductUUID(in b interactive,
55 out ay uuid);
56 GetHardwareSerial(out s serial);
57 Describe(out s json);
58 GetMachineInfo(in s field,
59 out s value);
60 properties:
61 readonly s Hostname = \*(Aq\&.\&.\&.\*(Aq;
62 readonly s StaticHostname = \*(Aq\&.\&.\&.\*(Aq;
63 readonly s PrettyHostname = \*(Aq\&.\&.\&.\*(Aq;
64 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
65 readonly s DefaultHostname = \*(Aq\&.\&.\&.\*(Aq;
66 readonly s HostnameSource = \*(Aq\&.\&.\&.\*(Aq;
67 readonly s IconName = \*(Aq\&.\&.\&.\*(Aq;
68 readonly s Chassis = \*(Aq\&.\&.\&.\*(Aq;
69 readonly s Deployment = \*(Aq\&.\&.\&.\*(Aq;
70 readonly s Location = \*(Aq\&.\&.\&.\*(Aq;
71 readonly as Tags = [\*(Aq\&.\&.\&.\*(Aq, \&.\&.\&.];
72 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
73 readonly s KernelName = \*(Aq\&.\&.\&.\*(Aq;
74 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
75 readonly s KernelRelease = \*(Aq\&.\&.\&.\*(Aq;
76 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
77 readonly s KernelVersion = \*(Aq\&.\&.\&.\*(Aq;
78 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
79 readonly s OperatingSystemPrettyName = \*(Aq\&.\&.\&.\*(Aq;
80 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
81 readonly s OperatingSystemFancyName = \*(Aq\&.\&.\&.\*(Aq;
82 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
83 readonly s OperatingSystemCPEName = \*(Aq\&.\&.\&.\*(Aq;
84 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
85 readonly t OperatingSystemSupportEnd = \&.\&.\&.;
86 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
87 readonly s HomeURL = \*(Aq\&.\&.\&.\*(Aq;
88 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
89 readonly s OperatingSystemImageID = \*(Aq\&.\&.\&.\*(Aq;
90 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
91 readonly s OperatingSystemImageVersion = \*(Aq\&.\&.\&.\*(Aq;
92 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
93 readonly s HardwareVendor = \*(Aq\&.\&.\&.\*(Aq;
94 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
95 readonly s HardwareModel = \*(Aq\&.\&.\&.\*(Aq;
96 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
97 readonly s HardwareSKU = \*(Aq\&.\&.\&.\*(Aq;
98 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
99 readonly s HardwareVersion = \*(Aq\&.\&.\&.\*(Aq;
100 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
101 readonly s FirmwareVersion = \*(Aq\&.\&.\&.\*(Aq;
102 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
103 readonly s FirmwareVendor = \*(Aq\&.\&.\&.\*(Aq;
104 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
105 readonly t FirmwareDate = \&.\&.\&.;
106 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
107 readonly ay MachineID = [\&.\&.\&.];
108 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
109 readonly ay BootID = [\&.\&.\&.];
110 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
111 readonly u VSockCID = \&.\&.\&.;
112 @org\&.freedesktop\&.DBus\&.Property\&.EmitsChangedSignal("const")
113 readonly s ChassisAssetTag = \*(Aq\&.\&.\&.\*(Aq;
114 };
115 interface org\&.freedesktop\&.DBus\&.Peer { \&.\&.\&. };
116 interface org\&.freedesktop\&.DBus\&.Introspectable { \&.\&.\&. };
117 interface org\&.freedesktop\&.DBus\&.Properties { \&.\&.\&. };
118 };
119 .fi
120 .if n \{\
121 .RE
122 .\}
123 .sp
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 .PP
169 Whenever the hostname or other metadata is changed via the daemon,
170 \fBPropertyChanged\fR
171 signals are sent out to subscribed clients\&. Changing a hostname using this interface is authenticated via
172 \m[blue]\fBpolkit\fR\m[]\&\s-2\u[1]\d\s+2\&.
173 .SH "SEMANTICS"
174 .PP
175 The
176 \fIStaticHostname\fR
177 property exposes the "static" hostname configured in
178 /etc/hostname\&. It is not always in sync with the current hostname as returned by the
179 \fBgethostname\fR(3)
180 system call\&. If no static hostname is configured this property will be the empty string\&.
181 .PP
182 When
183 \fBsystemd\fR(1)
184 or
185 \fBsystemd-hostnamed.service\fR(8)
186 set the hostname, this static hostname
187 \fIhas the highest priority\fR\&.
188 .PP
189 The
190 \fIHostname\fR
191 property exposes the actual hostname configured in the kernel via
192 \fBsethostname\fR(2)\&. It can be different from the static hostname\&. This property is never empty\&.
193 .PP
194 The
195 \fIPrettyHostname\fR
196 property exposes the
197 \fIpretty hostname\fR
198 which is a free\-form UTF\-8 hostname for presentation to the user\&. User interfaces should ensure that the pretty hostname and the static hostname stay in sync\&. E\&.g\&. when the former is
199 "Lennart\(cqs Computer"
200 the latter should be
201 "lennarts\-computer"\&. If no pretty hostname is set this setting will be the empty string\&. Applications should then find a suitable fallback, such as the dynamic hostname\&.
202 .PP
203 The
204 \fIDefaultHostname\fR
205 property exposes the default hostname (configured through
206 \fBos-release\fR(5), or a fallback set at compilation time)\&.
207 .PP
208 The
209 \fIHostnameSource\fR
210 property exposes the origin of the currently configured hostname\&. One of
211 "static"
212 (set from
213 /etc/hostname),
214 "transient"
215 (a non\-permanent hostname from an external source),
216 "default"
217 (the value from
218 os\-release
219 or the compiled\-in fallback)\&.
220 .PP
221 The
222 \fIIconName\fR
223 property exposes the
224 \fIicon name\fR
225 following the XDG icon naming spec\&. If not set, information such as the chassis type (see below) is used to find a suitable fallback icon name (i\&.e\&.
226 "computer\-laptop"
227 vs\&.
228 "computer\-desktop"
229 is picked based on the chassis information)\&. If no such data is available, the empty string is returned\&. In that case an application should fall back to a replacement icon, for example
230 "computer"\&. If this property is set to the empty string, the automatic fallback name selection is enabled again\&.
231 .PP
232 The
233 \fIChassis\fR
234 property exposes a
235 \fIchassis type\fR, one of the currently defined chassis types:
236 "desktop",
237 "laptop",
238 "server",
239 "tablet",
240 "handset", as well as the special chassis types
241 "vm"
242 and
243 "container"
244 for virtualized systems\&. Note that in most cases the chassis type will be determined automatically from DMI/SMBIOS/ACPI firmware information\&. Writing to this setting is hence useful only to override misdetected chassis types, or to configure the chassis type if it could not be auto\-detected\&. Set this property to the empty string to reenable the automatic detection of the chassis type from firmware information\&.
245 .PP
246 The
247 \fITags\fR
248 property exposes a list of
249 \fImachine tags\fR: short labels that may be used to classify and group machines for management purposes, for example to identify the role a machine plays in a deployment, the fleet or organizational unit it belongs to, or any other administrator\-defined attribute\&. Each individual tag is 1\&...255 characters long and consists only of the ASCII alphanumeric characters,
250 "\-"
251 and
252 "\&."\&. The tags are stored as a colon\-separated list in the
253 \fITAGS=\fR
254 field of
255 /etc/machine\-info, see
256 \fBmachine-info\fR(5)
257 for details\&. If no tags are configured this property is the empty list\&.
258 .PP
259 Note that
260 systemd\-hostnamed
261 starts only on request and terminates after a short idle period\&. This effectively means that
262 \fBPropertyChanged\fR
263 messages are not sent out for changes made directly on the files (as in: administrator edits the files with vi)\&. This is the intended behavior: manual configuration changes should require manual reloading\&.
264 .PP
265 The transient (dynamic) hostname exposed by the
266 \fIHostname\fR
267 property maps directly to the kernel hostname\&. This hostname should be assumed to be highly dynamic, and hence should be watched directly, without depending on
268 \fBPropertyChanged\fR
269 messages from
270 systemd\-hostnamed\&. To accomplish this, open
271 /proc/sys/kernel/hostname
272 and
273 \fBpoll\fR(3)
274 for
275 \fBSIGHUP\fR
276 which is triggered by the kernel every time the hostname changes\&. Again: this is special for the transient (dynamic) hostname, and does not apply to the configured (fixed) hostname\&.
277 .PP
278 Applications may read the hostname data directly if hostname change notifications are not necessary\&. Use
279 \fBgethostname\fR(2),
280 /etc/hostname
281 (possibly with per\-distribution fallbacks), and
282 \fBmachine-info\fR(5)
283 for that\&. For more information on these files and syscalls see the respective man pages\&.
284 .PP
285 \fIKernelName\fR,
286 \fIKernelRelease\fR, and
287 \fIKernelVersion\fR
288 expose the kernel name (e\&.g\&.
289 "Linux"), release (e\&.g\&.
290 "5\&.0\&.0\-11"), and version (i\&.e\&. the build number, e\&.g\&.
291 "#11") as reported by
292 \fBuname\fR(2)\&.
293 .PP
294 \fIOperatingSystemPrettyName\fR,
295 \fIOperatingSystemFancyName\fR,
296 \fIOperatingSystemCPEName\fR, and
297 \fIHomeURL\fR
298 expose the
299 \fIPRETTY_NAME=\fR,
300 \fIFANCY_NAME=\fR,
301 \fICPE_NAME=\fR
302 and
303 \fIHOME_URL=\fR
304 fields from
305 \fBos-release\fR(5)\&. The purpose of those properties is to allow remote clients to access this information over D\-Bus\&. Local clients can access the information directly\&.
306 .PP
307 \fIMachineID\fR
308 expose the 128bit machine ID, see
309 \fBmachine-id\fR(5)
310 for details\&.
311 .PP
312 \fIBootID\fR
313 expose the 128bit boot ID, as per
314 /proc/sys/kernel/random/boot_id\&.
315 .PP
316 \fIVSockCID\fR
317 exposes the system\*(Aqs local
318 \fBAF_VSOCK\fR
319 CID (Context Identifier, i\&.e\&. address) for the system, if one is available in the virtual machine environment\&. Set to
320 \fBUINT32_MAX\fR
321 otherwise\&. See
322 \fBvsock\fR(7)
323 for details\&.
324 .PP
325 \fIOperatingSystemSupportEnd\fR
326 exposes when the OS\*(Aq vendor support ends, if this information is known\&. It\*(Aqs an unsigned 64bit value, in \(mcs since the UNIX epoch, UTC\&. If this information is not known carries the value 2^64\-1, i\&.e\&.
327 \fBUINT64_MAX\fR\&.
328 .PP
329 \fIOperatingSystemImageID\fR
330 and
331 \fIOperatingSystemImageVersion\fR
332 expose the OS image name and version if available, or contain empty strings otherwise\&. This mostly corresponds to the
333 \fIIMAGE_ID=\fR
334 and
335 \fIIMAGE_VERSION=\fR
336 fields of the
337 os\-release
338 file\&.
339 .PP
340 \fIHardwareVendor\fR,
341 \fIHardwareModel\fR,
342 \fIHardwareSKU\fR, and
343 \fIHardwareVersion\fR
344 expose vendor information about the hardware of the system\&. The stock keeping unit (SKU) describes a distinct type of hardware for sale, purchase or inventory management\&. The SKU and version are only available if they deviate from the model and among each other\&. Thereby the version is more specific and only available if it differs from the model and SKU\&. If no such information can be determined these properties are set to empty strings\&.
345 .PP
346 \fIFirmwareVersion\fR
347 and
348 \fIFirmwareVendor\fR
349 expose information about the system\*(Aqs firmware, i\&.e\&. a version string and a vendor name\&. If no such information can be determined these properties are set to empty strings\&.
350 .PP
351 \fIFirmwareDate\fR
352 exposes the firmware build date, if that information is known\&. It\*(Aqs an unsigned 64bit value, in \(mcs since the UNIX epoch, UTC\&. If not known
353 \fBUNIT64_MAX\fR\&.
354 .PP
355 \fIChassisAssetTag\fR
356 exposes an unique identifier of the system chassis\&. If this information is not known this property is set to an empty string\&.
357 .SS "Methods"
358 .PP
359 \fBSetHostname()\fR
360 sets the transient (dynamic) hostname, which is used if no static hostname is set\&. This value must be an internet\-style hostname, 7\-bit lowercase ASCII, no special chars/spaces\&. An empty string will unset the transient hostname\&.
361 .PP
362 \fBSetStaticHostname()\fR
363 sets the static hostname which is exposed by the
364 \fIStaticHostname\fR
365 property\&. When called with an empty argument, the static configuration in
366 /etc/hostname
367 is removed\&. Since the static hostname has the highest priority, calling this function usually affects also the
368 \fIHostname\fR
369 property and the effective hostname configured in the kernel\&.
370 .PP
371 \fBSetPrettyHostname()\fR
372 sets the pretty hostname which is exposed by the
373 \fIPrettyHostname\fR
374 property\&.
375 .PP
376 \fBSetIconName()\fR,
377 \fBSetChassis()\fR,
378 \fBSetDeployment()\fR, and
379 \fBSetLocation()\fR
380 set the properties
381 \fIIconName\fR
382 (the name of the icon representing for the machine),
383 \fIChassis\fR
384 (the machine form factor),
385 \fIDeployment\fR
386 (the system deployment environment), and
387 \fILocation\fR
388 (physical system location), respectively\&.
389 .PP
390 \fBSetTags()\fR
391 sets the machine tags exposed by the
392 \fITags\fR
393 property\&. It takes a list of strings, each of which must be a valid machine tag (1\&...255 ASCII alphanumeric characters,
394 "\-"
395 and
396 "\&.")\&. Passing an empty list removes the
397 \fITAGS=\fR
398 field from
399 /etc/machine\-info\&.
400 .PP
401 \fIPrettyHostname\fR,
402 \fIIconName\fR,
403 \fIChassis\fR,
404 \fIDeployment\fR,
405 \fILocation\fR, and
406 \fITags\fR
407 are stored in
408 /etc/machine\-info\&. See
409 \fBmachine-info\fR(5)
410 for the semantics of those settings\&.
411 .PP
412 \fBGetProductUUID()\fR
413 returns the "product UUID" as exposed by the kernel based on DMI information in
414 /sys/class/dmi/id/product_uuid\&. Reading the file directly requires root privileges, and this method allows access to unprivileged clients through the polkit framework\&.
415 .PP
416 \fBGetHardwareSerial()\fR
417 returns the "hardware serial" as exposed by the kernel based on DMI information\&. Reading the file directly requires root privileges, and this method allows access to unprivileged clients through the polkit framework\&.
418 .PP
419 \fBDescribe()\fR
420 returns a JSON representation of all properties in one\&.
421 .PP
422 \fBGetMachineInfo()\fR
423 returns the value of the given field from
424 /etc/machine\-info\&. For well\-known fields, this method reads values from the same internal cache used by the corresponding D\-Bus property getters, but returns only the raw
425 /etc/machine\-info
426 values (i\&.e\&. without property\-level fallback logic such as DMI/chassis\-based detection)\&. Custom (non\-standard) fields are read directly from the file\&. An error is returned if the field name is empty, invalid, or not set in the file\&.
427 .SS "Security"
428 .PP
429 The
430 \fIinteractive\fR
431 boolean parameters can be used to control whether polkit should interactively ask the user for authentication credentials if required\&.
432 .PP
433 The polkit action for
434 \fBSetHostname()\fR
435 is
436 org\&.freedesktop\&.hostname1\&.set\-hostname\&. For
437 \fBSetStaticHostname()\fR
438 and
439 \fBSetPrettyHostname()\fR
440 it is
441 org\&.freedesktop\&.hostname1\&.set\-static\-hostname\&. For
442 \fBSetIconName()\fR,
443 \fBSetChassis()\fR,
444 \fBSetDeployment()\fR,
445 \fBSetLocation()\fR
446 and
447 \fBSetTags()\fR
448 it is
449 org\&.freedesktop\&.hostname1\&.set\-machine\-info\&.
450 .SH "RECOMMENDATIONS"
451 .PP
452 Here are three examples that show how the pretty hostname and the icon name should be used:
453 .sp
454 .RS 4
455 .ie n \{\
456 \h'-04'\(bu\h'+03'\c
457 .\}
458 .el \{\
459 .sp -1
460 .IP \(bu 2.3
461 .\}
462 When registering DNS\-SD services: use the pretty hostname in the service name, and pass the icon name in the TXT data, if there is an icon name\&. Browsing clients can then show the server icon on each service\&. This is especially useful for WebDAV applications or UPnP media sharing\&.
463 .RE
464 .sp
465 .RS 4
466 .ie n \{\
467 \h'-04'\(bu\h'+03'\c
468 .\}
469 .el \{\
470 .sp -1
471 .IP \(bu 2.3
472 .\}
473 Set the bluetooth name to the pretty hostname\&.
474 .RE
475 .sp
476 .RS 4
477 .ie n \{\
478 \h'-04'\(bu\h'+03'\c
479 .\}
480 .el \{\
481 .sp -1
482 .IP \(bu 2.3
483 .\}
484 When your file browser has a "Computer" icon, replace the name with the pretty hostname if set, and the icon with the icon name, if it is set\&.
485 .RE
486 .PP
487 To properly handle name lookups with changing local hostnames without having to edit
488 /etc/hosts, we recommend using
489 systemd\-hostnamed
490 in combination with
491 \fBnss-myhostname\fR(8)\&.
492 .PP
493 Here are some recommendations to follow when generating a static (internet) hostname from a pretty name:
494 .sp
495 .RS 4
496 .ie n \{\
497 \h'-04'\(bu\h'+03'\c
498 .\}
499 .el \{\
500 .sp -1
501 .IP \(bu 2.3
502 .\}
503 Generate a single DNS label only, not an FQDN\&. That means no dots allowed\&. Strip them, or replace them with
504 "\-"\&.
505 .RE
506 .sp
507 .RS 4
508 .ie n \{\
509 \h'-04'\(bu\h'+03'\c
510 .\}
511 .el \{\
512 .sp -1
513 .IP \(bu 2.3
514 .\}
515 It\*(Aqs probably safer to not use any non\-ASCII chars, even if DNS allows this in some way these days\&. In fact, restrict your charset to
516 "a\-zA\-Z0\-9"
517 and
518 "\-"\&. Strip other chars, or try to replace them in some smart way with chars from this set, for example
519 "ä"
520 →
521 "ae", and use
522 "\-"
523 as the replacement for all punctuation characters and whitespace\&.
524 .RE
525 .sp
526 .RS 4
527 .ie n \{\
528 \h'-04'\(bu\h'+03'\c
529 .\}
530 .el \{\
531 .sp -1
532 .IP \(bu 2.3
533 .\}
534 Try to avoid creating repeated
535 "\-", as well as
536 "\-"
537 as the first or last char\&.
538 .RE
539 .sp
540 .RS 4
541 .ie n \{\
542 \h'-04'\(bu\h'+03'\c
543 .\}
544 .el \{\
545 .sp -1
546 .IP \(bu 2.3
547 .\}
548 Limit the hostname to 63 chars, which is the length of a DNS label\&.
549 .RE
550 .sp
551 .RS 4
552 .ie n \{\
553 \h'-04'\(bu\h'+03'\c
554 .\}
555 .el \{\
556 .sp -1
557 .IP \(bu 2.3
558 .\}
559 If after stripping special chars the empty string is the result, you can pass this as\-is to
560 systemd\-hostnamed
561 in which case it will automatically use a suitable fallback\&.
562 .RE
563 .sp
564 .RS 4
565 .ie n \{\
566 \h'-04'\(bu\h'+03'\c
567 .\}
568 .el \{\
569 .sp -1
570 .IP \(bu 2.3
571 .\}
572 Uppercase characters should be replaced with their lowercase equivalents\&.
573 .RE
574 .PP
575 Note that while
576 systemd\-hostnamed
577 applies some checks to the hostname you pass they are much looser than the recommendations above\&. For example,
578 systemd\-hostnamed
579 will also accept
580 "_"
581 in the hostname, but we recommend not using this to avoid clashes with DNS\-SD service types\&. Also
582 systemd\-hostnamed
583 allows longer hostnames, but because of the DNS label limitations, we recommend not making use of this\&.
584 .PP
585 Here are a couple of example conversions:
586 .sp
587 .RS 4
588 .ie n \{\
589 \h'-04'\(bu\h'+03'\c
590 .\}
591 .el \{\
592 .sp -1
593 .IP \(bu 2.3
594 .\}
595 "Lennart\*(Aqs PC"
596 →
597 "lennarts\-pc"
598 .RE
599 .sp
600 .RS 4
601 .ie n \{\
602 \h'-04'\(bu\h'+03'\c
603 .\}
604 .el \{\
605 .sp -1
606 .IP \(bu 2.3
607 .\}
608 "Müllers Computer"
609 →
610 "muellers\-computer"
611 .RE
612 .sp
613 .RS 4
614 .ie n \{\
615 \h'-04'\(bu\h'+03'\c
616 .\}
617 .el \{\
618 .sp -1
619 .IP \(bu 2.3
620 .\}
621 "Voran!"
622 →
623 "voran"
624 .RE
625 .sp
626 .RS 4
627 .ie n \{\
628 \h'-04'\(bu\h'+03'\c
629 .\}
630 .el \{\
631 .sp -1
632 .IP \(bu 2.3
633 .\}
634 "Es war einmal ein Männlein"
635 →
636 "es\-war\-einmal\-ein\-maennlein"
637 .RE
638 .sp
639 .RS 4
640 .ie n \{\
641 \h'-04'\(bu\h'+03'\c
642 .\}
643 .el \{\
644 .sp -1
645 .IP \(bu 2.3
646 .\}
647 "Jawoll\&. Ist doch wahr!"
648 →
649 "jawoll\-ist\-doch\-wahr"
650 .RE
651 .sp
652 .RS 4
653 .ie n \{\
654 \h'-04'\(bu\h'+03'\c
655 .\}
656 .el \{\
657 .sp -1
658 .IP \(bu 2.3
659 .\}
660 "レナート"
661 →
662 "localhost"
663 .RE
664 .sp
665 .RS 4
666 .ie n \{\
667 \h'-04'\(bu\h'+03'\c
668 .\}
669 .el \{\
670 .sp -1
671 .IP \(bu 2.3
672 .\}
673 "\&.\&.\&.zack!!! zack!\&.\&.\&."
674 →
675 "zack\-zack"
676 .RE
677 .PP
678 Of course, an already valid internet hostname label you enter and pass through this conversion should stay unmodified, so that users have direct control of it, if they want \(em by simply ignoring the fact that the pretty hostname is pretty and just edit it as if it was the normal internet name\&.
679 .SH "EXAMPLES"
680 .PP
681 \fBExample\ \&1.\ \&Introspect org\&.freedesktop\&.hostname1 on the bus\fR
682 .sp
683 .if n \{\
684 .RS 4
685 .\}
686 .nf
687 $ gdbus introspect \-\-system \e
688 \-\-dest org\&.freedesktop\&.hostname1 \e
689 \-\-object\-path /org/freedesktop/hostname1
690 .fi
691 .if n \{\
692 .RE
693 .\}
694 .SH "VERSIONING"
695 .PP
696 These D\-Bus interfaces follow
697 \m[blue]\fBthe usual interface versioning guidelines\fR\m[]\&\s-2\u[2]\d\s+2\&.
698 .SH "HISTORY"
699 .SS "The D\-Bus API"
700 .PP
701 \fIFirmwareVersion\fR
702 and
703 \fBGetHardwareSerial()\fR
704 were added in version 251\&.
705 .PP
706 \fIOperatingSystemSupportEnd\fR,
707 \fIFirmwareVendor\fR, and
708 \fIFirmwareDate\fR
709 were added in version 253\&.
710 .PP
711 \fIMachineID\fR,
712 \fIBootID\fR
713 and
714 \fIVSockCID\fR
715 were added in version 256\&.
716 .PP
717 \fIChassisAssetTag\fR,
718 \fIOperatingSystemImageID\fR,
719 \fIOperatingSystemImageVersion\fR,
720 \fIHardwareSKU\fR, and
721 \fIHardwareVersion\fR
722 were added in version 258\&.
723 .PP
724 \fIOperatingSystemFancyName\fR
725 was added in version 260\&.
726 .PP
727 \fBGetMachineInfo()\fR,
728 \fITags\fR
729 and
730 \fBSetTags()\fR
731 were added in version 261\&.
732 .SH "SEE ALSO"
733 .PP
734 \fBsystemd\fR(1), \fBsystemd-hostnamed.service\fR(8), \fBhostnamectl\fR(1), David Zeuthen\*(Aqs original Fedora \m[blue]\fBFeature page about xdg\-hostname\fR\m[]\&\s-2\u[3]\d\s+2
735 .SH "NOTES"
736 .IP " 1." 4
737 polkit
738 .RS 4
739 \%https://www.freedesktop.org/software/polkit/docs/latest/
740 .RE
741 .IP " 2." 4
742 the usual interface versioning guidelines
743 .RS 4
744 \%https://0pointer.de/blog/projects/versioning-dbus.html
745 .RE
746 .IP " 3." 4
747 Feature page about xdg-hostname
748 .RS 4
749 \%https://fedoraproject.org/wiki/Features/BetterHostname
750 .RE