GNOME Bugzilla – Bug 349622
No Trash support for FUSE mounted volumes
Last modified: 2008-01-11 20:29:09 UTC
Please describe the problem: The is no trash support in fuse mounted volumes. We use FUSE to mount home directories, and gnome-vfs does not know about fuse. Steps to reproduce: 1. drag file to trash can from fuse mounted volume Actual results: Files are moved to the .Trash folder on the volume but trash can appears empty Expected results: Trash appears full and allows users to empty it. Does this happen every time? yes Other information: I have already written a patch for the problem, the fuse filesystem needs to be added to gnome-vfs-filesystem-type.c
Created attachment 70055 [details] [review] Patch to add fuse filesystem type
It has been over a month and this is still unconfirmed?
there is lot of bug for the number of people working on them, it can take some time. Better to send your patch on the gnome-vfs mailing list to get it reviewed. Bumping the settings will just annoy people
Created attachment 86561 [details] [review] update, list new item to gnome_vfs_volume_get_filesystem_type
Commited, thanks.
The fix is not complete and doesn't always work on kernel 2.6.20 and up. Depending on the kernel version and other issues, the file system type (fstype) can be: fuse, fuseblk, fuse.<userfs> and fuseblk.<userfs>, where <userfs> is FUSE file system type, e.g. ntfs-3g. The <userfs> sub part of the fstype should stay in the future but it's not available yet in stable Linux kernels, only in Linus' development tree. This FUSE feature was added recently to help the identification of the user space fstype by e.g. mount helpers and make its detection independent of FUSE's internal evolution, e.g. the introduction of the new, additional fuseblk FUSE fstype which was required for safe block devices support. Kernel 2.6.20 introduced fuseblk which is very widely used for example by ntfs-3g with all block devices (internal, external disks) and kernel 2.6.21 will introduce {fuse,fuseblk}.subfstype.
I'm trying to make FUSE network file systems more attractive for desktop users: http://www.scheinwelt.at/~norbertf/devel/fusi/ I don't think .Trash should be created/used on such mounts. But how to tell the difference between local FUSE mounts (like ntfs-3g) and remote FUSE mounts? Should, perhaps, fusermount create a kind of label in the mount options (fusetype=NETWORK). Another problem is that nautilus should not try to render preview thumbnails on such (slow) remote filesystems...
Created attachment 90912 [details] [review] patch which tries to turn off preview-icon rendering and .Trash for FUSE network mounts.... turning off the preview rendering seems to work due to changes in do_is_local (file-method.c), but unfortunately ".Trash-user" still gets created. Don't know why. Nautilus 2.1.16 seems to ignore gnome_vfs_volume_handles_trash () - although the function is called for the FUSE mounts during the launching of nautilus...
Wjhen I submitted this bug, we were using FUSE for home directory mounts. Trash was required for full gnome functionality. But disallowing .Trash aren't you effectively saying that FUSE cannot be used for home directories in a gnome environment?
(In reply to comment #9) > Wjhen I submitted this bug, we were using FUSE for home directory mounts. Trash > was required for full gnome functionality. But disallowing .Trash aren't you > effectively saying that FUSE cannot be used for home directories in a gnome > environment? > I agree - that's difficult because there are different use-cases for FUSE. In my "libfusi" case, which is an approach to GUI managed network-transparency (similar to KIO/Gnome-VFS, but cross-desktop), ".Trash" should never be created, and mounts have to be considered as slow (no previews). In your case you need the complete opposite. I don't really know how to solve this problem... We need a way to attach hints when mounting, which tell file-managers how to deal with a mount... * There could be hints in in the mount-options "/etc/mtab", but i have no idea if that's possible. * via getxattr() from the root of the mount? * or a file in ~/.config/fuse/mounts/ ... Any ideas?
There needs to be something, but not in mtab, we don't gnome-vfs issues in mtab. This is a fuse and gnome-vfs issue. Actually I am not even sure if it is a fuse issue, as it could conceivable be an issue of r other use cases of any filesystem, samba comes to mind immediately. I think gnome-vfs may need options which set trash option independantly of filesystem. Perhaps it is something for gconf?
(In reply to comment #11) > There needs to be something, but not in mtab, we don't gnome-vfs issues in > mtab. This is a fuse and gnome-vfs issue. > > Actually I am not even sure if it is a fuse issue, as it could conceivable be > an issue of r other use cases of any filesystem, samba comes to mind > immediately. > > I think gnome-vfs may need options which set trash option independantly of > filesystem. Perhaps it is something for gconf? > I think that's a x-desktop issue. The mountpoint related information (is_slow=true|false and use_trash=true|false) should be readable by all file-managers/file-management libraries (also Konqueror/KIO). Sometimes it's also a cross-user issue, because fuse mounts can be made accessible to other users (-o allow_other)... That's why i thought that mtab would be a good place to expose such file-management "hints". One way we can already put such information into mtab is the "-o fsname=" FUSE option. For instance: sshfs xxxx@server.org: /tmp/mnt -o fsname=HELLO#use_trash=true ... will create the following mtab entry: HELLO#use_trash=true on /tmp/mnt type fuse (rw,nosuid,nodev,max_read=65536,user=xxxx) Another option would be to create a little ini-style file somewhere (but where?)...
I am running Gnome 2.20.1 on Ubuntu 7.10. This is still not working. I don't see why this is still marked RESOLVED/FIXED. Possible duplicates: http://bugzilla.gnome.org/show_bug.cgi?id=372999 http://bugzilla.gnome.org/show_bug.cgi?id=436563 Launchpad: https://bugs.launchpad.net/ubuntu/+source/gnome-vfs2/+bug/181890