After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 349622 - No Trash support for FUSE mounted volumes
No Trash support for FUSE mounted volumes
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Volume and drive handling
2.18.x
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-02 05:09 UTC by Rob Garth
Modified: 2008-01-11 20:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Patch to add fuse filesystem type (521 bytes, patch)
2006-08-02 05:09 UTC, Rob Garth
none Details | Review
update, list new item to gnome_vfs_volume_get_filesystem_type (1.34 KB, patch)
2007-04-18 12:38 UTC, Sebastien Bacher
none Details | Review
patch which tries to turn off preview-icon rendering and .Trash for FUSE network mounts.... (6.60 KB, patch)
2007-06-30 02:47 UTC, Norbert Frese
none Details | Review

Description Rob Garth 2006-08-02 05:09:12 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
Comment 1 Rob Garth 2006-08-02 05:09:55 UTC
Created attachment 70055 [details] [review]
Patch to add fuse filesystem type
Comment 2 Rob Garth 2006-09-21 02:57:13 UTC
It has been over a month and this is still unconfirmed?
Comment 3 Sebastien Bacher 2006-09-21 07:45:24 UTC
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
Comment 4 Sebastien Bacher 2007-04-18 12:38:12 UTC
Created attachment 86561 [details] [review]
update, list new item to gnome_vfs_volume_get_filesystem_type
Comment 5 Alexander Larsson 2007-04-23 10:45:44 UTC
Commited, thanks.
Comment 6 Szabolcs Szakacsits 2007-04-24 12:44:19 UTC
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.
Comment 7 Norbert Frese 2007-06-29 21:39:51 UTC
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... 
Comment 8 Norbert Frese 2007-06-30 02:47:42 UTC
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...
Comment 9 Rob Garth 2007-07-01 23:03:05 UTC
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?
Comment 10 Norbert Frese 2007-07-02 22:14:38 UTC
(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? 

Comment 11 Rob Garth 2007-07-09 00:53:00 UTC
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?
Comment 12 Norbert Frese 2007-07-09 10:25:56 UTC
(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?)...



Comment 13 Aiman Baharna 2008-01-11 20:29:09 UTC
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