<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Benjamin Sherman &#187; bonjour</title>
	<atom:link href="http://holyarmy.org/tag/bonjour/feed/" rel="self" type="application/rss+xml" />
	<link>http://holyarmy.org</link>
	<description>I have to have a tagline?</description>
	<lastBuildDate>Wed, 02 Jun 2010 06:06:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bonjour Avahi Addendum</title>
		<link>http://holyarmy.org/2008/11/bonjour-avahi-addendum/</link>
		<comments>http://holyarmy.org/2008/11/bonjour-avahi-addendum/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 16:23:53 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[avahi]]></category>
		<category><![CDATA[bonjour]]></category>
		<category><![CDATA[time machine]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://holyarmy.org/?p=325</guid>
		<description><![CDATA[A while back I wrote about advertising Linux services via Avahi/Bonjour. Since then I&#8217;ve made a few changes to my setup.
First, I nixed netatalk for direct AFP support. My primary reason for using it was to gain a more Mac-like network filesystem which would make Time Machine happier. Well, Time Machine uses a sparse bundle [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I wrote about <a href="http://holyarmy.org/2008/01/advertising-linux-services-via-avahibonjour">advertising Linux services via Avahi/Bonjour</a>. Since then I&#8217;ve made a few changes to my setup.</p>
<p>First, I nixed netatalk for direct AFP support. My primary reason for using it was to gain a more Mac-like network filesystem which would make Time Machine happier. Well, Time Machine uses a sparse bundle disk image on it&#8217;s target; after learning about that, using AFP seemed a bit unnecessary. Also, Samba CIFS/SMB seemed to perform better. I don&#8217;t have solid benchmarks for this, but simple file copies seemed to be consistenly faster with Samba. One of the biggest annoyances about netatalk was all the extra hidden files and folders it created. I run a hybrid network, I have more Mac machines, but also Windows, plus I browse file systems on the command line quite often; and those excess files pushed me over the edge.</p>
<p>Second, I nixed Time Machine. Just when I thought everything was working perfectly, it completely blew up and could no longer access its data store. Not good for a backup solution. I plan to write about my new home backup solution sometime, but it&#8217;s basically rsync with a few key points.</p>
<p><span id="more-325"></span></p>
<p>Lastly, I streamlined my Linux avahi config using some pointers <a href="http://www.simonwheatley.co.uk/2008/04/06/avahi-finder-icons/">here</a>, suggested to me by George the commenter on my above linked post.</p>
<p>Previously i had a service config file for each service, but this resulted in my server having multiple entries in the OS X Finder, one host for Samba, one host for AFP (when I had it), and one host for RFB. So, I merged all of those files into one.</p>
<p><strong>multi.service</strong><br />
<code><br />
&lt;?xml version="1.0" standalone='no'?&gt;&lt;!--*-nxml-*--&gt;<br />
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;%h&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_smb._tcp&lt;/type&gt;<br />
&lt;port&gt;139&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_rfb._tcp&lt;/type&gt;<br />
&lt;port&gt;5901&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_device-info._tcp&lt;/type&gt;<br />
&lt;port&gt;0&lt;/port&gt;<br />
&lt;txt-record&gt;model=RackMac&lt;/txt-record&gt;<br />
&lt;/service&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_http._tcp&lt;/type&gt;<br />
&lt;port&gt;80&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_ssh._tcp&lt;/type&gt;<br />
&lt;port&gt;22&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_sftp-ssh._tcp&lt;/type&gt;<br />
&lt;port&gt;22&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;<br />
</code><br />
Now everything that can show up in the OS X finder, shows up on one host entry. Plus thanks to the tip I linked to above, the &#8220;_device-info._tcp&#8221; section sets an icon for the server in OS X Finder.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2008/11/bonjour-avahi-addendum/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Advertising Linux Services via Avahi/Bonjour</title>
		<link>http://holyarmy.org/2008/01/advertising-linux-services-via-avahibonjour/</link>
		<comments>http://holyarmy.org/2008/01/advertising-linux-services-via-avahibonjour/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 22:20:42 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[afp]]></category>
		<category><![CDATA[avahi]]></category>
		<category><![CDATA[bonjour]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[netatalk]]></category>
		<category><![CDATA[os_x]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://sherman.bz/2008/01/27/advertising-linux-services-via-avahibonjour/</guid>
		<description><![CDATA[Update: most of this information is still correct but an update for combining service definitions into one file and setting an icon is available here: http://holyarmy.org/2008/11/bonjour-avahi-addendum
In my last post I outlined how I followed others&#8217; directions to enable netatalk on Linux and Time Machine backups to a shared AFP folder. Originally, I also described how [...]]]></description>
			<content:encoded><![CDATA[<p>Update: most of this information is still correct but an update for combining service definitions into one file and setting an icon is available here: <a href="http://holyarmy.org/2008/11/bonjour-avahi-addendum">http://holyarmy.org/2008/11/bonjour-avahi-addendum</a></p>
<p>In my last post I outlined how I followed others&#8217; directions to enable netatalk on Linux and Time Machine backups to a shared AFP folder. Originally, I also described how to put all your shares on netatalk. I suppose if only have Mac clients or you REALLY want to use AFP, you can do so. As I worked with files over AFP shares, I started noticing that the performance seemed to be quite bad. No, I didn&#8217;t benchmark, but copying large video files to a shared folder over my gigabit network was substantially slower over AFP (netatalk) than over CIFS/SMB (samba). I use my network shares pretty heavily, so this was a concern. Also, netatalk tries very hard to replicate an HFS filesystem complete with resource fork support. This means that your shared directories end up with lots of extra folders named &#8220;.AppleDouble&#8221;(and a few others) containing Mac specific info. (Note: even on CIFS you&#8217;ll get the &#8220;.AppleDB&#8221; folders unless you disable a setting in Finder. I can deal with .AppleDB better than .AppleDouble AND .AppleDB) So, because of these two issues I decided to try using CIFS and samba again.<br />
<span id="more-293"></span><br />
My first experiment was to try sharing a &#8220;time_machine&#8221; folder via CIFS, and using the &#8220;defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1&#8243; hack on the previous post, I was able to get Time Machine to perform a backup. It worked, but in the end I decided that if I need to restore from this backup, I want my resource forks intact. To do that, I need AFP and netatalk. So, I removed all AFP shares except the one for Time Machine backup share. Now my Time Machine would backup and restore happily, and I could again use my Samba shares.</p>
<p>One of the cool things about having used AFP/netatalk was that my server and folders were showing up in my finder window. Well, that&#8217;s not a feature of AFP or netatalk, its actually avahi/Bonjour doing that. So, all I had to do was advertise the services. If you followed my previous posts, you&#8217;ve already created a service for AFP/netatalk on your server; it&#8217;s simple to create more, just add more service files. I&#8217;ll paste in all of my service files here:</p>
<p><strong>/etc/avahi/services/aftp.service/</strong></p>
<p><strong>afpd.service</strong><code><br />
&lt;?xml version="1.0" standalone='no'?&gt;&lt;!--*-nxml-*--&gt;<br />
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;%h AFP&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_afpovertcp._tcp&lt;/type&gt;<br />
&lt;port&gt;548&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;<br />
</code><br />
<strong>apache.service</strong><code><br />
&lt;?xml version="1.0" standalone='no'?&gt;&lt;!--*-nxml-*--&gt;<br />
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;%h HTTP&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_http._tcp&lt;/type&gt;<br />
&lt;port&gt;80&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;<br />
</code><br />
<strong>rfb.service</strong><code><br />
&lt;?xml version="1.0" standalone='no'?&gt;&lt;!--*-nxml-*--&gt;<br />
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;%h VNC&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_rfb._tcp&lt;/type&gt;<br />
&lt;port&gt;5901&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;<br />
</code><br />
<strong>samba.service</strong><code><br />
&lt;?xml version="1.0" standalone='no'?&gt;&lt;!--*-nxml-*--&gt;<br />
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;%h&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_smb._tcp&lt;/type&gt;<br />
&lt;port&gt;139&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;<br />
</code><br />
<strong>sftp.service</strong><code><br />
&lt;?xml version="1.0" standalone='no'?&gt;&lt;!--*-nxml-*--&gt;<br />
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;%h SFTP&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_sftp-ssh._tcp&lt;/type&gt;<br />
&lt;port&gt;22&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;<br />
</code><br />
<strong>ssh.service</strong><code><br />
&lt;?xml version="1.0" standalone='no'?&gt;&lt;!--*-nxml-*--&gt;<br />
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;%h SSH&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_ssh._tcp&lt;/type&gt;<br />
&lt;port&gt;22&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;<br />
</code></p>
<p>So, you can see that I&#8217;m announcing Samba/CIFS file, AFP file, Apache HTTPd, VNC (RFB) Remote Desktop, SSH and SFTP services. Leopard&#8217;s Finder only displays the CIFS, AFP and RFB services, but other applications with Bonjour support will see the other services. By default Finder opens &#8220;Screen Sharing&#8221; when you use the advertised service, but Chicken of the VNC can also browse for Bonjour enabled VNC servers. Below are screen shots of my Finder showing the shared services.</p>
<p><img src="http://holyarmy.org/files/2008/01/finder_bonjour_afp.jpg" alt="finder_bonjour_vnc.jpg" /><br />
<img src="http://holyarmy.org/files/2008/01/finder_bonjour_cifs.jpg" alt="finder_bonjour_cifs.jpg" /><br />
<img src="http://holyarmy.org/files/2008/01/finder_bonjour_vnc.jpg" alt="finder_bonjour_cifs.jpg" /></p>
<p>No restarts are needed for anything at this point. The services should automatically be picked up by the Linux avahi daemon, but if you really need to, you may execute /etc/init.d/avahi-daemon restart .</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2008/01/advertising-linux-services-via-avahibonjour/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
