Various specifications specify files and file formats. This specification defines where these files should be looked for by defining one or more base directories relative to which files should be located. There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable $XDG_DATA_HOME. There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable $XDG_CONFIG_HOME. There is a single base directory relative to which user-specific state data should be written. This directory is defined by the environment variable $XDG_STATE_HOME. There is a single base directory relative to which user-specific executable files may be written. There is a set of preference ordered base directories relative to which data files should be searched. This set of directories is defined by the environment variable $XDG_DATA_DIRS.

Features

  • User-specific executable files may be stored in $HOME/.local/bin
  • The lifetime of the directory MUST be bound to the user being logged in
  • The directory MUST be on a local file system and not shared with any other system
  • A user-specific version of the configuration file may be created in $XDG_CONFIG_HOME/subdir/filename
  • Default configuration files should be installed to $sysconfdir/xdg/subdir/filename with $sysconfdir defaulting to /etc.
  • Various specifications specify files and file formats

Project Samples

Project Activity

See All Activity >

Categories

Authentication

License

MIT License

Follow XDG Base Directory

XDG Base Directory Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of XDG Base Directory!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Authentication Software

Registered

2021-08-31