Category Archives: Macintosh

Macintosh & Ubuntu: Apple File & Time Machine Server

I’ve streamlined a script that will install netatalk (an open implmentation of the apple network file server protocol), avahi-daemon (Bonjour/ZeroConf service) and configure it all to set up home directories and a Time Machine shared folder at /home/TimeMachine (which can easily be changed, read below).

The link to the install script is at my Ubuntu Script sub-site (look for Apple File Server).

This has been tested in both 10.04 (LTS) and also 10.10 and works with my MacBook Pro very nicely.

By default you’ll have to “Connect As” a UNIX user on the system, but you should be able to figure out how to handle guest support with a few good Google searches.

Once everything is set up, the biggest (and most likely, the only) file to change for this service is /etc/netatalk/AppleVolumes.default

The install script will append a line to the bottom for the TimeMachine home directory, feel free to make this anywhere in your file system by changing the path area…or even rename it by changing the second parameter. There’s pretty good documentation on the netatalk website.

I’ve tested this on 2 real machines and about 4-5 virtual machines, so as long as you’re running Ubuntu 10 or better, it *should* work pretty much right after the script finishes.

To have Time Machine work for your clients, a small hack must be made (well, honestly a hidden setting must be changed).

Open the Terminal Application (which is in your Utilities directory) and copy paste the following (and press enter to run the setting change program) all on one line just in case it’s wrapped in your web browser:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

An instructional RTF wit the above setting is is the default Time Machine folder just in case you don’t read this far or if you don’t want to refer to this post again.

Macintosh: Syncing your MacOS Contacts & Calendars with Google

As I promised here’s the tutorial to sync your calendars and contacts with your Google account (doesn’t matter if it’s Google Apps or plain Google). The instructions are a little short and to the point and the screenshots are a bit flakey, but I’m pretty sure it’ll help someone out there.

Contacts

  • Open your Address Book
  • Go to Address Book then Preferences
  • Click on the Accounts Icon at the top (this works like a Windows Tab)
  • Put a check beside Synchronize with Google

  • A dialog will pop up about they can’t take responsibility for lost contacts ,etc

  • Type in your google email address and password

  • Press OK
  • Now your contacts won’t sync until you press the sync button at the top of your menu area

Once it’s done your contacts from Google should now be in your Address Book!

Calendar

  • Open up iCal
  • Go to iCal then Preferences
  • Click on the Account icon at the top
  • Press the + button to create a new Account Subscription

  • Enter your google email address and password

  • and your calendar should show up as a CalDev account.
  • You may have to sync as above in the Address Book area, but I don’t think so (I honestly can’t recall)

Mail

Macintosh Impressions: First Week

I’ll admit it. I’m a Mac user now. I’ve been trying to use my new MacBook pro full time for the last week, and it’s been a smashing success. The 8 hour battery life of this little Laptop is quite extrordinary, and the few adapters and ‘nice touches’ from the MagSafe adapter to the Battery Indicator button on the left hand side of the computer are quite handy.

I do wish it had one more USB port for convenience when I’m at home connected to my external monitor, but I can purchase a nice USB hub to fix that up.

There are several programs I’m using

  • Pixelmator (Photoshop competitor, under trial)
  • CeltX (screenwriting software, FREE!)
  • iWork (for Keynote and Pages, nicely priced)
  • iLife (for Garage Band and iPhoto mainly, included with every Mac)
  • TextMate (programmer’s text editor–I’m holding out for the beta of Ultraedit for Mac before I purchase)
  • VMWare Fusion (awesome emulator, under trial UPDATE: Licensed, got a coupon for $20 off and purchased from VMWare directly–no sales tax from Texas)

I’m using Google to sync all my Calendars and Contacts…. I’ll write a tutorial of how to do that later this week.

