Sharing from OSX

From WikiDLXTV
Revision as of 04:59, 1 August 2014 by Netdada (Talk | contribs) (1. Create the exports file)

Jump to: navigation, search

The following has been tested under Mac OSX 10.5.x (Leopard). It might apply as well under OSX 10.6.x (Snow Leopard).

On previous OSX versions you might have to use NetInfoManager (though setup might be troublesome).

1. Create the exports file

  • (a) With "NFS Enabler" (easiest)

Can be found at http://files.firecore.com/NFS/NFS-Enabler.zip.

Install the Pref Pane, launch and drag&drop forders to be shared onto it. In the options of each share it is recommended to add the option "-ro" to set read-only access. Apply changes.

  • (b) With TextEdit

Open a new document and type

/Users/yourusername/sharedfolder -ro -mapall=nobody -network 192.168.1 -mask 255.255.255.0

What the above line tells is: I am sharing the directory /Users/yourusername/sharedfolder (the directory "sharedfolder" has to be created in Finder beforehand and populated with the files you want to share). The directory is read only. The directory is shared to any machine on the internal network under 192.168.1 (check if 192.168.1.x is the actual IP of the internally distributed network with Airport Utility or any other utility of your router).

More lines pointing to different shared folders can be filled in.

Save the file with the name "exports" without extension (or, once saved, take off the .txt in finder).

Move this file into /etc of the Mac's startup drive (this folder is hidden, so you need to use some third party app to make the invisible folders temporarily visible).

  • (c) With Terminal (Alternative method - a little more cumbersome)

Open Terminal and enter

sudo vi /etc/exports

Once in vi, enter insert mode hitting

I 

Enter

/Users/yourusername/sharedfolder -ro -mapall=nobody -network 192.168.1 -mask 255.255.255.0

Exit insert mode hitting

ESC 

Enter

:wq!

to exit vi and write the file.

2. Enable NFS sharing

---The following should be only needed if you created the shares with methods (b) or (c)---

Enter

sudo nfsd enable 

Restart the Mac

3. To check the setup

Open Terminal app

Enter

sudo nfsd checkexports 

(if a password is requested enter your login password) No output should be given. This confirms everything is fine.

Enter

showmount -e

The output should be approximately

Exports list on localhost:
/Users/yourusername/sharedfolder192.168.1.0

4. Setup the net.mounts file for the WDLXTV/WDLXTVLive

Edit the net.mounts file on your custom homebrew startup drive adding the line

xmount 192.168.1.xxx:/Users/yourusername/sharedfolder nameofshareonwdtv nfs

(where the IP-xxx-part must be completed to mirror your Mac's complete IP on the local network)

The net.mounts file can be (as always) also placed in /conf/ for it to be executed also at startup of the WDTV.


Performance NOTE: If your NFS server is on a gigabit ethernet connection, you may experience poor playback due to flow control issues. The WDTV only has a 100megabit ethernet interface. If you are having trouble streaming high bitrate content, try the following configuration for net.mounts

xmount 192.168.1.xxx:/Users/yourusername/sharedfolder nameofshareonwdtv nfs "ro,rsize=32768,wsize=32768,proto=tcp,sync,soft"

5. Reboot the WDTV/WDTVLive

  • Either switch off the WDTV and unplug it about 30s
  • Or in Terminal app enter
reboot