Configuration and resource file search
Some of the applications are build using library version 3, other (newer) applications use library version 4.
There are some differences in the search order between the library versions.
The sections below list the directories inspected for a configuration file or resource file by an application myapp from application group myappgroup.
Directories marked in red are subject to package management. Do not modify files in these directories or add files.
Directories marked in blue are places for system-wide setup.
Directories marked in green are places for per-user configuration.
In configuration file search the directories at start of the list have lowest priority. Contents configured here may be overwritten by contents from files found later.
Search in ${datadir} and ${sysconfdir} is for those installing applications on a file server. Typically the ${datadir} is on the same share or file system as the ${bindir}.
The ${sysconfdir} typically is a per-machine directory.
So when installing software on a fileserver placing configuration files in ${datadir} makes them immediately available to all the clients without visiting each client.
Applications processing just one configuration file instead of cumulatively processing all configuration files use reversed search order and process the first file found.
In data file search, the first file found is used.
Configuration file search, DK libraries version 3
- ${datadir}/dk3app
- ${sysconfdir}/dk3app
- ${datadir}/dk3app-site
- ${sysconfdir}/dk3app-site
- ${datadir}/myappgroup
- ${sysconfdir}/myappgroup
- ${datadir}/myappgroup-site
- ${sysconfdir}/myappgroup-site
- ${datadir}/myapp
- ${sysconfdir}/myapp
- ${datadir}/myapp-site
- ${sysconfdir}/myapp-site
- ${HOME}/.dk3app
- ${HOME}/.dk3app/myappgr
- ${HOME}/.dk3app/myapp
- . (the current directory)
Configuration file search, DK libraries version 4
- ${datadir}/dk4app
- ${sysconfdir}/dk4app
- ${datadir}/dk4app-site
- ${sysconfdir}/dk4app-site
- ${datadir}/myappgroup
- ${sysconfdir}/myappgroup
- ${datadir}/myappgroup-site
- ${sysconfdir}/myappgroup-site
- ${datadir}/myapp
- ${sysconfdir}/myapp
- ${datadir}/myapp-site
- ${sysconfdir}/myapp-site
- ${HOME}/.dk4app
- ${HOME}/.dk4app/myappgr
- ${HOME}/.dk4app/myapp
- . (the current directory)
Resource file search, DK libraries version 3
- ${datadir}/myapp/language/region
- ${datadir}/myappgroup/language/region
- ${datadir}/dk3app/language/region
- ${datadir}/language/region
- ${datadir}/myapp/language
- ${datadir}/myappgroup/language
- ${datadir}/dk3app/language
- ${datadir}/language
- ${datadir}/myapp
- ${datadir}/myappgroup
- ${datadir}/dk3app
- ${datadir}
Resource file search, DK libraries version 4
- current directory
- ${HOME}/.dk4app/myapp
- ${HOME}/.dk4app/myappgroup
- ${HOME}/.dk4app
- ${datadir}/myapp-site/language/region
- ${datadir}/myapp/language/region
- ${datadir}/myappgroup-site/language/region
- ${datadir}/myappgroup/language/region
- ${datadir}/dk4app-site/language/region
- ${datadir}/dk4app/language/region
- ${datadir}/myapp-site/region
- ${datadir}/myapp/region
- ${datadir}/myappgroup-site/region
- ${datadir}/myappgroup/region
- ${datadir}/dk4app-site/region
- ${datadir}/dk4app/region
- ${datadir}/myapp-site/language
- ${datadir}/myapp/language
- ${datadir}/myappgroup-site/language
- ${datadir}/myappgroup/language
- ${datadir}/dk4app-site/language
- ${datadir}/dk4app/language
- ${datadir}/myapp-site
- ${datadir}/myapp
- ${datadir}/myappgroup-site
- ${datadir}/myappgroup
- ${datadir}/dk4app-site
- ${datadir}/dk4app