Tricks I’ve come across

  • To silently change the volume (i.e. don’t make the plop sound when changing the volume): press shift while pressing the volume controls
  • To quickly change image & font sizes in most programs: pinch (use two fingers your mouse pad on your MacBook or Magic TrackPad
  • Right clicking is as easy as clicking with two fingers (nice touch!)
  • Dragging and dropping is easy once you get used to it: press and hold with your left hand in the corner to click on the item you want to drag then use your right finger to do the moving then release with your left finger when you want to drop…not too shabby.
  • I was able to connect my awesome Linux server to work as a Time Machine backup server quite easily.

The minor issue I’ve got so far

Keynote doesn’t seem to allow me to edit my slides as it’s presenting. I tend to like to be dynamic when doing church presentations and fix typo’s as I find them or switch out names if someone is not able to read, etc. MediaShout (the program we use for PC) does this very nicely, but is a very quirky program for the most part. I’d like to see this functionality in Keynote.

Gaming

What little gaming I do is either Starcraft II (which doesn’t run too badly on this little 13″ MacBook Pro for the most part) of the online web-browser game Lord of Ultima. I’ve not tried running Windows games under VMWare fusion or BootCamp (I haven’t purchased a Win7 license for this laptop yet, nor will I until I get a bigger hard drive and/or need the ability to boot to it).

Things I miss from Windows & Linux

Linux software repository – I sure would like a way to install open source software on the MacOS side

Windows 7 Shortcuts – specifically Windows Key – L to lock the screen and Windows Key # (to launch a program in the taskbar, from 1-10) everything else I’ve found a very nice substitute for in MacOS (and a few that were actually easier and there are no comparison in the Windows world such as Command-H to hide a window from the OS).

That’s it for now!

My new MacBook Pro

My MacBook Pro finally arrived!

It’s only a 13″ model, but it will be quite sufficient for my needs as a laptop and extremely portable.

All I need now is my Laptop Bag – which will be here Tuesday.

Here are some pics.

At least now I’ll be running a real copy of Snow Leopard instead of the hacked copy that’s on my desktop.

What I found amazing is that after only a few minutes everything was working exactly as it should…all I had to do is enter my User information (and install iWork and dropbox) and I was up and going. The Updates took 5 minutes to download and install, but that wasn’t bad.

Python Programming: Converting my old avi files to h.264

Here’s a little script that calls HandBrake‘s CLI interface to convert a whole directory full of media in a recursive manner.

No Instructions. No warranty. No guarantees. Your mileage may vary. Yadda Yadda Yadda.
Tested on Ubuntu and MacOS 10.6

Download it here or just read it (better to download it, since my blog removes the whitespace and hence the flow of the script):

#!/usr/bin/python
# This script requires the HandBrake CLI program
# Download it at http://handbrake.fr/downloads2.php

# You’ll need to change this to fit where everything is on your system
sFromDirectory = “/home/jeff/Videos/”
sToDirectory = “/home/jeff/Desktop/converted_video_output/”
sFullPathToHandbrakeCLI = “/usr/bin/HandBrakeCLI”

# Don’t mess with anything below this…..
import os.path
import shutil

def ConvertFile(sPath, sFile):
global sToDirectory
global sFromDirectory
global sFullPathToHandbrakeCLI
sExtension = os.path.splitext( sFile )
sNewFileName = sFile.replace(sExtension[len(sExtension) – 1], “.m4v”)
sNewDirectory = sPath.replace(sFromDirectory, sToDirectory)
if sPath != “”:
sOldFullPath =  sPath + “/” + sFile
else:
sOldFullPath =  sPath + sFile

if sPath != “”:
sNewFullPath =  sNewDirectory + “/” + sNewFileName
else:
sNewFullPath =  sNewDirectory + sNewFileName

# Don’t re-encode if it’s already a m4v
if not os.path.exists(sNewFullPath):
if sExtension == “.m4v”:
# Copy it instead of re-encoding it…
shutil.copyfile(sOldFullPath, sNewFullPath)
else:
sHandbrakeCommand = sFullPathToHandbrakeCLI + ‘ -i “‘ + sOldFullPath + ‘” -o “‘ + sNewFullPath + ‘” -v -m -E aac,ac3 -e x264 -q 0.65 -x ref=3:mixed-refs:bframes=6:b-pyramid=1:weightb=1:analyse=all:8x8dct=1:subme=7:me=umh:merange=24:filter=-2,-2:trellis=1:no-fast-pskip=1:no-dct-decimate=1:direct=auto’
os.system(sHandbrakeCommand)

def callback( arg, sDirectory, aFilenames ):
global sToDirectory
global sFromDirectory
print “Checking files in ” + sDirectory
sSubPath = sDirectory.replace(sFromDirectory, “”)
for sFile in aFilenames:
if sSubPath == “”:
sOldFullPath =  sDirectory + sFile
else:
sOldFullPath =  sDirectory + “/” + sFile

if os.path.isdir(sOldFullPath):
sNewDirectory = sOldFullPath.replace(sFromDirectory, sToDirectory)
print “”
if not os.path.exists(sNewDirectory):
print “Making new directory: ” + sNewDirectory
print “”
os.mkdir(sNewDirectory)
else:
ConvertFile(sDirectory,sFile)

if not os.path.exists(sToDirectory):
os.mkdir(sToDirectory)
arglist = []
os.path.walk(sFromDirectory,callback,arglist)

Updated (September 3rd): Fixed a directory recursion issue.

Macintosh: How to Flatten Your Dock

I personally don’t like the default look of the Dock when it’s on the bottom. I prefer the flat look you’ll get when you move it to the sides.

Here’s how to do it:

Open Your Terminal (it’s in your Utilities in your Applications directory);

Type the following:

defaults write com.apple.dock no-glass -boolean YES

killall Dock

your dock will then restart and you’ll go from

to

That’s it for now 🙂

PS To reverse it back to normal just type

defaults write com.apple.dock no-glass -boolean NO

killall Dock

Of course in the terminal, as above….

Top Down Marketing and how Ubuntu should retarget their niche to succeed

I’ve been thinking about this during my my fever induced delirium and now that I’m feeling a bit better (still coughing though) I think I’m going to rant my observations and suggestions to the Ubuntu community. Now understand that I’m, for the most part, pulling any possible figures and statistics from the air and is mostly purely opinion and personal observation, but hopefully someone else can learn from and follow my line of thought, as I can already tell this is going to be a long post. In addition, this is pretty much stream of conscious, so the rhyme and reason may stray a bit. If you comment, please keep this in mind.

Microsoft’s Explosive Growth in the 90’s (and a little bit of the 80’s)

In the 90’s the two juggernauts of general computing took two different approaches of claiming the market. Apple was looking to put a Mac in every home, while Microsoft was seeking to put DOS and Windows on every office desk. Instead of making their own computers, Microsoft created the operating system that any PC manufacturer could license and sell their computers. At first this was DOS, but then when Apple learned of the GUI from Xerox Parc and created the first (amazingly innovative for the time) Mac, they started work in the Windows shell which ran on top of DOS.

It was because of the business class software of Word Perfect and Lotus that DOS shined early in the 90’s. Mac catered towards the graphic artists due to some of their amazing design software such as Mac Paint and Adobe’s Photoshop 1.0 (which until later versions, the Windows version was an afterthought, and not nearly as efficient). When employees wanted to purchase a computer for their home, they were already used to using Windows/DOS computers at work and naturally decided to purchase what they were used to (there were a few that were convinced to “Think Different” from their office computers).

Once a market is established, businesses are very slow to change their ways and tend to use solutions until they fail completely unless directed eloquently by a good technology officer (who would see that a solution would fail in a few years and start planning for a solution that would replace it and plan for a transition to a new solution).

Example: Visual Basic and Microsoft Access

I can’t tell you how many MBA programmed/hacked Visual Basic or Microsoft Access solutions I’ve had to replace/work on (tearing out my wits and hair while doing so because they were all patches, with no proper thought process of how to program properly), but these two powerful tools were also an strong proponent of Window’s success in the mid 90’s. Programming a dialog-based business front-end was easy, and although multiple people accessing a Microsoft Access database sometimes was tricky, it did work most of the time. Sure Mac had File Maker Pro and a few other solutions, but Microsoft was a trusted named in the corporate world and they practically gave copies of this development software (Access at least) with every copy of Microsoft Office and with the free Runtime, only one developer had to purchase while many other employees could use the custom business software.

The late 90’s – The Server Market EXPLODES

Two words that are some of the most powerful words in the corporate world: Active Directory. Active directory is a tweaked combination of the open standards LDAP (Lightweight Directory Access Protocol) and Kerberos (basically a network password encryption scheme) as well as a few other little proprietary ticks. What this did was one of the most important things for any corporate environment: Roaming Desktops and most importantly, single-sign authentication.

From this base Microsoft created their mail server Microsoft Exchange, which was not only a Mail server, but a collaborative Calendar and Contact manager for an entire company. Sure there were other solutions such as Lotus Notes and Lotus Domino (which came too late with too little features), but none of them were top-down homogeneous with Microsoft’s operating systems. Between this and Windows 2000 (based on the quite stable for the time NT kernel), Microsoft’s grip on the corporate market became tighter.

Before Active Directory: the UNIX solution to multiple users

In the early 90’s I noticed many SCO or VAX based terminal solutions for corporations as well, before Microsoft’s Active directory, using telnet to connect to a UNIX server was really the only practical way to have a single-sign-on solution with a ‘roaming’ home directory.

Unfortunately these solutions were amazingly expensive as they were very powerful (even now, as operating system ‘power’ is quite level the legend of UNIX being powerful still whispers amongst techies). However, the command line was unintuitive for non-trained users and training employees is very expensive (plus the fact that most UNIX programmers tended to make their custom solutions work instead of being easy to use, due to time constraints)

Microsoft Today

Microsoft as a software company has only two popular home products: Windows 7 Home and Office Home and Student edition (everything else is a separate division and not their bread-winner). Everything else is targeted towards businesses, whether small or corporate business. Sure Windows 7 has a very nice set of Gaming tools in DirectX, but this was a bolt-on solution to Windows, not a core feature (as of Vista, it’s now integrated in the desktop with Aero).

How to Make A Product in Succeed Today’s Market

Microsoft is King of the corporate world: deal with it. There’s no need to whine about it, no need to disagree. If you go into any major corporation, they use Active Directory and Microsoft servers, they may or may not use Exchange (most likely they will), but they’ll be using AD. Group Policies and Update Servers make keeping 1000+ computers a 10 man job instead of a 50-100 man job which saves TONS of cash.

To succeed you’re going to have to integrate seamlessly in this environment, or you’re going against the grain of corporate information technology and you’ll be denied request for your gadget or software that a user feels they need to work (or play).

Example: The Apple iPhone 3g (and the Mac)

The iPhone has a huge percentage of the market for many reasons, but (in my opinion) the reason for this was due to the iOS version 3’s ability to sync and connect with Microsoft Exchange servers for Calendars and Email. This is a very important for corporations and until that time the iPhone was just another ‘toy’ not to be considered for its managers and executives. Once these features were in place the phone had a whole new market (and one with deep pockets) and I know personally in our office that was the reason that we adopted them for our technicians–the calendar syncing alone. Until those features were added it had amazing response and sales, but well less than when the corporations and businesses that depended on Exchange for their scheduling.

With Snow Leopard last year, the Macintosh now has the ability to connect to Exchange servers with iCal and Mail. Although the users can’t sign in (easily) to an Active Directory, they can still participate in the corporate employee communication and scheduling, so there’s a good possibility that Macs may start showing up in the office (and may partially explain the recent boost in Mac sales). If Apple’s next OS were to support joining an AD domain right out of the box easily, then I foresee a huge explosion of Mac sales too as Antivirus software licenses are almost as expensive than the price difference of a low end Mac and a PC (although as soon as the Mac becomes more popular, I expect more attacks against the platform).

What this means for Linux (and my favorite Distro Ubuntu)

For the Linux Desktops: I’m not going to get into any GUI debates, as Ubuntu’s GUI is still evolving. Linux desktops have GOT to be able to register and connect to an AD domain to succeed in the corporate world. It’s wildly important to connect to Exchange for Contact, Calendar and Mail as well. Applications are hit and miss, as many corporations are moving towards Web/Intranet-Based applications for their internal development. This is mainly because the developers can write once, and it instantly be effective for all the users.

For Linux Servers: Creating a free and easy to use LDAP/Kerberos server is essential (and having the Desktop Distros easily find and have the ability to connect to that server is essential. Creating a Mail/Contact/Calendar server is essential as well, whether it is Exchange compatible is detestably important but there should be some way to at least import from an existing Exchange server for transitional purposes. Even for home users this is important, as now multiple home users may have the same login across all home computers (and this is very common here in the US) with all their files and settings.

Ubuntu

Mac Mini Sold (and there was bittersweet rejoicing)!

Well, my humble Mac Mini has been sold to a localite — an acquaintance of Kim. It’s been a good machine for me, but just (not) enough for a 3d and compositing(and casual gaming) workstation. I need substantially more horsepower for some of the projects coming up, so this was a blessing. I’ll miss the Mac platform in some ways, but it’s just not enough of an open platform.

I need my hardware tailor made for my needs: quad core cpus, high end memory and decent video card (not necessarily top of the line).

I should have it sold and in buyer’s hand later tonight after I zero out the HD and reinstall Snow Leopard and iLife for them.

A quick 15 minute test in Apple’s Garage Band

Like yesterday’s very rough, but has a 5th track layer (Horns, Bass, Drums, Rhythm Guitar, Lead Guitar)–totally different style.

Each track is a single take and no post processing other than just adjusting the volume levels for each track.

The drums and bass are loops from GarageBand (I won’t take credit for the quality of those, and to be honest it’s what makes the clip even remotely pleasurable to listen to).

Windows 7 32 bit, Mac Mini, SONAR, and Conspiracy Theories

Well early last night I set up boot camp for 32bit Windows 7 (since it’s only a 4 gig box) on my mid 2009 upgraded Mac Mini. Partitioned out the Windows 7/OS X partitions equally and installed Cakewalk SONAR 8.3 (as I’ve not upgraded to 8.5 yet).

Not a single hitch, after 2 hours of installing 7, Boot Camp Drivers and the DAW software (which was by far the most lengthy part as it’s a 4 DVD install) then immediately switching to ASIO drivers (and installing the ASIO drivers for my M-Audio Keystation 49i) I was in business.

I’ll make my claim: Windows 7 is the best version of Windows released thus far. Sure it has its issues (as every complex software does), but it’s a smooth install and works very quickly and efficiently to run your software.

I spent about 10 minutes recording a quick little diddy to test out the performance and I’ve got a good, stable machine without being tied down to Apple hardware. Which finally introduces the following ranty thought (as I do like Mac hardware and software):

Apple really needs more customization and latest generation hardware in their consumer lines they just released the new iMac with a puny 4000 series ATI video card when the 5000 series has been out for long enough for them to have a beta version of the chip to test and eventually produce. The 4000 series can marginally drive 3D games at the resolution of the new 27″ iMac (a monstrous 2560-by-1440 LED backlit screen).

On the OS side, I’m not crying about having to buy Apple hardware to run MacOS–that’s not the issue. But the latest version of Ubuntu (a free and ‘hard to use’ OS) actually puts MacOS to shame when it comes to finding and adding/installing software. Sure most software is drag-and-drop easy on MacOS, but Ubuntu’s Software Center is two-click install and automatic upgrades and updates from then on inclusive with the system updates. Apple really needs to support an Open Source repository for software or release an Apple Store for Mac (as they have for iPhone) or both as some sort of  integrated solution as Ubuntu has released a very early, rudimentary version with 9.10.

I prefer Linux as its open source software repositories are second to none, but the biggest problem that I’ve always had with Linux is the lack of mid to high level software support from various ISV’s such as Adobe. If Adobe released Photoshop for Linux that was on par with the Mac & Windows version I think there’d be quite a migration to the OS.

Microsoft is scared of Linux and Linux is Microsoft’s #1 threat (not Mac, despite what Apple would like for you to believe), and I suspect there’s some behind the scenes trading and dealing to keep Adobe from deploying on that platform (perhaps from both Apple and Microsoft).