What is gvfs and why should I want it on my system?

34,505

Solution 1

GVFS (GNOME Virtual file system) provides a layer just below the user applications you use like firefox. This layer is called a virtual filesystem and basically presents to firefox, thunderbird and pidgin a common layer that allows them to see local file resource and remote file resource as a single set of resources. Meaning your access to the resource whether on your local machine or the remote machine would be transparent to the user.

Although this layer is mostly there to make it easier for application developers to code to a single set of interfaces and not have to distinguish between local and remote file system and their low-level code.

For the user this could mean that the same file manager you use to browse your local files, could also be used to browse files on a remote server. As a simplified contrast, on Windows I can browse my local files with Explorer, but to browse files on an NFS or SFTP server I would need a separate application.

Solution 2

It's a virtual file system, not a real one, but is made to look real.

I just ran into it myself it shows 170G being used on it. But if I check with du -hc it shows 0G. So in truth there is 170G being used, but on another networked hard drive in my house not on the system I was looking on and with.

This was likely samba mounts that I copied files from or to and it shows the size from the remote location, but find /disk files shows 170G being used. Really some is being used in buffers, but only while using the files. When you drop the samba (or whatever) connection it will all disappear.

Solution 3

When I had completely removed GVFS from my PC then the PCmanFM did not connected via SSH to other servers. So for this reason I had to keep GVFS.

The second reason, my daughter has a Iphone, I am quite unhappy because of it as it uses MTP to transfer documents and photos, so again she uses PCmanFM to connect to it. On the other side she has little RAM on her PC, so the GVFS daemons consume a lot of memory needed.

So I came to this solution: I block the daemons from starting and when I need them a enable them:

systemctl --user stop gvfs* # stop all services with gvfs
sudo kill $(ps -A | grep gvfs | awk '{print $1}') # to be sure GVFS is not running
sudo chmod 0000 /usr/lib/systemd/user/gvfs* # this prevent GVFS from starting
lsof | grep gvfs # but it has many open files anyway...

When I need GVFS again so i run following code and reboot for sure:

sudo chmod 0644 /usr/lib/systemd/user/gvfs* # this enables GVFS again

May be it helps you too. :-)

It would be much better if GVFS could run without daemons - just called on demand, or exit if not needed, wouldn't it?

Share:
34,505

Related videos on Youtube

jippie
Author by

jippie

I'm into: Linux; Networking; IT Security; Perl; System integration; Arduino; ATtiny & ATmega Microcontrollers (AVR); Analog electronics;

Updated on September 18, 2022

Comments

  • jippie
    jippie over 1 year

    What does gvfs do for me on my Kubuntu machine and why is /usr/lib/gvfs/gvfs-gdu-volume-monitor eating so much CPU time?

    BTW: I read https://en.wikipedia.org/wiki/GVFS and still don't know what's in it for me, especially on KDE / Kubuntu.

    lsof shows me that thunderbird, firefox and pidgin have gvfs libraries open, but for what functionality?

    • Admin
      Admin almost 12 years
      Today after work, one of my cores was again at 100% for gvfs-gdu-volume-monitor, having burned 24hrs cpu time in 4 days (which is a lot in my opinion for a process nobody seems to know what it does). So I sudo apt-get purge gvfs gvfs:i386 gvfs-common gvfs-daemons gvfs-libs gvfs-libs'ed it
  • xerostomus
    xerostomus almost 4 years
    GVFS is not much needed when you use PC for common work - transfering files via ssh, ftp or emails. Then you have blocked many MB of RAM by daemons and it is quite hard to get rid of it. It would be better if a user can start gvfs programs on demand and have free memory afterwards. Sometimes GVFS is usefull but not as permanent daemons.
  • Aquarius Power
    Aquarius Power over 2 years
    did you find a way to not have to reboot? I mean, if you can stop it, it can most probably be restarted. I use the trash a lot tho, also on scripts, not sure if I can stop gvfsd-trash
  • xerostomus
    xerostomus over 2 years
    Dear Mr. Power, I am sorry I have removee it completely a couple of month ago. A PC is really faster without useless daemons.