Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xdg-user-dirs-update(1) [centos man page]

XDG-USER-DIRS-UPD(1)						   User Commands					      XDG-USER-DIRS-UPD(1)

NAME
xdg-user-dirs-update - Update XDG user dir configuration SYNOPSIS
xdg-user-dirs-update [OPTION...] [--set NAME PATH...] DESCRIPTION
xdg-user-dirs-update updates the current state of the users user-dirs.dir. 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: ~/Desktop, ~/Templates and ~/Public. 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. On the first run a user-dirs.locale file is created containing the locale that was used for the translation. This is used later by gui tools like xdg-user-dirs-gtk-update to detect if the locale was changed, letting you to migrate from the old names. xdg-user-dirs-update is normally run automatically at the start of a user session to update the XDG user dirs according to the users locale. OPTIONS
The following options are understood: --help Print help output and exit. --force Update existing user-dirs.dir, 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 user-dirs.locale. --dummy-output PATH Write the configuration to PATH instead of the default configuration file. Also, no directories are created. --set NAME PATH Sets the XDG user dir with the given name. NAME should be one of the following: DESKTOP DOWNLOAD TEMPLATES PUBLICSHARE DOCUMENTS MUSIC PICTURES VIDEOS PATH must be an absolute path, e.g. $HOME/Some/Directory. FILES
The XDG user dirs configuration is stored in the user-dirs.dir file in the location pointed to by the XDG_CONFIG_HOME environment variable. ENVIRONMENT
The XDG_CONFIG_HOME environment variable determines where the user-dirs.dirs file is located. SEE ALSO
xdg-user-dir(1), user-dirs.dirs(5), user-dirs.defaults(5), user-dirs.conf(5). XDG
XDG-USER-DIRS-UPD(1)

Check Out this Related Man Page

xdg-user-dirs-update(1) 					   User Commands					   xdg-user-dirs-update(1)

NAME
xdg-user-dirs-update - Create and configure default desktop user directories. SYNOPSIS
xdg-user-dirs-update [--force] [--dummy-output path] [--set DIR path] DESCRIPTION
xdg-user-dirs-update is used to create the default desktop user directories such as : Desktop Download Templates Public Documents Music Pictures Videos In general this is run at user login to an XDG compatible desktop such as GNOME or KDE. The directories are created using the user's locale - and this information is then stored in the ${HOME}/.config/user-dirs.dirs file such that if the user then changes the locale they log in as, the directories will still be referenced correctly, but will remain in the original locale unless you run the xdg-user-dirs-update com- mand with the --force option. The default names used to create these directories are configured in the system configuration file /etc/xdg/user-dirs.defaults. Other configuration is stored in the file /etc/xdg/user-dirs.conf. In this file you can disable this functionality system-wide and define what encoding is used in the creation of the directories. By default this is UTF-8 since this is the main encoding used in the desktops. Continuous monitoring is done by the file manager - nautilus in GNOME - and if these directories are renamed or removed nautilus will update the user's configuration file to reflect this change. OPTIONS
--force Force an update of the directories to the current locale. --dummy-output path Simulate the creation of the user configuration file and write to the specified path. --set DIR path Update the user's configuration changing the DIR to point to the specified path. Valid desktop directories (DIR) are: DESKTOP DOWNLOAD TEMPLATES PUBLICSHARE DOCUMENTS MUSIC PICTURES VIDEOS FILES
The following files are used by this application: /usr/bin/xdg-user-dirs-update XDG User Directory management utility. /etc/xdg/user-dirs.conf Used to configure the operation of xdg-user-dirs-update. Can be used to totally disable the the creation of these directories and also to define what locale encoding should be used by default - by default this is UTF-8 which is the preferred encoding used by the GNOME Virtual File System layer. /etc/xdg/user-dirs.defaults Used to configure the default locations that xdg-user-dirs-update will create/manage relative to the user's ${HOME}. ${HOME}/.config/user-dirs.dirs Location of the user-specific configuration including the current list of directories and what they map to. ${HOME}/.config/user-dirs.locale Contains the name of the locale (excluding encoding) that was used to create the initial set of directories. EXAMPLES
Example 1: Determine what may happen if you force an update. % xdg-user-dirs-update --force --dummy-output /tmp/dummy.out Moving DOWNLOAD directory from Downloads to Download Also will write output like the following to /tmp/dummy.out: # This file is written by xdg-user-dirs-update # If you want to change or add directories, just edit the line you're # interested in. All local changes will be retained on the next run # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an # absolute path. No other format is supported. # XDG_DESKTOP_DIR="$HOME/Desktop" XDG_DOWNLOAD_DIR="$HOME/Download" XDG_TEMPLATES_DIR="$HOME/Templates" XDG_PUBLICSHARE_DIR="$HOME/Public" XDG_DOCUMENTS_DIR="$HOME/Documents" XDG_MUSIC_DIR="$HOME/Music" XDG_PICTURES_DIR="$HOME/Pictures" XDG_VIDEOS_DIR="$HOME/Videos" Example 2: Change location of my pictures. % xdg-user-dirs-update --set PICTURES /home/user/Documents/MyPictures Modifies the ${HOME}/.config/user-dirs.dirs file to have the line: ... XDG_PICTURES_DIR="$HOME/Documents/MyPictures" ... ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWxdg-user-dirs | +-----------------------------+-----------------------------+ |Interface stability |Uncommitted | +-----------------------------+-----------------------------+ SEE ALSO
More information can be found at: http://www.freedesktop.org/wiki/Software/xdg-user-dirs xdg-user-dirs-gtk-update(1), xdg-user-dir(1), attributes(5) NOTES
Written by Darren Kenny, Sun Microsystems Inc, 2008 SunOS 5.11 03 Apr 2008 xdg-user-dirs-update(1)
Man Page