Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to advertise my NFS shares via Avahi so that I can just browse from multiple machines without having to set it all up, especially when guests come over and I want something automagic.

I am aware most clients will need extra packages (Like nfs-common) installed for it to work. The ideal solution will include instructions for clients as well (if any).

share|improve this question
    
This question is best suited for stackoverflow, you would need to developt both a server and client service, the server service would run on the nfs server broadcasting the availability of your "custom nfs" service (using avahai/zeroconf) and providing a list of available nfs exports. The client service would need to identify available "custom nfs" servers, get the shares list and mount them. –  João Pinto Jan 1 '11 at 18:10
    
Wait, it's not possible to just advertise NFS shares with zeroconf and have them seen by the file manager? –  Jorge Castro Jan 2 '11 at 21:52

2 Answers 2

up vote 2 down vote accepted

My answer to question 18933 actually included an answer for NFS shares (although the question did not explicitly mention NFS): Create a service description file (e.g. nfs.service) in /etc/avahi/services with the following content:

<service-group>
  <name replace-wildcards="yes">NFS share on %h</name>
  <service>
    <type>_nfs._tcp</type>
    <port>2049</port>
    <txt-record>path=/path/to/someshare</txt-record>
  </service>
</service-group>

The port 2049 requires you to use the insecure option in the /etc/exports file, though.

Then it should be possible to use your file manager, navigate to "Networks" and access your share. Unfortunately, The GNOME file manager does not provide support for NFS at the moment (Launchpad Bug #29263, thanks to João Pinto for pointing this out) and the NFS support in the KDE file manager is broken (KDE bug #184997) as well…

share|improve this answer
2  
Please note that Nautilus does not discover NFS shares. –  João Pinto Jan 3 '11 at 11:43
    
This is good to know in case someday they fix the bug João is talking about. –  Jorge Castro Jan 3 '11 at 14:18
    
@João: Thanks for pointing this out, I should have followed the link you posted... I updated my answer. –  Marcel Stimberg Jan 3 '11 at 23:12

NFS advertised shares are not handled by gnome-vfs at this time, there is a bug report requesting it: https://bugs.launchpad.net/gnome-vfs/+bug/29263

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.