summaryrefslogtreecommitdiffstats
path: root/man/xdg-user-dirs-update.xml
blob: 49d8aa5c07345f468296acc151a072eb3064bafc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="xdg-user-dirs-update">

<refentryinfo>
  <title>xdg-user-dirs-update</title>
  <productname>XDG</productname>
  <authorgroup>
    <author>
      <contrib>Developer</contrib>
      <firstname>Alexander</firstname>
      <surname>Larsson</surname>
      <email>alexl@redhat.com</email>
    </author>
  </authorgroup>
</refentryinfo>

<refmeta>
  <refentrytitle>xdg-user-dirs-update</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>

<refnamediv>
  <refname>xdg-user-dirs-update</refname>
  <refpurpose>Update XDG user dir configuration</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>xdg-user-dirs-update</command> <arg choice="opt" rep="repeat">OPTION</arg> <arg choice="opt" rep="repeat">--set <replaceable>NAME</replaceable> <replaceable>PATH</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1><title>Description</title>
<para><command>xdg-user-dirs-update</command> updates the current
state of the users <filename>user-dirs.dir</filename>. If none existed
before then one is created based on the system default values, or
falling back to the old non-translated filenames if such directories
exists. The list of old directories used are: <filename>~/Desktop</filename>,
<filename>~/Templates</filename> and <filename>~/Public</filename>.
</para>
<para>
If an old configuration exists it is updated with any new default
directories. Additionally, any configured directories that point to
non-existing locations are reset by pointing then to the users home
directory. This typically happens when the users removed the
directory, so they likely don't want to use it anymore.
</para>
<para>
On the first run a <filename>user-dirs.locale</filename> file is
created containing the locale that was used for the translation. This
is used later by GUI tools like
<command>xdg-user-dirs-gtk-update</command> to detect if the locale
was changed, letting you to migrate from the old names.</para>

<para><command>xdg-user-dirs-update</command> is normally run automatically at the start
of a user session to update the XDG user dirs according to the users
locale.</para>
</refsect1>

<refsect1><title>Options</title>
<para>The following options are understood:</para>
<variablelist>
  <varlistentry>
    <term><option>--help</option></term>
    <listitem><para>Print help output and exit.</para></listitem>
  </varlistentry>
  <varlistentry>
    <term><option>--force</option></term>
    <listitem><para>Update existing <filename>user-dirs.dir</filename>, but force a full reset.
    This means: Don't reset nonexisting directories to HOME, rather recreate the directory.
    Never use backwards compatible non-translated names. Always recreate <filename>user-dirs.locale</filename>.
    </para></listitem>
  </varlistentry>
  <varlistentry>
    <term><option>--dummy-output <replaceable>PATH</replaceable></option></term>
    <listitem><para>Write the configuration to <replaceable>PATH</replaceable>
    instead of the default configuration file. Also, no directories are created.</para></listitem>
  </varlistentry>
  <varlistentry>
    <term><option>--set <replaceable>NAME</replaceable> <replaceable>PATH</replaceable></option></term>
    <listitem><para>Sets the XDG user dir with the given name.</para>
    <para><replaceable>NAME</replaceable> should be one of the following:
      <simplelist>
        <member>DESKTOP</member>
        <member>DOWNLOAD</member>
        <member>TEMPLATES</member>
        <member>PUBLICSHARE</member>
        <member>DOCUMENTS</member>
        <member>MUSIC</member>
        <member>PICTURES</member>
        <member>VIDEOS</member>
      </simplelist></para>
   <para><replaceable>PATH</replaceable> must be an absolute path,
   e.g. <filename>$HOME/Some/Directory</filename>.</para></listitem>
   </varlistentry>
   </variablelist>
</refsect1>

<refsect1><title>Files</title>
  <para>The XDG user dirs configuration is stored in the
  <filename>user-dirs.dir</filename> file in the location pointed to
  by the <envar>XDG_CONFIG_HOME</envar> environment variable.</para>
</refsect1>

<refsect1><title>Environment</title>
  <para>The <envar>XDG_CONFIG_HOME</envar> environment variable determines
  where the <filename>user-dirs.dirs</filename> file is located.</para>
</refsect1>

<refsect1><title>See Also</title>
  <para>
    <citerefentry><refentrytitle>xdg-user-dir</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
    <citerefentry><refentrytitle>user-dirs.dirs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
    <citerefentry><refentrytitle>user-dirs.defaults</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
    <citerefentry><refentrytitle>user-dirs.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
  </para>
</refsect1>

</refentry>