How to fix not working trash on bind mounts in Ubuntu 19.04? (and hide them in Nautilus)
I've got two machines running same Ubuntu 18.10. On both of them I have several bind mounts in /etc/fstab
as shown below:
# file system mount point type options dump pass
/mnt/hdd/folder /home/user/data none bind,x-gvfs-hide 0 0
After I upgraded one of these machines to 19.04 I got two following errors:
-
I cannot move files from bind mounts to trash (neither using Nautilus GUI, nor via
gio trash
):$ gio trash file.txt gio: file:///home/user/data/file.txt: Trashing on system internal mounts is not supported
- In Nautilus, the last item from
fstab
isn't hidden and displays as a mounted partition
How do I fix that? Or where do I submit a bugreport? Or is there a workaround? (Several months have been passed since 19.04 released after all.) Especially non-working trash is annoying.
Solution 1:
I realize some time has passed since your post, but the issue remains on Ubuntu 19.10, so this answer might still be informative to some.
- For your first problem, it has been discussed a bit more thoroughly there: https://unix.stackexchange.com/questions/115757/unable-to-delete-files-to-trash-in-a-bind-mounted-filesystem/115811 . In a nutshell, there is no current solution, at least for GUI experience. But one of the answers suggests that you can use the
trash
command from the command-line packagetrash-cli
and that it works fine with bind mounts (However not an ideal solution for a desktop computer, I suppose).
On a side note, I personally also have the issue on my computer with Ubuntu (and also previously on Fedora, if I recall correctly), but I don't seem to encounter this problem on Manjaro (using Deepin DE at least, I haven't tried on another desktop environment and don't know if it could be related to it). I guess it would be interesting to investigate how those two different systems handle the trash to spot where the problem is on Ubuntu (and other distros having the same issue).
- As for your second problem, I have to admit that I don't understand what is not working, since you are already using the option
x-gvfs-hide
. In my case, the only difference I can spot is that I also have thedefaults
option. So it would give the following with your example:
# file system mount point type options dump pass
/mnt/hdd/folder /home/user/data none defaults,bind,x-gvfs-hide 0 0