xdg-user-dir(1) User Commands xdg-user-dir(1)NAME
xdg-user-dir - Get the path used for desktop user directory location.
SYNOPSIS
xdg-user-dir DIR
DESCRIPTION
xdg-user-dir is a utility that extracts the location of the specified desktop user directory from the file :
${HOME}/.config/user-dirs.dirs
OPERANDS
Valid desktop directories (DIR) are:
DESKTOP
DOWNLOAD
TEMPLATES
PUBLICSHARE
DOCUMENTS
MUSIC
PICTURES
VIDEOS
If an invalid directory is requested ${HOME} is returned.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables:
HOME.
Other environment variable that are used are:
XDG_CONFIG_HOME
Base directory for storge of XDG configuration files. Defaults to ${HOME}/.config
FILES
The following files are used by this application:
/usr/bin/xdg-user-dir
XDG Directory expansion utility.
${XDG_CONFIG_HOME}/user-dirs.dirs
Location of the user-specific configuration including the current list of directories and what they map to.
EXAMPLES
Example 1: Location of user's documents directory
% xdg-user-dir DOCUMENTS
/home/user/Documents
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-update(1), xdg-user-dirs-gtk-update(1), attributes(5)NOTES
Written by Darren Kenny, Sun Microsystems Inc, 2008
SunOS 5.11 03 Apr 2008 xdg-user-dir(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)