When I mount my SMB share via Nautilus, transfer speeds are slow. So I did some digging and found that when I mount the share via CLI and specifically set the protocol-version to 2.0, it's much faster.
Here is the command I use on the CLI:
sudo mount -t cifs -o vers=2.0,username=Lukas,password=xxxx,uid=1000,gid=1000 //nas/video /media/lukas/nas
How can I make Nautilus use Version 2.0 when mounting my share?
- The Nautilus Version is "GNOME nautilus 3.26.3"
- The Gnome Shell Version is "GNOME Shell 3.28.3"
- Ubuntu Version is "18.04.1 LTS"
Best Answer
I have a alternate suggestion if you are interested. Instead of messing about with how the samba client accesses the NAS - which as I said should be unnecessary since it will use SMB2/3 by itself if required - why not just use CIFS automatically?
Add the following line to the end of /etc/fstab:
Note: The server can also be expressed as an mDNS qualified hostname if the server supports it: //nas.local/video Or an ip address: //192.168.0.100/video
How this will work:
noauto = will make it so that it doesn't mount at boot. We are going to set this up to use CIFS on demand when you need it - useful if you have a laptop.
user = will make it so an ordinary user ( non sudo ) can mount the share.
mount point = Since it's under /media it will induce a udisks response:
(1) An icon will appear on the side panel of Nautilus.
(2) It will be "actionable" - click on it and the system will go to fstab to find out how to mount it then mount it - click on it again to unmount the share.
There is a side benefit to this approach. The icon that it will add to Nautilus will also show up in most of your applications - like gedit > Open for example. Then you can mount the share from your application directly.
Note to anyone reading this: The mount point is important here. For the udisks magic to work the mount point has to be under /media or your home directory.