DT doesn't find the trash-folder

Hello,
when I try to delete an image, Darktable reports that it cannot move the image to the trash because it does not exist or cannot be created.
My trash is under /home/…/.local/share/Trash. Darktable searches or tries to find the trash on the mounted hard disk ( /mnt/1AE…) where the image folder is located.
Can I set this somewhere, or what does it depend on where Darktable searches for the trash?
Greetings
Thomas

Hi, is it a distro package or flatpack install?

Each partition has its own trash for each user (".Trash" at /mount/point/.Trash-UUID). So if you try to trash an image file from your image folder on a mounted hd, this is the correct place.

Hi,
@manu
I have installed DT from the package source ppa:ubuntuhandbook1. In the application management of Linux Mint 22.1 unfortunately only DT 4.6 is included, with the flatpack installation I had various problems.

@pehar: Thank’s for the tip. I created the folder /mnt/1AE…/.Trash-1000, but with no Success. The same message comes. I take the UUID “1000”, because she was printed in the error-message. Is this correct?.
Greetings
Thomas

Did you create the required subfolders as well? Trash management - ArchWiki

I have read the article, but do not understand where I have to create further directories.

I you can create and delete any kind of file (say file.txt) on the volume where the photos are stored, then this is a dt problem, otherwise…

As far as I know Mint 22 is based on Ubuntu 24.04, so you could install the latest version of dt following what’s explained here (for Ubuntu 24.04).

I forgot to mention that it is an internal hard disk that is automatically mounted during the boot process.
Yes, I can create, change and delete files anywhere on the drive.

Thanks for the link, I had actually just found it in the course of the thread. The installation from there tells me that I already have the latest version.

OK. Maybe you did not removed the ppa:ubuntuhandbook1 after you followed these commands:

echo 'deb http://download.opensuse.org/repositories/graphics:/darktable/xUbuntu_24.04/ /' | sudo tee /etc/apt/sources.list.d/graphics:darktable.list
curl -fsSL https://download.opensuse.org/repositories/graphics:darktable/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/graphics_darktable.gpg > /dev/null
sudo apt update
sudo apt full-upgrade

(just replaced install with full-upgrade as last command)

Because, the latest version of dt is 5.0.1, not 4.6.

Now, if you can create/delete a file on this volume, it’s quite surprising dt does not, provided you run dt with the same user (uid,gid)…

Is it the same when you run dt from the terminal?

Give a try to:

darktable -d all 

And see what is in the terminal when you try to delete a photo…

OK, I uninstalled DT, deleted the additional package source, updated the ppa store and reinstalled DT as described.
Behavior when deleting is still the same. DT also behaves in the same way when starting DT via the terminal.
I didn’t notice anything in the protocol in a hurry, I’ll have to look at it again

I have looked at the log lines after confirming that I want to delete until I confirm the trash message with Cancel, but I can’t find anything conspicuous. I have to admit, though, that I don’t know exactly what to look for. In any case, I don’t see any error messages, nor can I find the name of the mounted hard disk. I only see a lot of SQL statements

ext4 ?

As subdirectories of your trash directory on this drive

BTW : I never had to create a trash manually, this has been managed automatically by the OS resp. formatting tool.

Darktable searches or tries to find the trash on the mounted hard disk ( /mnt/1AE…) where the image folder is located.

Do you mind posting the result of the following command in a terminal:

df -T /mnt/1AE…

replacing 1AE… with the full name of the directory beginning with 1AE?

@pehar: NTFS. I had forgotten to tell the full story. First of all, I installed Linux as an additional operating system alongside Win10 in DualBoot and use the hard disks there that I also use under W10. Only when everything works or when W10 is discontinued will I remove W10.

@manu :
Dateisystem Typ 1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf
/dev/sdd2 fuseblk 1953382928 1337499104 615883824 69% /mnt/1AE8448FE8446B59

If converting the hard drive to an Ext4 will help, then I can go for it, in the long run I was planning to do it anyway. Backing up and restoring the data will of course take time, but I wanted to do it at some point anyway.

If you’re not using this drive under W10 anymore, then reformatting it to ext4 will help. Otherwise, ext4 is not supported by windows (as far as I know,).

When you mention “that it is an internal hard disk that is automatically mounted during the boot process”, you mean it’s an automount?
Is there any line containing /dev/sdd2 in the /etc/fstab file ?

If not, I’d say you could find somewhere on the web what you could add in this file (via sudo), something like:

/dev/sdd2  /mnt/1AE8448FE8446B59  ntfs  defaults,uid=1000,gid=1000  0  0

Provided your user has uid 1000 (user id) and gid 1000 (group id) which you can easily find with commands:

id -u ; id -g

This might be the cause of your problem. Your OS (Linux) should create the .Trash Directory when a file is deleted, even on an NTFS drive, but you (and darktable) need appropriate permissions. I have no idea how this works (or not) with an NTFS formatted drive, I dropped my last Windows installation more than 10 years ago.
Since then I have been using Linux exclusively, all drives / partitions ext4 formatted. Never had any problems with the trash. Only occasionally use an NTFS formatted USB stick to transfer data to a Windows user, but have never used the trash on such a stick.

I am convinced formatting as ext4 would solve the issue.

Thanks for all the advice. I am now backing up my data to an external hard disk and then changing the drive accordingly.

1 Like