29 hours ago
I have some music files I'd like to listen to sitting on a Samba share. I added this share via the Ubuntu GUI (Places -> Connect to server...), and everything worked just fine.
However, despite the fact that my music file is playing from this location, after I've not touched the location using the Nautilus GUI, Ubuntu/GNOME decides that I'm not using the share anymore and terminates the connection. Thus, my music stops playing and Rhythmbox is unhappy with me. Simply clicking on the new shortcut the "Connect to server..." bit created for me immediately makes the files come back again and allows me to restart the music playing.
How can I have Ubuntu not automatically dismount samba shares?
35 hours ago
This is the method I have used successfully from 9.10 through 10.10 by mounting the shares with fstab following these steps.
Make sure you have smbfs installed first.
Create new directory(s) to mount the share to in terminal eg sudo mkdir /media/my_share
sudo mkdir /media/my_share
Open fstab in gedit gksudo gedit /etc/fstab also in terminal
gksudo gedit /etc/fstab
Add one line per share example music, films, tv etc
//192.168.1.102/share_name /media/my_share cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
obviously changing the IP address, share_name and my_share to the relevant folders
Lastly create a hidden .smbcredentials file in root and open it in gedit
gksudo gedit /root/.smbcredentials
and add these lines to the new file
if you have no password for the shares then leave them blank and if you have many different share passwords then create multiple credentials files.
you will then need to change the owner of the credentials file
sudo chmod 700 /root/.smbcredentials
once all of this is in place you can test your setup by typing sudo mount -a in the terminal and your shares will be mounted.
sudo mount -a
from now on they will automatically mount when you log in.
34 hours ago
This is a problem with GVFS. See this post for a workaround. Hopefully someone adds a better way to do this.
As an alternative you could use the standard mount-command, which does not have these limitations.
16 hours ago
If you have a server, it may be worth moving it over to a fixed IP... If it's Ubuntu Server look here: How To Geek
(Ignore the line sudo apt-get remove dhcp-client as there's no need for it)
sudo apt-get remove dhcp-client
26 hours ago
Im pretty sure samba times itself out after a time and unmounts. Its a security feature I think (even if you are connecting to a share without a password).