I am planing to buy RaspberryPi 3 and have it connected to my TV. I also have a lot of movies on Windows partition in my dual boot Ubuntu 14.04 & Win 8 machine (Win 8 isn't used, but is there). I would like to share the movies folder to RaspberryPi over my WiFi, so that I can watch movies on TV without loading the movie file to RaspberryPi.
Can this be done and how?
my favourite method is via SSHFS.
Install openssh server on your Ubuntu machine:
sudo apt-get install openssh-server
Install sshfs on the Raspberry Pi (don't know the package name for the distro you're running), in Ubuntu:
sudo apt-get install sshfs
Connect to your ssh server by mounting a folder:
sshfs username_on_server@server_ip:/location_of/movies_on_Server /mountpoint/on_rasberry_pi
You might have to add your Rasberry Pi user to the fuser group:
sudo useradd -G {group-name} username
to unmount the remote folder:
fusermount -u /mountpoint/on_rasberry_pi
Enjoy.
In addition to the above, you could use samba shares. Instructions are here.
This is definitely supported by KODI (openELEC, Osmc or other), which is what I would install on the raspberry pi, if you want to use it as a media player for the TV, and resembles my setup.
(Though I think kodi also sees NFS)
Here is a summary of the instructions (credit goes to the original author):
Procedures
Install Samba
Set a password for your user in Samba
Note: Samba uses a separate set of passwords than the standard Linux system accounts (stored in /etc/samba/smbpasswd), so you'll need to create a Samba password for yourself. This tutorial implies that you will use your own user and it does not cover situations involving other users passwords, groups, etc...
Tip 1: Use the password for your own user to facilitate.
Tip 2: Remember that your user must have permission to write and edit the folder you want to share.
Tip3: If you're using another user than your own, it needs to exist in your system beforehand, you can create it without a shell access using the following command : sudo useradd USERNAME --shell /bin/false
You can also hide the user on the login screen by adjusting lightdm's configuration, in /etc/lightdm/users.conf add the newly created user to the line :
Create a directory to be shared
Make a safe backup copy of the original smb.conf file to your home folder, in case you make an error
Once "smb.conf" has loaded, add this to the very end of the file:
Tip: There Should be in the spaces between the lines, and also there should be a single space both before and after each of the equal signs.
Restart samba:
Once Samba has restarted, use this command to check your smb.conf for any syntax errors
To access your network share
To access your network share use your username () and password through the path "smb:////" (Linux users) or "\\\" (Windows users). Note that "" value is passed in "[]", in other words, the share name you entered in "/etc/samba/smb.conf".
It can be done with NFS.
This is useful to read about: How do I mount directories from other Linux/Unix/BSD servers? How do I mount an NFS share?
How to setup NFS in Ubuntu: SettingUpNFSHowTo
Ubuntu NFS Server Configuration
Below example shares Public directory (located in pba user home directory) to 10.0.0.1 IP address
Install NFS Server
Make sharing directory and set permissions
Add new share to /etc/exports
rw makes the share read/write, and sync requires the server to only reply to requests once any changes have been flushed to disk. This is the safest option (async is faster, but dangerous. It is strongly recommended that you read man exports.
Export new share
Restart NFS kernel server
Server is now ready.
Raspberry Pi Client Side Configuration
In below example 10.0.0.12 is a NFS server IP address with /home/pba/Public share
Install NFS, portmap and start services
Make mount directory and mount NFS
Seeing results:
Add line to /etc/fstab to make changes permanent
For Windows
I've download FreeNFS for Windows. FreeNFS path set to
C:\Public
.To mount FreeNFS share mount need to be done like this