~ubuntu-branches/ubuntu/saucy/gnome-user-docs/saucy-proposed

« back to all changes in this revision

Viewing changes to system-admin-guide/C/dconf-profiles.page

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-11-15 14:44:43 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20121115144443-znsud5byjojjhvc4
Tags: 3.6.2-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<page xmlns="http://projectmallard.org/1.0/"
 
2
      type="topic" style="task"
 
3
      id="dconf-profiles">
 
4
  <info>
 
5
    <revision pkgversion="3.6" version="0.1" date="2012-05-21" status="draft"/>
 
6
    <link type="guide" xref="index" group="user" />
 
7
    <link type="seealso" xref="backgrounds-extra" />
 
8
 
 
9
    <credit type="author copyright">
 
10
      <name>Ryan Lortie</name>
 
11
      <email>desrt@desrt.ca</email>
 
12
      <years>2012</years>
 
13
    </credit>
 
14
 
 
15
    <credit type="author copyright">
 
16
      <name>Jeremy Bicha</name>
 
17
      <email>jbicha@ubuntu.com</email>
 
18
      <years>2012</years>
 
19
    </credit>
 
20
 
 
21
    <credit type="author copyright">
 
22
      <name>Jim Campbell</name>
 
23
      <email>jwcampbell@gmail.com</email>
 
24
      <years>2012</years>
 
25
    </credit>
 
26
 
 
27
    <desc>Set system-wide default values using dconf's key file directories</desc>
 
28
  </info>
 
29
 
 
30
  <title>Custom default values for system settings</title>
 
31
 
 
32
  <p>System-wide default values can be set using dconf's <em>key file
 
33
   directories</em>. Key files contain <em>groups</em> and <em>key-value pairs
 
34
   </em>.</p>
 
35
 
 
36
  <p>To demonstrate how dconf key files can be used to set default values,
 
37
  we'll look at how to use them to set a default wallpaper.</p>
 
38
 
 
39
<comment><p>You don't have to use "local" as the profile name. You can even have
 
40
different profiles for different users. This isn't mentioned because this
 
41
functionality needs something like accountsservice integration to enforce this.
 
42
gnome-control-center integration would be great too.</p></comment>
 
43
 
 
44
<example>
 
45
<list type="numbered">
 
46
  <title>Set the default wallpaper</title>
 
47
  <item><p>Create a directory named <file>/etc/dconf/profile/</file></p></item>
 
48
  <item><p>From within the <file>profile</file> directory, create and edit a
 
49
  file named <file>user</file>.</p>
 
50
<code>
 
51
user-db:user
 
52
system-db:local
 
53
</code></item>
 
54
 
 
55
  <item><p>Navigate to the <file>/etc/dconf/db/local.d/</file> directory. If
 
56
  this directory doesn't exist, you will need to create it.</p>
 
57
  </item>
 
58
  <item><p>In the <file>local.d</file> directory, create and edit a
 
59
  key file named <file>00_default-wallpaper</file>.</p>
 
60
<code>
 
61
#this portion of the key file identifies the dconf group
 
62
[org/gnome/desktop/background]
 
63
#these are the individual key-value pairs that are relevant to the key file group
 
64
picture-uri='file:///usr/local/share/backgrounds/company-wallpaper.jpg'
 
65
picture-options='scaled'
 
66
primary-color='000000'
 
67
secondary-color='000000'
 
68
</code>
 
69
</item>
 
70
<item>
 
71
<p>Update the system databases</p>
 
72
<screen> <output style="prompt"># </output> <input>dconf update</input> </screen>
 
73
</item>
 
74
</list>
 
75
</example>
 
76
 
 
77
  <note>
 
78
    <p>The first time you create a dconf user profile, you'll need to log out
 
79
    and log in to apply the new profile.</p>
 
80
  </note>
 
81
 
 
82
 
 
83
<note>
 
84
  <p>
 
85
    You can include multiple sets of groups and key-value pairs in each key file,
 
86
    or you can use a separate key file for each group.
 
87
  </p>
 
88
</note>
 
89
 
 
90
</page>