Snapshots fails for second user on Linux

Hi all,

Darktable 3.6 on Manjaro - When switching users on the same machine, snapshots work great for the first user that open darktable but not for the second user even if the first user closes darktable. Second user can create a snapshot but will not be able to see it. Clicking on the snapshot has not effect.

Did anyone else notice this behaviour before? If so any known solution?

I can confirm this behaviour when using 2 (or more) out-of-the-box darktable instances.

The reason being: darktable uses /tmp (on linux) to store its snapshot, it also uses the same snapshot name to do this (example: dt_snapshot_3.png). So, if you have multiple users, you end up overwriting the snapshot from user1 with the one from user2 when both are active.

On linux you can set the TMPDIR variable, which points to the temporary directory you want to use. darktable does look for and obeys this variable. So adding the following to your user environment will negate the problem:

export TMPDIR="/data/General/Tmp/Jd.Darktable"

The actual directory example is mine. It must exist though. If you only have 2 users that might be using darktable at the same time you only need to do this for one of them.

EDIT: Just to make sure: Setting TMPDIR will do this for all temporary related things for that specific user, not just darktable!

If you want/need to do this for darktable only you need to create a script/function to do this. This is a function I use to start darktable:

[stasis] jade ~ $ type dtd
dtd is a function
dtd () 
    export TMPDIR="/data/General/Tmp/Jd.Darktable";
    export LC_ALL="en_GB.UTF-8";
    umask 022;
    /home/jade/.local/dt.dvlp/bin/darktable --configdir /home/jade/.config/dt.dvlp/ --cachedir /home/jade/.cache/dt.dvlp/ "$@";
    umask 027;
    unset LC_ALL TMPDIR;
    echo -e "\nVersion info:\n";
    /home/jade/.local/dt.dvlp/bin/darktable --version

To start darktable I use/run dtd

I also run multiple dt version from the same user, so there’s bit more going on…

1 Like

Dank je wel Jade! :slight_smile:
Appreciate the detailed answer. :+1: