Merge branch 'lrn/binary-tests' into 'master'
[glib.git] / docs / reference / gio / gsettings.xml
blobd7dc65db6360c8bb7509477e2fa62a899088f3e3
1 <refentry id="gsettings-tool" lang="en">
3 <refentryinfo>
4   <title>gsettings</title>
5   <productname>GIO</productname>
6   <authorgroup>
7     <author>
8       <contrib>Developer</contrib>
9       <firstname>Ryan</firstname>
10       <surname>Lortie</surname>
11     </author>
12   </authorgroup>
13 </refentryinfo>
15 <refmeta>
16   <refentrytitle>gsettings</refentrytitle>
17   <manvolnum>1</manvolnum>
18   <refmiscinfo class="manual">User Commands</refmiscinfo>
19 </refmeta>
21 <refnamediv>
22   <refname>gsettings</refname>
23   <refpurpose>GSettings configuration tool</refpurpose>
24 </refnamediv>
26 <refsynopsisdiv>
27   <cmdsynopsis>
28     <command>gsettings</command>
29     <arg choice="plain">get</arg>
30     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
31     <arg choice="plain"><replaceable>KEY</replaceable></arg>
32   </cmdsynopsis>
33   <cmdsynopsis>
34     <command>gsettings</command>
35     <arg choice="plain">monitor</arg>
36     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
37     <arg choice="opt"><replaceable>KEY</replaceable></arg>
38   </cmdsynopsis>
39   <cmdsynopsis>
40     <command>gsettings</command>
41     <arg choice="plain">writable</arg>
42     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
43     <arg choice="plain"><replaceable>KEY</replaceable></arg>
44   </cmdsynopsis>
45   <cmdsynopsis>
46     <command>gsettings</command>
47     <arg choice="plain">range</arg>
48     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
49     <arg choice="plain"><replaceable>KEY</replaceable></arg>
50   </cmdsynopsis>
51   <cmdsynopsis>
52     <command>gsettings</command>
53     <arg choice="plain">describe</arg>
54     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
55     <arg choice="plain"><replaceable>KEY</replaceable></arg>
56   </cmdsynopsis>
57   <cmdsynopsis>
58     <command>gsettings</command>
59     <arg choice="plain">set</arg>
60     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
61     <arg choice="plain"><replaceable>KEY</replaceable></arg>
62     <arg choice="plain"><replaceable>VALUE</replaceable></arg>
63   </cmdsynopsis>
64   <cmdsynopsis>
65     <command>gsettings</command>
66     <arg choice="plain">reset</arg>
67     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
68     <arg choice="plain"><replaceable>KEY</replaceable></arg>
69   </cmdsynopsis>
70   <cmdsynopsis>
71     <command>gsettings</command>
72     <arg choice="plain">reset-recursively</arg>
73     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
74   </cmdsynopsis>
75   <cmdsynopsis>
76     <command>gsettings</command>
77     <arg choice="plain">list-schemas</arg>
78     <arg choice="opt">--print-paths</arg>
79   </cmdsynopsis>
80   <cmdsynopsis>
81     <command>gsettings</command>
82     <arg choice="plain">list-relocatable-schemas</arg>
83   </cmdsynopsis>
84   <cmdsynopsis>
85     <command>gsettings</command>
86     <arg choice="plain">list-keys</arg>
87     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
88   </cmdsynopsis>
89   <cmdsynopsis>
90     <command>gsettings</command>
91     <arg choice="plain">list-children</arg>
92     <arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
93   </cmdsynopsis>
94   <cmdsynopsis>
95     <command>gsettings</command>
96     <arg choice="plain">list-recursively</arg>
97     <arg choice="opt"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
98   </cmdsynopsis>
99   <cmdsynopsis>
100     <command>gsettings</command>
101     <arg choice="plain">help</arg>
102     <arg choice="opt"><replaceable>COMMAND</replaceable></arg>
103   </cmdsynopsis>
104 </refsynopsisdiv>
106 <refsect1><title>Description</title>
107 <para><command>gsettings</command> offers a simple commandline
108 interface to <link linkend="GSettings"><type>GSettings</type></link>.
109 It lets you get, set or monitor an individual key for changes.
110 </para>
111 <para>
112 The <replaceable>SCHEMA</replaceable> and <replaceable>KEY</replaceable>
113 arguments are required for most commands to specify the schema id and the
114 name of the key to operate on. The schema id may optionally have a
115 :<replaceable>PATH</replaceable> suffix. Specifying the path is only needed
116 if the schema does not have a fixed path.
117 </para>
118 <para>
119 When setting a key, you also need specify a <replaceable>VALUE</replaceable>
120 The format for the value is that of a serialized
121 <link linkend="GVariant"><type>GVariant</type></link>,
122 so e.g. a string
123 must include explicit quotes: "'foo'". This format is also used when printing
124 out values.
125 </para>
126 <para>
127 Note that gsettings needs a D-Bus session bus connection to write changes to
128 the dconf database.
129 </para>
130 </refsect1>
132 <refsect1><title>Commands</title>
133 <variablelist>
135 <varlistentry>
136 <term><option>get</option></term>
137 <listitem><para>
138 Gets the value of <replaceable>KEY</replaceable>.
139 The value is printed out as a serialised
140 <link linkend="GVariant"><type>GVariant</type></link>.
141 </para></listitem>
142 </varlistentry>
144 <varlistentry>
145 <term><option>monitor</option></term>
146 <listitem><para>
147 Monitors <replaceable>KEY</replaceable> for changes and prints the changed
148 values. If no <replaceable>KEY</replaceable> is specified, all keys in the
149 schema are monitored. Monitoring will continue until the process is terminated.
150 </para></listitem>
151 </varlistentry>
153 <varlistentry>
154 <term><option>writable</option></term>
155 <listitem><para>
156 Finds out whether <replaceable>KEY</replaceable> is writable.
157 </para></listitem>
158 </varlistentry>
160 <varlistentry>
161 <term><option>range</option></term>
162 <listitem><para>
163 Queries the range of valid values for <replaceable>KEY</replaceable>.
164 </para></listitem>
165 </varlistentry>
167 <varlistentry>
168 <term><option>describe</option></term>
169 <listitem><para>
170 Queries the description of valid values for <replaceable>KEY</replaceable>.
171 </para></listitem>
172 </varlistentry>
174 <varlistentry>
175 <term><option>set</option></term>
176 <listitem><para>
177 Sets the value of <replaceable>KEY</replaceable> to
178 <replaceable>VALUE</replaceable>. The value is specified as a serialised
179 <link linkend="GVariant"><type>GVariant</type></link>.
180 </para></listitem>
181 </varlistentry>
183 <varlistentry>
184 <term><option>reset</option></term>
185 <listitem><para>
186 Resets <replaceable>KEY</replaceable> to its default value.
187 </para></listitem>
188 </varlistentry>
190 <varlistentry>
191 <term><option>reset-recursively</option></term>
192 <listitem><para>
193 Reset all keys under the given <replaceable>SCHEMA</replaceable>.
194 </para></listitem>
195 </varlistentry>
197 <varlistentry>
198 <term><option>list-schemas</option></term>
199 <listitem><para>
200 Lists the installed, non-relocatable schemas.
201 See <option>list-relocatable-schemas</option> if you are interested in
202 relocatable schemas. If <optional><option>--print-paths</option></optional>
203 is given, the path where each schema is mapped is also printed.
204 </para></listitem>
205 </varlistentry>
207 <varlistentry>
208 <term><option>list-relocatable-schemas</option></term>
209 <listitem><para>
210 Lists the installed, relocatable schemas.
211 See <option>list-schemas</option> if you are interested in
212 non-relocatable schemas.
213 </para></listitem>
214 </varlistentry>
216 <varlistentry>
217 <term><option>list-keys</option></term>
218 <listitem><para>
219 Lists the keys in <replaceable>SCHEMA</replaceable>.
220 </para></listitem>
221 </varlistentry>
223 <varlistentry>
224 <term><option>list-children</option></term>
225 <listitem><para>
226 Lists the children of <replaceable>SCHEMA</replaceable>.
227 </para></listitem>
228 </varlistentry>
230 <varlistentry>
231 <term><option>list-recursively</option></term>
232 <listitem><para>
233 Lists keys and values, recursively. If no <replaceable>SCHEMA</replaceable>
234 is given, list keys in all schemas.
235 </para></listitem>
236 </varlistentry>
238 <varlistentry>
239 <term><option>help</option></term>
240 <listitem><para>
241 Prints help and exits.
242 </para></listitem>
243 </varlistentry>
245 </variablelist>
247 </refsect1>
248 </refentry>