KDE System Administration/XDG Filesystem Hierarchy: Difference between revisions

From KDE TechBase
No edit summary
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Freedesktop.org and Standard Directories ==
== Freedesktop.org and Standard Directories ==


Line 5: Line 6:
One of these shared specifications is the [http://standards.freedesktop.org/basedir-spec/latest/ base directory specification] which defines a set of locations in the filesystem that can be used for portable desktop technology implementations.
One of these shared specifications is the [http://standards.freedesktop.org/basedir-spec/latest/ base directory specification] which defines a set of locations in the filesystem that can be used for portable desktop technology implementations.


KDE supports the base directory specification and the various [[../Environment_Variables|environment variables]] it prescribes in addition to the [[../KDE_Filesystem_Hierarchy|KDE filesystem hierarchy]]. A summary of KDE's implementation follows below, while the full specification can be read [[http://standards.freedesktop.org/basedir-spec/latest/ here on freedesktop.org]].
KDE supports the base directory specification and the various [[../Environment_Variables|environment variables]] it prescribes in addition to the [[../KDE_Filesystem_Hierarchy|KDE filesystem hierarchy]]. A summary of KDE's implementation follows below, while the full specification can be read [http://standards.freedesktop.org/basedir-spec/latest/ here] on [http://freedesktop.org freedesktop.org].


== Application Data ==
== Application Data ==


Data that applications store which are specific to a given user are to be stored in the <tt>XDG_DATA_HOME</tt> directory. If the <tt>XDG_DATA_HOME</tt> environment variable isn't set, it defaults to {{path|$HOME/.local/share}} for local storage and {{path|/usr/local/share;/usr/share}} for system wide files.
Data that applications store which are specific to a given user are to be stored in the <tt>XDG_DATA_HOME</tt> directory. If the <tt>XDG_DATA_HOME</tt> environment variable isn't set, it defaults to {{path|$HOME/.local/share}} for local storage and {{path|/usr/local/share;/usr/share}} for system-wide files.


Some items that may be stored in <tt>XDG_DATA_HOME</tt> are files the user has put in the trash, mimetype definitions and associations and application .desktop files.
Some items that may be stored in <tt>XDG_DATA_HOME</tt> are files the user has put in the trash, mimetype definitions and associations, and application .desktop files.


The search path for system wide directories can be defined setting the <tt>XDG_DATA_DIRS</tt> environment variable to contain a list of paths.
The search path for system-wide directories can be defined by setting the <tt>XDG_DATA_DIRS</tt> environment variable to contain a list of paths.


== Configuration ==
== Configuration ==


Configuration information should be stored in the <tt>XDG_CONFIG_HOME</tt> directory. If the <tt>XDG_CONFIG_HOME</tt> environment variable isn't set, it defaults to {{path|$HOME/.config}} for local storage and {{path|/etc/xdg}} for system wide files.
Configuration information should be stored in the <tt>XDG_CONFIG_HOME</tt> directory. If the <tt>XDG_CONFIG_HOME</tt> environment variable isn't set, it defaults to {{path|$HOME/.config}} for local storage and {{path|/etc/xdg}} for system-wide files.


Some items that may be stored in <tt>XDG_CONFIG_HOME</tt> are application configuration files and application menu structure.
Some items that may be stored in <tt>XDG_CONFIG_HOME</tt> are application configuration files and application menu structure.


The search path for system wide directories can be defined setting the <tt>XDG_CONFIG_DIRS</tt> environment variable to contain a list of paths.
The search path for system-wide directories can be defined setting the <tt>XDG_CONFIG_DIRS</tt> environment variable to contain a list of paths.


== Cache Files ==
== Cache Files ==


Temporary data caches can be stored in the <tt>XDG_CACHE_HOME</tt> location, which defaults to {{path|$HOME/.cache}}. There is no system wide cache location as such caches are always user specific.
Temporary data caches can be stored in the <tt>XDG_CACHE_HOME</tt> location, which defaults to {{path|$HOME/.cache}}. There is no system-wide cache location, as such caches are always user-specific.


== Thumbnails ==  
== Thumbnails ==  


Thumbnails representing the contents of files for use in icons and other representations of files are to be stored in {{path|$HOME/.thumbnails}}. The structure and content of the thumbnails directory is defined in the [http://jens.triq.net/thumbnail-spec/index.html thumbnail specification].
Thumbnails representing the contents of files for use in icons and other representations of files are to be stored in {{path|$HOME/.thumbnails}}. The structure and content of the thumbnails directory is defined in the [http://jens.triq.net/thumbnail-spec/index.html thumbnail specification].

Revision as of 15:58, 13 July 2012

Freedesktop.org and Standard Directories

Many of the free and open source software projects that focus on desktop technology collaborate on shared specifications and software within the freedesktop.org project.

One of these shared specifications is the base directory specification which defines a set of locations in the filesystem that can be used for portable desktop technology implementations.

KDE supports the base directory specification and the various environment variables it prescribes in addition to the KDE filesystem hierarchy. A summary of KDE's implementation follows below, while the full specification can be read here on freedesktop.org.

Application Data

Data that applications store which are specific to a given user are to be stored in the XDG_DATA_HOME directory. If the XDG_DATA_HOME environment variable isn't set, it defaults to $HOME/.local/share for local storage and /usr/local/share;/usr/share for system-wide files.

Some items that may be stored in XDG_DATA_HOME are files the user has put in the trash, mimetype definitions and associations, and application .desktop files.

The search path for system-wide directories can be defined by setting the XDG_DATA_DIRS environment variable to contain a list of paths.

Configuration

Configuration information should be stored in the XDG_CONFIG_HOME directory. If the XDG_CONFIG_HOME environment variable isn't set, it defaults to $HOME/.config for local storage and /etc/xdg for system-wide files.

Some items that may be stored in XDG_CONFIG_HOME are application configuration files and application menu structure.

The search path for system-wide directories can be defined setting the XDG_CONFIG_DIRS environment variable to contain a list of paths.

Cache Files

Temporary data caches can be stored in the XDG_CACHE_HOME location, which defaults to $HOME/.cache. There is no system-wide cache location, as such caches are always user-specific.

Thumbnails

Thumbnails representing the contents of files for use in icons and other representations of files are to be stored in $HOME/.thumbnails. The structure and content of the thumbnails directory is defined in the thumbnail specification.