<?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; Linux</title>
	<atom:link href="http://holyarmy.org/category/linux/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>Killing &#8220;find&#8221; Errors</title>
		<link>http://holyarmy.org/2009/11/killing-find-errors/</link>
		<comments>http://holyarmy.org/2009/11/killing-find-errors/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 05:46:53 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://holyarmy.org/?p=408</guid>
		<description><![CDATA[I&#8217;ve used the unix filesystem search utility find for many years. Though, like most things, until forced to learn its deeper secrets, I generally get by with only the most basic knowledge.
One of the cool things about find is that you can specify a search and then execute an action on the results, all in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used the unix filesystem search utility <strong>find</strong> for many years. Though, like most things, until forced to learn its deeper secrets, I generally get by with only the most basic knowledge.</p>
<p>One of the cool things about <strong>find</strong> is that you can specify a search and then execute an action on the results, all in one command.</p>
<p>This example is probably my most common use of <strong>find</strong>:</p>
<pre>find . -type d -name .svn -exec rm -fr {} \;
</pre>
<p>This means: find, in the current directory (.), a directory (-type d), named .svn (-name .svn), and for every result (-exec) remove that directory (rm -fr {}) .  The &#8220;{}&#8221; represents the matched path string, and the &#8220;\;&#8221; is required to end the &#8220;-exec&#8221; command.</p>
<p>Here&#8217;s a sample of what this looks like, including output:</p>
<pre>$ find . -type d -name .svn -exec rm -fr {} \;
find: ./.svn: No such file or directory
find: ./getid3-2.0.0b4/.svn: No such file or directory
find: ./getid3-2.0.0b4/extras/.svn: No such file or directory
find: ./getid3-2.0.0b4/getid3/.svn: No such file or directory</pre>
<p>This is great, and I&#8217;ve used this exact syntax for years. But today I ran into a problem. I wanted to run this exact command as part of a custom build script in Xcode. When this command ran I had <strong>81 errors </strong>popup in my build results! What happened is that all thos &#8220;No such file or directory&#8221; messages are actually errors, and Xcode reported them as such.</p>
<p>The solution is to add one extra argument: -depth . This causes find to do a depth-first traversal of the sub-directories being searched. That is, find will check the contents of directories before acting (eg, running an -exec command) on the directory in question. The default is to act on the directory (in our case, removing it) before attempting to visit it&#8217;s contents. So after we removed the directory, find was still trying to look at it; <strong>-depth </strong>fixes that.</p>
<p>So, the final answer is, I now use:</p>
<pre>find . -type d -name .svn -depth -exec rm -fr {} \;
</pre>
<p>Yes, this is a slightly verbose explanation for something so simple, but maybe it will help someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2009/11/killing-find-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VPN on Ubuntu Linux with Juniper Network Connect</title>
		<link>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/</link>
		<comments>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 23:13:25 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[juniper]]></category>
		<category><![CDATA[network connect]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://holyarmy.org/?p=399</guid>
		<description><![CDATA[There&#8217;s one standard document on HOWTO get Network Connect working on Ubuntu Linux. It&#8217;s mad scientist&#8217;s doc: http://mad-scientist.us/juniper.html . However, there are a few things not covered. I&#8217;ll assume that you&#8217;ve followed mad scientist&#8217;s excellent guide before going any further.
Issue #1: 64-bit Ubuntu
By default, when you install java on your 64-bit system, you get a 64-bit [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s one standard document on HOWTO get Network Connect working on Ubuntu Linux. It&#8217;s mad scientist&#8217;s doc: <a href="http://mad-scientist.us/juniper.html">http://mad-scientist.us/juniper.html</a> . However, there are a few things not covered. I&#8217;ll assume that you&#8217;ve followed mad scientist&#8217;s excellent guide before going any further.</p>
<h3>Issue #1: 64-bit Ubuntu</h3>
<p>By default, when you install java on your 64-bit system, you get a 64-bit java. No surprise there, right? Well, Juniper&#8217;s tools don&#8217;t play nice with 64-bit java. If you attempt to start the <strong>junipernc</strong> script you&#8217;ll promptly see the &#8220;VPN has failed!&#8221; error message.</p>
<div id="attachment_400" class="wp-caption alignnone" style="width: 214px"><img class="size-full wp-image-400" src="http://holyarmy.org/files/2009/06/screenshot-network-connect-vpn.png" alt="VPN has failed!" width="204" height="168" /><p class="wp-caption-text">VPN has failed!</p></div>
<p>Also if you look closely in your Terminal you&#8217;ll see the text error:</p>
<blockquote>
<pre>Failed to load the ncui library.</pre>
</blockquote>
<p>This is the clue that we are dealing with the 64-bit issue.</p>
<p>The work around for this is to install a 32-bit java on your system. Type the following into your Terminal:</p>
<blockquote>
<pre>sudo apt-get install ia32-sun-java6-bin</pre>
</blockquote>
<p>After typing your password, a 32-bit copy of java will be installed at: <em>/usr/lib/jvm/ia32-java-6-sun </em>.</p>
<p>Now, you need to convince Juniper Network Connect to use the 32-bit java. If you don&#8217;t use java for much besides your new VPN, you may just want to make the 32-bit java your default. This can be done by typing the following into your Terminal:</p>
<blockquote>
<pre>update-alternatives --set java /usr/lib/jvm/ia32-java-6-sun/jre/bin/java</pre>
</blockquote>
<p>If you DO use java and just want to tell the VPN to use the 32-bit java, you should modify the <strong>junipernc</strong> by adding the following line right after the block of lines that start with &#8220;#&#8221;:</p>
<blockquote>
<pre>export JDK_HOME=/usr/lib/jvm/ia32-java-6-sun</pre>
</blockquote>
<p>Now, when you run <strong>junipernc</strong>, it will use 32-bit java and you should no longer have the failure due to ncui.</p>
<h3>Issue #2: Determining Your Realm</h3>
<p>The scripting for Network Connect asks a few questions that may not make sense to a typical user. Even a networking savvy programmer may not be certain what values to use for the &#8220;Realm&#8221; or &#8220;PIN + SecureID Code&#8221;.</p>
<p>Finding your realm is fairly straight forward if you don&#8217;t mind diving into some HTML. Point your web browser to your company&#8217;s VPN website: https://vpn.mycompany.com or https://connect.mycompany.com .   View the source of that page and look for a line like:</p>
<blockquote>
<pre>&lt;input type="hidden" name="realm" value="REALMNAME"&gt;</pre>
</blockquote>
<p>The value of REALMNAME is what you&#8217;ll need to enter when prompted.  Your IT department may or may not know what this is if you ask them.</p>
<p>If you don&#8217;t know your &#8220;PIN + SecureID Code&#8221;, it&#8217;s simply the password you type along with your username on the VPN website to gain access. As mad scientist says, some companies use &#8220;SecurID so [they] enter a personal PIN plus the value provided by the SecurID fob,&#8221; which explains why he coded that as the prompt for the password input.</p>
<p>If you need help, there&#8217;s a long running thread over at the ubuntu forums where this continues to be discussed a lot: http://ubuntuforums.org/showthread.php?t=232607 . I gathered my info from both mad scientist&#8217;s page above and the thread itself.</p>
<p>One further note, I&#8217;ve tested this on Ubuntu 9.04 64-bit as well as 8.10 32-bit. Hope this is helpful to all you who need Juniper VPN access on 64-bit Ubuntu Linux.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Foxmarks: Bookmark Synchronization Heaven</title>
		<link>http://holyarmy.org/2009/02/foxmarks-bookmark-synchronization-heaven/</link>
		<comments>http://holyarmy.org/2009/02/foxmarks-bookmark-synchronization-heaven/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 22:19:25 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[foxmarks]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://holyarmy.org/?p=381</guid>
		<description><![CDATA[Long have I searched for the magic bullet solution to my bookmark synchronization woes.  I&#8217;ve wanted a simple plugin that would synchronize my bookmarks between multiple installations of Firefox and Safari, thus making it simple to access said bookmarks from any computer, or between the two commonly used browsers on my Mac.  I&#8217;ve looked at [...]]]></description>
			<content:encoded><![CDATA[<p>Long have I searched for the magic bullet solution to my bookmark synchronization woes.  I&#8217;ve wanted a simple plugin that would synchronize my bookmarks between multiple installations of <a href="http://www.getfirefox.com">Firefox</a> and <a href="http://www.apple.com/safari/">Safari</a>, thus making it simple to access said bookmarks from any computer, or between the two commonly used browsers on my Mac.  I&#8217;ve looked at many options, but always the solution only allows me to sync one browser or the other, leaving me looking for some secondary sync tool to get between Firefox and Safari on my Mac itself, not via network or a proper sync.</p>
<p>I&#8217;d almost given up on finding a solution, then, a few months ago I started using <a href="http://delicious.com/">Delicious</a>. It was cool because there were plugins for Safari, Firefox, and IE, and of course, it&#8217;s by default a web based bookmarking system. Its cool, I like it, but I just didn&#8217;t use it much. The plugins integrate it into the browser by giving you ANOTHER bookmarks menu, not by integrating with the browsers&#8217; bookmark system.</p>
<p>Before ever using Safari or Delicious, my Firefox bookmark sync tool of choice was <a href="http://www.foxmarks.com/">Foxmarks</a>. It provided a web interface for remote access to my bookmarks, plus a nice sync interface for all my Firefox installations. I was randomly poking around today and discovered that <strong>Foxmarks now works with Safari and IE!</strong> I was excited and wasted no time installing Foxmarks for Safari. So far, it works great!</p>
<p>For the most part, it works just as you&#8217;d expect, bookmarks sync between all my Safari(Mac only, for now, I think) and Firefox(Mac, Linux, and Windows) installations without hassle. I&#8217;ve yet to try out the Internet Explorer functionality, but I&#8217;m guessing it works pretty well. I just don&#8217;t use IE enough to care.</p>
<p>One caveat to be aware of: both Firefox and Safari use some browser specific URL syntax to access internal functionality for recent bookmarks, etc. That stuff will only work on the browser where it was created, Safari on Safari, Firefox on Firefox, etc. For me, that&#8217;s a non issue, I rarely use those features. I have tested and confirmed that javascript bookmarklets (like for Tinyurl and Cornify) do seem to work after syncing. Those are about the only reason I use on the bookmark menubar.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2009/02/foxmarks-bookmark-synchronization-heaven/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use vi key bindings in bash</title>
		<link>http://holyarmy.org/2008/12/use-vi-key-bindings-in-bash/</link>
		<comments>http://holyarmy.org/2008/12/use-vi-key-bindings-in-bash/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 06:29:38 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[geekery]]></category>

		<guid isPermaLink="false">http://holyarmy.org/?p=331</guid>
		<description><![CDATA[A long time ago I used ksh with vi key bindings, and life was good.
Then I moved on to bash, but for some reason, I never investigated using vi key bindings. I simply lived with the defaults (which, for the record, are emacs-like key bindings).
So, just the other day I said to myself, &#8220;Self, I [...]]]></description>
			<content:encoded><![CDATA[<p>A long time ago I used ksh with vi key bindings, and life was good.</p>
<p>Then I moved on to bash, but for some reason, I never investigated using vi key bindings. I simply lived with the defaults (which, for the record, are emacs-like key bindings).</p>
<p>So, just the other day I said to myself, &#8220;Self, I want to use vi key bindings in bash. I want to again experience the joy of traversing and editing my command line in COMMAND MODE. I want the speed and the power of my precious vi (well, I use vim) at my finger tips. And I NO LONGER want to waste time holding arrow keys or to think about using emacs-like commands.&#8221;</p>
<p>So, I fired up google.com; low and behold I stumbled onto this little post about <a href="http://blogs.techrepublic.com.com/opensource/?p=193">using vi key bindings in bash and zsh</a>. So sweet!</p>
<p>In a nutshell, the bash command to enable vi mode is:</p>
<p><code>set -o vi</code></p>
<p>This can be set in your .bashrc file, and if it doesn&#8217;t pickup when you start a new terminal session, add something like this to your .profile or .bash_profile:</p>
<p><code>if [ -f ~/.bashrc ]; then<br />
. ~/.bashrc<br />
fi</code></p>
<p>With vi mode enabled, you&#8217;ll start your bash session in insert mode, so things should behave as normal. But, to turn on the power, just hit the ESC key to enter COMMAND MODE. <img src='http://holyarmy.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Now all your vi commands are availble. Move to end of line with &#8220;$&#8221;, beginning of line with &#8220;^&#8221;, delete a word with &#8220;dw&#8221;, etc.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2008/12/use-vi-key-bindings-in-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
		<item>
		<title>Time Machine backup to Linux via Netatalk</title>
		<link>http://holyarmy.org/2008/01/time-machine-backup-to-linux-via-netatalk/</link>
		<comments>http://holyarmy.org/2008/01/time-machine-backup-to-linux-via-netatalk/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 07:26:49 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[netatalk]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[time machine]]></category>

		<guid isPermaLink="false">http://sherman.bz/2008/01/24/time-machine-backup-to-linux-via-netatalk/</guid>
		<description><![CDATA[So, when I got the upgrade from Tiger to Leopard on my MacBook Pro, I was looking for a good backup solution. I&#8217;ve used rsync in the past, but when I saw that Apple had a new Time Machine backup tool, I was curious to give it a shot. The catch is you basically needed [...]]]></description>
			<content:encoded><![CDATA[<div>So, when I got the upgrade from Tiger to Leopard on my MacBook Pro, I was looking for a good backup solution. I&#8217;ve used <a href="http://samba.anu.edu.au/rsync/" target="_blank">rsync</a> in the past, but when I saw that Apple had a new <a href="http://www.apple.com/macosx/features/timemachine.html" target="_blank">Time Machine</a> backup tool, I was curious to give it a shot. The catch is you basically needed an external USB or Firewire drive, until they recently came out with the <a href="http://www.apple.com/timecapsule/" target="_blank">Time Capsule</a>. Anyway, tonight I got the itch to really see if I could make Time Machine work without buying extra hardware. I mean, seriously, I&#8217;ve got a good hunk of mirrored disk sitting on my home server; that seems like a good place to do backups.</div>
<div>Some googling found me this <a href="http://www.fey.ca/blarchives/2007/11/18/time_machine_and_netatalk.html" target="_blank">link</a> to a blogger who&#8217;d done it!</div>
<div></div>
<div>I&#8217;ll make my own version of this post, since I had a few differences from the original I where I found the info.</div>
<p><span id="more-288"></span></p>
<div>First, netatalk is the Apple File Protocol server for Linux. My home server is running Ubuntu Linux 7.10 Gutsy Gibbon release. The default Debian/Ubuntu netatalk package doesn&#8217;t cut it, though, as it isn&#8217;t compiled against ssl, and Leopard has more stringent security requirements than its predecessors, so we have to custom compile a more secure version of netatalk. (Yes, you could reduce the security requirements, but I&#8217;d rather not.)</div>
<div><br class="webkit-block-placeholder" /></div>
<div>
<ol>
<li>Follow the instructions in this <a href="http://ubuntuforums.org/showpost.php?p=918060&amp;postcount=16" target="_blank">ubuntu forum post</a> to compile and install netatalk. After, run &#8220;echo &#8220;netatalk hold&#8221; | sudo dpkg &#8211;set-selections&#8221; to ensure that your package is not auto-upgraded (thus breaking your install).</li>
<li>Edit the netatalk configuration to include your backup storage location. The file /etc/netatalk/AppleVolumes.default is where the file server paths are configured. The last line of the default config grants access to home directories and looks like: (~/<span style="white-space: pre" class="Apple-tab-span">			</span>&#8220;Home Directory&#8221;). You&#8217;ll need to add a line specifying where you are storing your backups; mine looks like: (/backup/time_machine/<span style="white-space: pre" class="Apple-tab-span">	</span>&#8220;Time Machine&#8221;). <span class="Apple-style-span" style="font-style: italic">Note: I removed the &#8220;Home Directory&#8221; line, as in general I&#8217;m happier using CIFS(Samba) to access my network shares.</span></li>
<li>Modify <a href="http://www.disgruntled-dutch.com/2007/general/how-to-get-your-linux-based-afp-server-to-show-up-correctly-in-leopards-new-finder/" target="_blank">avahi/zeroconf to advertise AFP</a> so that Mac Bonjour will see the fileserver. I followed these directions exactly.</li>
<li><span class="Apple-style-span" style="text-decoration: line-through">Each Mac user needing access to the server has to have a corresponding user on the server, and each user needs a .passwd file in their home directory. Follow </span><a href="http://www.blackmac.de/archives/58-Make-Netatalk-talk-to-Leopard-Mac-OS-X-10.5.html" target="_blank"><span class="Apple-style-span" style="text-decoration: line-through">these instructions for Ubuntu</span></a><span class="Apple-style-span" style="text-decoration: line-through"> only as it explains the creation of the .passwd file.</span> <span class="Apple-style-span" style="font-style: italic">Note: This is not needed, as far as I can tell, so I wouldn&#8217;t do it. I don&#8217;t like the idea of having my password in plaintext on my server.</span></li>
<li>Create a file named &#8220;.com.apple.timemachine.supported&#8221; at the root of the intended shared backup volume. (Discussed <a href="http://episteme.arstechnica.com/eve/forums/a/tpc/f/8300945231/m/420002218831" target="_blank">here in more detail</a>.)</li>
<li>On your Mac, open a Terminal window and type: &#8220;defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1&#8243;</li>
</ol>
<div>I rebooted, but it might not be necessary. After a bit of time, my server showed up under the &#8220;Shared&#8221; section in Finder&#8217;s left column navigation window. I did have to type in my username and password to get it to work, which can be saved in the keychain.</div>
<div></div>
<div><span class="Apple-style-span" style="text-decoration: line-through">I added my other common shared folders (which I&#8217;d previously been accessing via Samba/CIFS).</span> Now I&#8217;m backing up with Time Machine <span class="Apple-style-span" style="text-decoration: line-through">AND using my shared files</span> via AFP. My Mac is happy, and I am too.</div>
<div></div>
<div></div>
<div>(see next post for explanation of strikeouts, but note, I don&#8217;t recommend you do the struck out actions.)</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2008/01/time-machine-backup-to-linux-via-netatalk/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>EasyVMX: Easily Create VMware Player Machines</title>
		<link>http://holyarmy.org/2007/09/easyvmx-easily-create-vmware-player-machines/</link>
		<comments>http://holyarmy.org/2007/09/easyvmx-easily-create-vmware-player-machines/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 15:39:31 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://sherman.bz/2007/09/20/easyvmx-easily-create-vmware-player-machines/</guid>
		<description><![CDATA[I&#8217;ve used this before, but today I was struck by how useful EasyVMX really is! I&#8217;m setting up a new PXELINUX / TFTP server (which will incidentally be running the PXE Knife tools put together by my friends John and Brian.
Anyway, EasyVMX provides a form (easy, super simple and 2.0 with advanced options) to generate [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used this before, but today I was struck by how useful <a href="http://www.easyvmx.com" target="_blank">EasyVMX</a> really is! I&#8217;m setting up a new <a href="http://syslinux.zytor.com/pxe.php" target="_blank">PXELINUX</a> / TFTP server (which will incidentally be running the <a href="http://pxeknife.erebor.org/">PXE Knife</a> tools put together by my friends John and Brian.</p>
<p>Anyway, EasyVMX provides a form (easy, super simple and 2.0 with advanced options) to generate a VMX config file (which <a href="http://www.vmware.com" target="_blank">VMware</a> uses) to run a virtual machine. All you have to do is choose a few basic options about what you need on your machine, how much RAM, how big your disk needs to be, etc; click &#8216;Create&#8217;; and download your zip file. Simpl, easy, and I&#8217;ve got a VMware virtual machine that I can run in the free, <a href="http://www.vmware.com/products/player/" target="_blank">VMware player.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2007/09/easyvmx-easily-create-vmware-player-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
