<page xmlns="http://projectmallard.org/1.0/"
      type="topic" style="task"
      id="lockdown">
  <info>
    <revision version="0.1" date="2012-05-21" status="draft"/>
    <link type="guide" xref="index" group="user" />
    <link type="seealso" xref="dconf-profiles" />

    <credit type="author copyright">
      <name>Ryan Lortie</name>
      <email>desrt@desrt.ca</email>
      <years>2012</years>
    </credit>

    <desc>Use dconf's <em>lockdown</em> to prevent users changing specific
     settings</desc>
   </info>

  <title>Lock down specific settings</title>

  <p>Use dconf's <em>lockdown</em> to prevent users changing specific settings.
   Lockdown is supported by creating a <file>locks</file> subdirectory in the
   keyfile directory (ie: <file>/etc/dconf/db/local.d/locks</file>). The files
   contained in this directory contain a list of keys to lock, one per line.
   Just as with the <link xref="dconf-profiles">keyfiles</link>, you may add any
   number of files to this directory. Here's an example of what one might look
   like:</p>

<list type="numbered">
  <title>How to lock the default wallpaper</title>
  <item><p>First, <link type="seealso" xref="dconf-profiles">set a default wallpaper</link></p></item>
<item><p>Create a directory named /etc/dconf/db/local.d/locks</p></item>
<item><p>Edit <file>/etc/dconf/db/local.d/locks/00_default-wallpaper</file></p>
<code>
# prevent changes to the company wallpaper
/org/gnome/desktop/background/picture-uri
/org/gnome/desktop/background/picture-options
/org/gnome/desktop/background/primary-color
/org/gnome/desktop/background/secondary-color
</code>
</item>
<item>
<p>Update the system databases</p>
<screen> <output style="prompt"># </output> <input>dconf update</input> </screen>
</item>
</list>

  <note>
    <p>As of dconf 0.7.4, lockdown is only supported on a per-key basis for
     performance reasons; you may not yet lock entire subpaths. There are plans
     to address this in future releases.</p>
  </note>

</page>
