Difference between revisions of "Sharing from OSX"

From WikiDLXTV
Jump to: navigation, search
(Filled Sharing form OSX)
(Formatting)
Line 5: Line 5:
 
== Setup NFS sharing ==
 
== Setup NFS sharing ==
  
'''1. Create an exports file'''
+
'''1. Create the exports file'''
 
* With TextEdit  
 
* With TextEdit  
 
Open a new document and type  
 
Open a new document and type  
  
"/Users/yourusername/sharedfolder -ro -mapall=nobody -network 192.168.1 -mask 255.255.255.0"
+
/Users/yourusername/sharedfolder -ro -mapall=nobody -network 192.168.1 -mask 255.255.255.0
  
 
What the above line tells is:
 
What the above line tells is:
Line 19: Line 19:
 
with Airport Utility or any other utility of your router).
 
with Airport Utility or any other utility of your router).
  
(More lines pointing to different shared folder can be created)
+
More lines pointing to different shared folders can be filled in.
  
 
Save the file with the name "exports" without extension  
 
Save the file with the name "exports" without extension  
Line 31: Line 31:
 
Open Terminal and enter  
 
Open Terminal and enter  
  
"sudo vi /etc/exports"
+
sudo vi /etc/exports
  
 
Once in vi, enter insert mode hitting
 
Once in vi, enter insert mode hitting
"I"
+
I  
  
 
Enter
 
Enter
  
"/Users/yourusername/sharedfolder -ro -mapall=nobody -network 192.168.1 -mask 255.255.255.0"
+
/Users/yourusername/sharedfolder -ro -mapall=nobody -network 192.168.1 -mask 255.255.255.0
  
 
Exit insert mode hitting
 
Exit insert mode hitting
"ESC"
+
ESC  
  
 
Enter
 
Enter
<nowiki>":wq!"</nowiki>
+
:wq!
 
to exit vi and write the file.
 
to exit vi and write the file.
  
Line 50: Line 50:
  
 
Enter
 
Enter
"sudo nfsd enable"
+
sudo nfsd enable  
  
 
Restart the Mac
 
Restart the Mac
Line 59: Line 59:
  
 
Enter
 
Enter
"sudo nfsd checkexports"
+
sudo nfsd checkexports  
 
(if a password is requested enter your login password)
 
(if a password is requested enter your login password)
 
No output should be given. This confirms everything is fine.
 
No output should be given. This confirms everything is fine.
  
 
Enter
 
Enter
"showmount -e"
+
showmount -e
  
 
The output should be approximately
 
The output should be approximately
"Exports list on localhost:
+
Exports list on localhost:
/Users/yourusername/sharedfolder192.168.1.0"
+
/Users/yourusername/sharedfolder192.168.1.0
  
 
'''4. Setup the net.mounts file for the WDTV/WDTVLive'''
 
'''4. Setup the net.mounts file for the WDTV/WDTVLive'''
Line 74: Line 74:
 
Edit the net.mounts file on your custom homebrew startup drive adding the line
 
Edit the net.mounts file on your custom homebrew startup drive adding the line
  
"xmount 192.168.1.xxx:/Users/yourusername/sharedfolder nameofmountedshare nfs"
+
xmount 192.168.1.xxx:/Users/yourusername/sharedfolder nameofmountedshare nfs
  
(where the IP-part must be the one corresponding to your Mac's IP on the local network)
+
(where the IP-xxx-part must be completed to mirrir your Mac's complete IP on the local network)
  
 
'''5. Reboot the WDTV/WDTVLive'''
 
'''5. Reboot the WDTV/WDTVLive'''
  
* Either switch off the WDTV and unplug it 10s
+
* Either switch off the WDTV and unplug it about 30s
* Or in Terminal app enter "reboot"
+
* Or in Terminal app enter
 +
reboot

Revision as of 03:45, 19 February 2010

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).

Setup NFS sharing

1. Create the exports file

  • 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).

  • 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

Enter

sudo nfsd enable 

Restart the Mac

3. 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 WDTV/WDTVLive

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

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

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

5. Reboot the WDTV/WDTVLive

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