Saturday 23 April 2011

How to access CIFS shares from a user account on Ubuntu Lucid

A friend of mine has a Samba server which I set up for him. His problem was that although he could see the shares from the file browser using Connect to Server, they were not accessible from Thunderbird for attaching to emails, etc. and he had to do a copy to a local directory first.


I did a search and found tips involving setting up fstab. This was not satisfactory because the machine was a notebook and the server would not be accessible while on the road. Tips involving autofs and automount were also not satisfactory because of the complicated setup.


I figured that since the file browser could see the share, it must be mounted somewhere. The output of mount showed that it was mounted on $HOME/.gvfs. The problem is that theThunderbird file selector does not display dotfiles. Other programs may have a similar restriction. My solution was this:


ln -s .gvfs GVFS


I then instructed him to look for his share under GVFS. Actually Thunderbird can navigate to dotfiles, you have to click on the Type a file name icon at the top left and type in .gvfs, but I figured that this was much easier for the user.


If you make a bookmark in the file browser and also tell it to remember the credentials for the connection, it should be one-click to mount. I think this should work for the other types of mounts that the file browser can do, e.g. FTP.

No comments:

Post a Comment