The configuration and how darktable works Regardless of your own image files, darktable uses a number of files to work: these files are of several types. • We will first distinguish the files that are specific to each user of darktable and those which are common to all users. These are always provided with each new version of darktable. The changes you would make on these will therefore be lost during each update. I will reference them with a U (user), or an S (system) . • We will then distinguish the configuration files that govern the operation of the software, processing files that materialize all the modifications you make on your photos. Indeed, darktable NEVER modifies your image files. All your changes are saved in these processing files. I will reference them by a C (configuration), or a D (development). • Finally, we will distinguish between “text” type files which only need a text editor to be viewed or modified, “binary” type files which require tools specialized to be viewed or modified. I will refer to them by a T (text), or a B (binary). • New features in version 3.0 are marked with the green margin. File location, These files are stored in several places on your machine. A place primarily intended to U files which I will call U folder; a second which contains the cache that I will call folder V; a third that will be used for snapshots and for debug recordings which I will call folder T; a fourth intended for S files that I will call S folder and finally all the folders that contain images you imported. The UVT and S files are located differently depending on the system you are using. These locations are described system by system. Under Linux: U folder: $ HOME / .config / darktable by default. This location can be changed with the option of launch --configdir File V: $ HOME / .cache / darktable by default. This location can be changed with the option of launch --cachedir Folder T: / tmp by default. This location can be changed with the --tmpdir launch option S folder: / usr / share / darktable by default. This location can be changed with the option of launch –datadir The variable $ HOME contains the absolute path (from the root of the system), of the folder user's staff. That is, in general, / home / . This variable is commonly used in scripting and in command line mode. It cannot be used in graphics file managers. I used it in this description because it is a way elegant enough to describe this part of the file path. The .config folder is a hidden folder (a '.' At the beginning of the name). To access it, just type your last name. Here are the ways to visualize it. • in terminal: ls -a • With graphical tools, it depends on the tool. Under Mac OS: U folder: $ HOME / .config / darktable by default. This location can be changed with the option of launch --configdir File V: $ HOME / .cache / darktable by default. This location can be changed with the option of launch --cachedir Folder T: / private / var / folders / h_ / / T by default. This location can be changed with launch option --tmpdir S folder: /Applications/darktable.app/Contents/Resources/share/darktable/darktable.css by default. This location can be changed with the –datadir launch option The variable $ HOME contains the absolute path (from the root of the system), of the folder user's staff. That is, in general, / home / . See above for a more detailed explanation of its use. The .config folder is a hidden folder (a '.' At the beginning of the name). To access it there are several methods depending on whether you are in terminal or with the finder. Several of these methods are described in this thread: https://darktable.fr/forum/showthread.php?tid=1972 Under Windows: U folder: % LOCALAPPDATA% \ darktable by default. This location can be changed with launch option --configdir File V: % LOCALAPPDATA% \ Microsoft \ Windows \ Temporary Internet Files \ darktable by default. This location can be changed with the --cachedir launch option Folder T: % LOCALAPPDATA% \ Temp by default. This location can be changed with the option launch --tempdir S folder: C: \ Program Files \ darktable \ share \ darktable \ by default. This location can be modified with the –datadir launch option The% LOCALAPPDATA% variable corresponds to the path of the configuration files of the applications specific to each user. That is to say in general, C: \ Users \ \ AppData \ Local \. As for Linux and Mac os, I used the visible notation in terminal. So “Users” and “Program Files ”. These names will appear in French form in the file explorer: “Users” and “Programs”. The AppData folder is a hidden folder. To display it go through the explorer options: organize -> folder and search options -> view -> view files, folders and hidden drives. File Description Files in the U folder. Here is the list of files contained in this folder with the description of their role. They are not all must be present on your installation because they are created over time and as needs arise; sometimes even their creation requires manual intervention. The folders are in blue, the files in black. • color - [U] - Folder containing any input and / or output color profiles. This folder does not directly contain profiles. It contains only two folders in and out . The color, color / in and color / out folders are not created automatically when initial configuration of darktable. If you need these files to deposit profiles, you need to create them. ? color / in - [U] - Folder containing the input color profiles. These profile files are in ICC [UDB] format. ? color / out - [U] - Folder containing the output color profiles. These profile files are in ICC [UDB] format. • darktable.css - [UCT] - File containing personal modifications to the appearance of the interface of darktable. This file is deleted from version 3.0 and replaced by the files in the themes folder . • darktablerc - [UCT] - File containing the configuration data of the software itself. Most of the configuration data in this file can be changed via the different tabs of the darktable “preferences” window. There are however some values ??that are very little used or "a little too sensitive" which cannot be manipulated only by modifying this file. • data.db - [UDB] - File which contains the second part of the Database (DB). Contains tags, styles, presets. File in sqlite format. The location of this file can be edited with the –library launch option. Using this option will simultaneously change the location of data.db and library.db. • data.db.lock - [UCB] - Lock file for the second part of the DB. It is created at when it is opened and deleted when it is closed. In rare cases darktable cannot delete this file before stopping. Since it remains, the next launching of darktable will abort since it will consider that the DB is already opened by another software. In this case its deletion will solve the problem. It contains the “Process Id” of the process that opened the BdD. This file follows the data.db file. If the location of data.db has been changed with the –library option, the location of the lock file will be changed also. • data.db-pre- - [UDB] - Installation of a new major version of darktable sometimes (often) requires a modification of the database schema making the DB incompatible with the previous version. Before this modification, a backup is created automatically by copying the data.db file. This file can be deleted if not considering reverting to an earlier version. In the name, corresponds to the number of the current new version of darktable installation. • keyboardrc - [UCT] - File that contains the shortcuts, possibly customized. The shortcuts can all be changed via the “shortcuts” tab of the “preferences” window of darktable. • keyboardrc_default - [UST] - File that contains default values ??for shortcuts. This is the only S file that is stored in the U folder. • library.db - [UDB] - File that contains the first part of the database. Contains all development data. File in sqlite format. The location of this file can be modified with the –library launch option. Using this option will modify simultaneously the location of data.db and library.db. • library.db.lock - [UCB] - Lock file for the first part of the DB. See data.db.lock above. If the location of data.db has been changed with the –library option, the location of the lock file will also be. • library.db-pre- - [UDB] - Installation of a new major version of darktable sometimes (often) requires a modification of the database schema making the DB incompatible with the previous version. Before this modification a backup is created automatically by copying the library.db file. This file can be deleted if not considering reverting to an earlier version. In the name, corresponds to the number of the current new version of darktable installation. • lua - [U] - Folder containing any add-on scripts (written in Lua language), those that you imported like the ones you eventually created. Scripts are written in Lua language. To discover Lua, in addition to the lua.org site, you have a chapter in the darktable manual as well as a dedicated reference manual on darktable.org. The lua folder is not created automatically during the initial darktable setup. Yes you need this folder to drop scripts in, you need to create it. • presets.json - [UCT] - File containing the noise profiles calculated by the user in view to perform tests. This file only exists if you have copied it yourself to this location. he is the result of calculating the noise profile of an enclosure. This file is in json format. • luarc - [UCT] - File which contains the list of scripts to load when launching darktable. There is no tool to modify this file in darktable. It must be changed yourself with a text editor, respecting the syntax. It must be written in Lua language. See examples in the available Lua reference manual as well as the general manual on the darktable.org site • styles - [U] - Folder containing the styles files [UDT] you have created. The deleting one of your styles in darktable does not delete the file in that directory. These are xml files, but the content, although in text format, is more of a BLOB not editable. The extension of these files is “.dtstyle”. The styles folder is not created automatically during the initial darktable configuration. It is created by darktable when you create a first style in this configuration. It is not necessary to drop the styles you import. • themes - [S] - Folder containing any custom configuration files of the look of the darktable interface. These files are in Cascading Style Sheet format (CSS) as described by the W3C. However not all CSS features are supported by the Gtk GUI used by darktable. If you need this folder to deposit your own style sheets, you must create it. ? .css - [UCT] - CSS file (s). The naming is free, but it is recommended to use a different filename than the style files provided by default (see below the themes folder in the paragraph 'Files in the S folder'). Yes you complete or modify one of these files, do not copy it in full. Create your file, start it with an import statement as described in the standard CSS, then just add your changes. • watermarks - [U] - Folder containing watermark files [UDT]. These files must be in SVG format. They can be created with any tool capable of producing this type of file format. The watermarks folder is not created automatically when initial configuration of darktable. If you need this folder to deposit watermark files, you need to create it. Among these files, two files constitute the DB; what elsewhere is called the catalog. These two files in sqlite format are: • library.db which contains all development data. In fact, all that we found in individual .xmp. • data.db: which contains everything else, tags, styles, presets. The database was split in two to be able to regenerate the database from XMP files without losing keywords, styles and presets. As you can see, most of these files contain data that is clean. And, while most of them can be put together easily, it is certainly easier to have a backup at all. So saving the complete file is not a bad idea. Especially since these files only represent a very small amount of information. The essential in volume these are the two files of the BdD. From reading the above, you can imagine that a partial or full reset configuration can be done by deleting some or all of the [U] files. Warning however, because there is a link between certain information contained in the database and the thumbnails stored in the [V] folder (see paragraph below). If you delete the DB then you will also need to reset the thumbnail cache, Files in the V. Here is the list of folders and subfolders of folder V, as well as the description of the files they contain • cached_kernels_for_  - [V] - folder containing the darktable compiled on-the-fly versions of openCL kernels (See in section System below, the kernels folder). If you have multiple graphics cards, you will have several such folders, one per graphics card. • mipmaps- .d - [V] - folder containing the cache of thumbnails used in table luminous and in the banner. The mipmapsId is a hashcode calculated during initialization of a darktable instance. This folder itself contains several subfolders named from 0 [V] to 7 [V]. when used for the first time, only folders 0 , 1 and 2 are created. The other folders will be created on demand and transparently by darktable or explicitly when using the darktable-generate-cache tool. Each folder corresponds to a thumbnail size; of the smallest size in folder 01, to the largest in folder 7 . The thumbnails themselves are JPEGs files which are named according to the number of Photo. This number is created during import, completely automatically and designates unambiguously the photo in the database of darktable. It is visible in the module image information, at line number.1110, 225 and 450 pixels on the longest side for folders 0, 1 and 2 Warning! If you reset darktable's database, you will also need to reset the hides thumbnails, because as said above, these are named with the number of the Photo. After resetting the database, it will therefore be certain that the numbers of the old thumbnails will no longer match the numbers of new imported photos. The light table display will be very strange! Files in the T. Here is the description of the files it can contain. • dt_snapshot_ .png - [UDB] - PNG file, which contains the status of a photo in during development and displays snapshots in the darkroom. The number is used to differentiate the different snapshots. It does not match the battery history. By default, it starts at three and decreases to zero. It is therefore not possible to have more than four snapshots simultaneously. If you create a fifth, the older will be lost. When you exit darktable, these files are not deleted; they remain in the [T] folder. Unlike the thumbnail cache folder (see above in the description of the folder V), which is composed of the name mipmaps and a hashcode, no element of the names of snapshot files do not allow one of these files to be associated with an instance of darktable. There is therefore a risk of conflict, if the occurrences belong to two different users. • darktable_bt_ .txt - [UDT] - Debug file. This file can be produced by darktable in case of a crash. It may be useful for developers to identify the part of the code causing the crash. In this case, however, it will be necessary to reproduce the crash with a version of darktable compiled so that "symbols" are included in this file. The number is variable each time darktable is launched (probably the process number, but I could not verify it because I don't have any crashes ;-)). Files in the S. Here is the list of files in this folder with the description of their content. • darktable.css - [SCT] - Darktable interface appearance configuration file. This file is deleted from version 3.0 and replaced by an equivalent file in the themes folder . • darktablerc - [SCT] - File containing the configuration data of the software itself. This is the default file that is copied when starting a new one for the first time. darktable instance. • gdb_commands - [SCT] - file containing some commands used during a launch darktable via gdb for debugging purposes. • kernels - [S] - Folder containing the OpenCL support codes of the corresponding modules [SCT] (“c” language) • latex - [S] - Folder containing a configuration file used during the export under form of “LaTex book model” [SDT] (LaTex language) • lua - [S] - Folder containing a file used for debugging Lua scripts [SCT] (language Lua) • luarc - [SCT] - Initial file of Lua. • noiseprofiles.json - [SCT] - File containing all noise profiles known to darktable File in json format. • pixmaps - [S] - Folder containing the icons used internally by dartable [SCB]. • pswp - [S] - Folder containing the files needed for the export as a “Web gallery” [SDT]. See also the style folder • rawspeed - [S] - Folder containing Rawspeed configuration files. Rawspeed is darktable's underlying library which decodes raw files. This folder contains two files: ? cameras.xml - [SDT] - This XML file describes all cameras supported by rawspeed and therefore by darktable. It contains its own DTD. Each entry describes all the characteristics of the housing sensor. ? showcameras.xsl - [SCT] - This second file is the style sheet needed for print the cameras.xml file, if necessary, • style - [S] - Folder containing the style files, necessary for the export under form of “web gallery” [SDT]. See also the pswp folder. • themes - [S] - Folder containing the configuration files of the interface aspect of darktable. These files are in Cascading Style Sheet (CSS) format as described by the W3C. However, not all CSS features are supported by the interface Gtk chart used by darktable. This folder contains the following files. ? darktable.css - [SCT] - Original stylesheet for darktable. ? darktable-elegant-dark.css - [SCT] - New dark style sheet. ? darktable-elegant-darker.css - [SCT] - New, darker stylesheet. ? darktable-elegant-grey.css - [TBS] - New clear stylesheet. ? darktable-icons-dark.css - [SCT] - New dark style sheet with icons. ? darktable-icons-darker.css - [SCT] - New, darker stylesheet with icons. ? darktable-icons-gray.css - [SCT] - New, clear style sheet with icons. • tools - [S] - contains some darktable administration utility programs. Currently these are bash scripts. Here is the list: ? common.sh ? purge_from_cache.sh ? purge_non_existing_images.sh ? purge_unused_tags.sh Warning! my available in Windows version. • watermarks - [S] - Folder containing the few watermark files provided by default with darktable [SDT]. These files are in SVG format (xml base). Here is the list: ? darktable.svg - [SDT] ? hasselblad.svg - [SDT] ? promo.svg - [SDT] ? simple-text.svg - [SDT] You can copy these files to use them as a working basis, and create your own watermarks. You may have noticed that I did not mention the objective characterization files. There is several reasons for this: • These files do not belong to darktable. They depend on a third-party library: Lensfun. • Since they belong to Lensfun, they are provided by this library; not by darktable. • darktable uses several different versions of Lensfun, depending on the distribution and / or packages. • The location of the files depends on the version of Lensfun, but sometimes also on the distribution. • The header of Lensfun files changes slightly depending on the version. In short, all this makes a lot of variables and it would probably take such a large document than this one to make an exhaustive inventory of all the hypotheses. This subject has already been treated abundantly on the forum, without some simple rules being established. So for I am not talking about it right now. Files in your photo folders In addition to all these configuration or operating files, darktable produces files XMP that are associated with every image file you imported into darktable. These files are named by adding the extension “.xmp” to the full name of your image files (name + extension). These files contain all the data necessary to be able to reproduce the processing your images, even if you have deleted all of the files, I listed below above. If you have these files, you haven't lost anything. These [UDT] files are in the format