{"id":4299,"date":"2022-12-20T17:48:54","date_gmt":"2022-12-20T20:48:54","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/org-freedesktop-locale1-man5\/"},"modified":"2022-12-20T17:48:54","modified_gmt":"2022-12-20T20:48:54","slug":"org-freedesktop-locale1-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/org-freedesktop-locale1-man5\/","title":{"rendered":"ORG.FREEDESKTOP.LOCALE1 (man5)"},"content":{"rendered":"<h1 align=\"center\">ORG.FREEDESKTOP.LOCALE1<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#INTRODUCTION\">INTRODUCTION<\/a><br \/> <a href=\"#THE D\u2212BUS API\">THE D\u2212BUS API<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#VERSIONING\">VERSIONING<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">org.freedesktop.locale1 \u2212 The D\u2212Bus interface of systemd\u2212localed<\/p>\n<h2>INTRODUCTION <a name=\"INTRODUCTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd-localed.service<\/b>(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\u2212Bus interface.<\/p>\n<h2>THE D\u2212BUS API <a name=\"THE D\u2212BUS API\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The service exposes the following interfaces on the bus:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">node \/org\/freedesktop\/locale1 { <br \/> interface org.freedesktop.locale1 { <br \/> methods: <br \/> SetLocale(in as locale, <br \/> in b interactive); <br \/> SetVConsoleKeyboard(in s keymap, <br \/> in s keymap_toggle, <br \/> in b convert, <br \/> in b interactive); <br \/> SetX11Keyboard(in s layout, <br \/> in s model, <br \/> in s variant, <br \/> in s options, <br \/> in b convert, <br \/> in b interactive); <br \/> properties: <br \/> readonly as Locale = [&#8216;&#8230;&#8217;, &#8230;]; <br \/> readonly s X11Layout = &#8216;&#8230;&#8217;; <br \/> readonly s X11Model = &#8216;&#8230;&#8217;; <br \/> readonly s X11Variant = &#8216;&#8230;&#8217;; <br \/> readonly s X11Options = &#8216;&#8230;&#8217;; <br \/> readonly s VConsoleKeymap = &#8216;&#8230;&#8217;; <br \/> readonly s VConsoleKeymapToggle = &#8216;&#8230;&#8217;; <br \/> }; <br \/> interface org.freedesktop.DBus.Peer { &#8230; }; <br \/> interface org.freedesktop.DBus.Introspectable { &#8230; }; <br \/> interface org.freedesktop.DBus.Properties { &#8230; }; <br \/> };<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Methods<\/b> <br \/> 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.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>SetVConsoleKeyboard()<\/b> method may be used to set the key mapping for the virtual console. Similarly, <b>SetX11Keyboard()<\/b> may be used to set the default key mapping of any X11 servers.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note that <b>SetVConsoleKeyboard()<\/b> instantly applies the new key mapping to the console, while <b>SetX11Keyboard()<\/b> simply sets a default that may be used by later sessions.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The boolean argument <i>convert<\/i> may be set to optionally convert the console keyboard configuration to X11 keyboard mappings and vice versa. If true and <b>SetVConsoleKeyboard()<\/b> is used, the nearest X11 keyboard setting for the chosen console setting is set. If true and <b>SetX11Keyboard()<\/b> 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.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For graphical UIs that need to set the system keyboard mapping simply invoke <b>SetX11Keyboard()<\/b>, set <i>convert=true<\/i> and ignore <b>SetVConsoleKeyboard()<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Use the empty string for the keymap parameters you wish not to set.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>interactive<\/i> boolean parameters can be used to control whether <b><font color=\"#0000FF\">polkit<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">should interactively ask the user for authentication credentials if required.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Signals<\/b> <br \/> Whenever the system locale or keymap is changed via the daemon, <b>PropertyChanged<\/b> signals are sent out to which clients can subscribe.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Properties<\/b> <br \/> The system locale is shown in the <i>Locale<\/i> property. It is an array containing environment\u2212variable\u2212assignment\u2212like strings. The following strings are known: <i>LANG=<\/i>, <i>LC_CTYPE=<\/i>, <i>LC_NUMERIC=<\/i>, <i>LC_TIME=<\/i>, <i>LC_COLLATE=<\/i>, <i>LC_MONETARY=<\/i>, <i>LC_MESSAGES=<\/i>, <i>LC_PAPER=<\/i>, <i>LC_NAME=<\/i>, <i>LC_ADDRESS=<\/i>, <i>LC_TELEPHONE=<\/i>, <i>LC_MEASUREMENT=<\/i>, <i>LC_IDENTIFICATION=<\/i>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>X11Layout<\/i>, <i>X11Model<\/i>, <i>X11Variant<\/i>, and <i>X11Options<\/i> properties show values configurable with <b>SetX11Keyboard()<\/b> described above (or <b>SetVConsoleKeyboard()<\/b> with <i>convert=true<\/i>). The <i>VConsoleKeymap<\/i> and <i>VConsoleKeymapToggle<\/i> properties show values configurable with <b>SetVConsoleKeyboard()<\/b> (or <b>SetX11Keyboard()<\/b> with <i>convert=true<\/i>).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Security<\/b> <br \/> Changing the system locale or keymap using this interface is authenticated via polkit. The polkit action for <b>SetLocale()<\/b> is <b>org.freedesktop.locale1.set\u2212locale<\/b>. The polkit action for <b>SetX11Keyboard()<\/b> and <b>SetVConsoleKeyboard()<\/b> is <b>org.freedesktop.locale1.set\u2212keyboard<\/b>.<\/font><\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Example\u00a01.\u00a0Introspect org.freedesktop.locale1 on the bus<\/b><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">$ gdbus introspect \u2212\u2212system  <br \/> \u2212\u2212dest org.freedesktop.locale1  <br \/> \u2212\u2212object\u2212path \/org\/freedesktop\/locale1<\/font><\/p>\n<h2>VERSIONING <a name=\"VERSIONING\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">These D\u2212Bus interfaces follow<\/font> <b><font color=\"#0000FF\">the usual interface versioning guidelines<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">polkit<\/font><\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/software\/polkit\/docs\/latest\/<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"63%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">the usual interface versioning guidelines<\/font><\/p>\n<\/td>\n<td width=\"20%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">http:\/\/0pointer.de\/blog\/projects\/versioning-dbus.html<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  org.freedesktop.locale1 \u2212 The D\u2212Bus interface of systemd\u2212localed <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1318],"class_list":["post-4299","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-org"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4299"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4299\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}