Removing gvfsd-smb-browse

Solution 1:

I was having the same issue after upgrading to 16.04. What I did was change the permissions on gvfsd-smb-browse so that it can only be executed as sudo or by root. Now gvfsd-smb-browse doesn't run on startup. Below is how you can change the permissions.

sudo chmod 744 /usr/lib/gvfs/gvfsd-smb-browse

Not sure if it is a real solution to the underlying problem. But it does resolve the cpu usage issue by not running gvfsd-smb-browse on startup.

Solution 2:

Well, The upstream package didn't set up a configuration file or folder. I think these folders are more suitable to be somewhere in /etc

/usr/share/gvfs/mounts/
/usr/share/gvfs/remote-volume-monitors/

Or have at least an override there. Anyway let's make one.

sudo mkdir -p /etc/gvfs/enabled
sudo cp -ar /usr/share/gvfs/mounts /etc/gvfs/enabled
sudo cp -ar /usr/share/gvfs/remote-volume-monitors /etc/gvfs/enabled

echo 'export GVFS_MONITOR_DIR="/etc/gvfs/enabled/remote-volume-monitors/"' | sudo tee /etc/profile.d/gvfs.sh
echo 'export GVFS_MOUNTABLE_DIR="/etc/gvfs/enabled/mounts/"' | sudo tee -a /etc/profile.d/gvfs.sh
sudo chmod +x /etc/profile.d/gvfs.sh

Now, you have full control:

  • Disable: remove/rename back-ends & monitors definition files from /etc/gvfs/enabled/mounts/ & /etc/gvfs/enabled/remote-volume-monitors/ respectively.
  • Enable: copy back from origin or rename back (.mount & .monitor extension)

I have tested these instructions in Ubuntu 20.10, only with monitors for quick test (ps ax | grep -i gvfs).

Reference:

  • https://wiki.gnome.org/Projects/gvfs/doc