afpd on Debian

afp share

When you are on #OSX regularly, CIFS/SMB is not that good option. What you would need to do so is installing afpd and bonjour. Obviously, they won’t name as they are in Apple product. Their package names are netatalk and avahi consecutively. Installation is as easy as one regular apt-get.

Setting up both at the same time, then we would configure later.

# apt-get install netatalk avahi-daemon libnss-mdns

After installation, we need to configure a bit for both service.

afpd — what we are going to do now is to disable legacy Apple File protocol back in pre #OSX time which we don’t need.
# vim /etc/default/netatalk

 # enable new service
CNID_METAD_RUN=yes 
AFPD_RUN=yes 
# disable legacy service 
TIMELORD_RUN=no
A2BOOT_RUN=no
ATALKD_RUN=no
PAPD_RUN=no

All you need to do is making sure if these values are assigned correctly. Next, we have to declare sharepoint. You can append to these new settings to the end of this file.
# vim /etc/netatalk/AppleVolumes.default

/your/path VolumeName allow:@groupname options:usedots,upriv

Example:
You can do a share by username.

~/ "$u" allow:myusername options:usedots,upriv

For Time Machine, you can do this; it might be a good idea to limit volume size before Time Machine takes over the whole drive by using volsizelimit:100000 in MB; 100000 = 100GB

/home/username/TimeMachine "TimeMachine" allow:myusername options:usedots volsizelimit:100000

Restart netatalk to see the change
# /etc/init.d/netatalk restart

For more info: http://linux.die.net/man/5/applevolumes.default

Avahi (Bonjour)
Next, we need to do help setting up bonjour or avahi. A setting file is /etc/nsswitch.conf which is belong to mDNS (mDNS comes helping hostname resolution.) we need to enable mdns module by add “mdns” to hosts: line as following:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

Last but not least, we customize how any device see afpd. Create a new file named /etc/avahi/services/afpd.service and paste this in.

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">%h</name>
 <service>
 <type>_afpovertcp._tcp</type>
 <port>548</port>
 </service>
 <service>
 <type>_device-info._tcp</type>
 <port>0</port>
 <txt-record>model=MacPro</txt-record>
 </service>
</service-group>

You can change model to something else which change icon you will see on #OSX client side. AppleTV, iMac, MacPro, Xserve, MacBook, MacBookPro, MacBookAir, Macmini, etc.

Restart avahi-daemon to see the change

# /etc/init.d/avahi-daemon restart

Popularity: 1% [?]

MacJournal to Evernote

I was a short-period Evernote user after OneNote took over by all features and everything many years ago. However, once I moved to Mac OSX, I had yet to find a right tool as OneNote alternative. Although VMWare Fusion 4 has been improved over the years, why on Earth I have to keep Windows running wasting my memory at all time.

I tried a lot of alternatives: OneNote on VMWare Fusion — Unity view of course, MarsEdit, OmnifocusCircusponies Notebook, Journler, MacJournal, Springpad (webapp), Catch (webapp.) As a result, MacJournal it was by its simplicity for months. However, lacking of synchronization sucked big time, esp. with all mobile devices. Then there was an underdog option showing up again. Evernote. At least this piece of software was built with cloudsync in mind.

Well, this time, after couple years w/o using EverNote, I could say that it’s been vastly improved. It’s still far from OneNote counterpart, but this is all you can get on OSX. The question left is how to move all data in MacJournal to Evernote?

Like everybody else. I googled for a solution; I found a script which gave me an error, at least for me. Suddenly I thought of why we have to complicate life this much. So I decided to select all my journal entry, drag them all and drop into Evernote!

Boom! it works! way too easy, right? it works beautifully also. Evernote will show up tons of windows when it completely grabs each journal, but you can always wait a bit and close them all at once with cmd+q. After reopening Evernote, you would more than happy.

note: downside — tag doesn’t come along, but there is always a search, right?

Popularity: 1% [?]