Category Archives: Mac

Some of the Best Free Mac Software

So you bought a Mac, and you are staring at a fairly lonely dock wondering what other goodies you can add. Sure, the Mac comes with a lot of great software, including Snow Leopard, iTunes, iPhoto, iMovie, GarageBand, iWeb, iChat, and more but there has to be some other great stuff too right?

Here is my list of (mostly free) software to add to your Mac to take it up a notch:

  • Skype
    The best way to make phone calls on your Mac
  • Quicksilver
    Free fast application launcher and more
  • HandBrake
    Don’t let those old DVDs go to waste, use HandBrake to rip them to your iTunes library (and play them on your TV or iPhone)
  • Tweetie
    If Tweetie for the iPhone is good, Tweetie for the Mac is an even better Twitter client
  • Evernote
    Keep track of everything and sync it automatically between Mac, Windows, iPhone, and web. Includes character recognition on images for searching text on pictures taken with your iPhone
  • Transmission
    The best torrent client for the Mac
  • Cyberduck
    FTP, WebDAV, iDisk, whatever this client is fast, free, and easy to use
  • Colloquy
    IRC isn’t dead yet, and this free client works great on the Mac and iPhone
  • Adium
    The best IM client on the Mac, works with just about anything that chats

And then there are the less often useful, but sometimes helpful ones:

  • KisMAC
    Because sometimes you really, really need a hot spot
  • MacTheRipper
    For those stubborn DVDs that won’t rip with HandBrake

Those are all the free ones, I’ll post another list of all the paid items that I find myself using nearly every day soon.

Accessing ActiveMQ on Mac OSX from a Windows VM

With MassTransit, we support multiple messaging transports, including MSMQ (comes with Windows), ActiveMQ (an open-source Java message broker), and TIBCO EMS (a not-so-open-source message broker). With that in mind, teams building on the Windows platform can comfortably choose MSMQ and enjoy familiar management tools. If your needs expand to multiple platforms, however, the other choices become more important. One of our goals is to enable MassTransit to communicate between services running on Windows, OS X, and Linux. By using the Mono Project to run .NET code on OS X and Linux, and ActiveMQ to handle the messaging, we’re pretty confident that we can reach that goal.

To start working towards this endeavor, I had to first get a working test environment. ActiveMQ can run on Windows, Linux, and OS X. Since Dru Sellers and I both develop on Macs using VMware Fusion to host various versions of Windows, I wanted to install and run ActiveMQ on the Mac host, making it available to any of the virtual machines. I had not really dealt with setting up services on OS X yet, but was happy to learn that it is a pretty slick process to get things installed and running. Hopefully this will help if you decide to do the same.

I should note that I am not an ActiveMQ installation/administration expert. I am configuring ActiveMQ for use in a development environment. If you are going to use ActiveMQ in production, make sure it is configured for proper production operation with the appropriate security, storage, etc. That being said, let’s get started.

Getting Started

You need to download ActiveMQ. I got the Linux version by typing in the URL manually to get it to download using Safari. The archive will be unpacked into a tar file automatically by Safari (if not, just double-click it), which you can then open the tar file into a folder by double-clicking it again. If you are a command-line wizard, you already know how to handle the tar.gz files so enjoy.

Move the unpacked folder (apache-activemq-5.2.0 in my case) to the /usr/local folder by opening Terminal and entering:

sudo mv apache-activemq-5.2.0 /usr/local/

While still in terminal, change to the ActiveMQ folder. We need to modify the configuration.

cd /usr/local/apache-activemq-5.2.0
mate conf/activemq.xml

If you aren’t using TextMate, well, do whatever you need to do to open that file. I removed a lot of unused things from the file, but your needs may vary. You can download my configuration file if you want to use what I am using. You will need to modify the IP addresses to match your environment. I originally tried to use just localhost, but had issues with it connecting from my Windows 7 VM. If this is just a fluke, I’ll update my file later with my new settings.

Installing the launch daemon into OS X

To run ActiveMQ as a service, you need to create a property list that describes the application. This is just an XML file, but we need to create it and put it into the /Library/LaunchDaemons folder and call it com.apache.activemq so we can identify it later. You can download my version of the file to save some typing if you prefer.

ActiveMQTerminalSetup.png

Some of these settings can be adjusted if you don’t want to keep ActiveMQ running all the time. KeepAlive will automatically restart the service if it stops for some reason (including manually stopping it) and you can set that to false if you want to control it manually.

After creating the file, we need to configure OS X so it knows about the new service. To do this, type the following:

sudo launchctl load /Library/LaunchDaemons/com.apache.activemq
sudo launchctl start com.apache.activemq

Once you have done this, you can verify that it is started by running the OS X Console application (find it in QuickSilver/Spotlight if you don’t know where it is). Look at the message logs and you can see the startup messages from the service:

ActiveMQConsoleLog.png

So how do we know that we have a working installation? Well, there is an admin console that you can reach by navigating to http://localhost:8161/admin that will let you view the queues, topics, etc. that are running. You can also use the JMX tools to dig into the queues as well, including the ability to send messages to the queues directly from the Java console! To get the console started, you need to run jconsole from Terminal. Once it is started, you need to connect to the URL that is configured:

JConsoleConnect.png

Once you are in the JConsole, you can view all the queues. It should look like this (well, assuming you’ve created some queues, which I’ve done here with the Starbucks sample from MassTransit).

JConsoleView.png

You can see the default URL that was connected to in the title bar, along with the tree view of all the objects. The more interesting tab is the Operations tab, which lets you run commands against the queue. In fact, you can past some XML straight into an input box and click “sendTextMessage” and the message will be stuffed into the queue right there.

JConsoleOperations.png

So now that we know ActiveMQ is running and happy, we can modify our application to use the ActiveMQ transport instead of the MSMQ transport by simply changing the URI for the endpoint. So instead of msmq://localhost/mt_subscriptions you would specify activemq://192.168.0.195:61616/mt_subscriptions (in my case, that is the IPv4 address of my host machine). As long as the transport is in the same folder and you’re using the StructureMap base registry without specifying a specific transport, it should connect up to the host and start working. The other containers will hopefully get this support soon, it was just easy to add with the Scan() feature of StructureMap’s registry DSL.

I hope to dig deeper into the ActiveMQ transport support in MassTransit, as well as start testing it while running under Mono on OS X over the next few weeks. I already have the Windows bits working, I just want to test more exception cases such as losing the connection to ActiveMQ, as well as other runtime issues to make the code more production ready. I also want to try sending messages to/from other languages, such as Ruby via STOMP, but my Ruby skills are not the greatest.

At the very least, I hope this article helps you get ActiveMQ installed and running on your Mac using OS X Leopard. If you do run into issues or have problems, be sure to visit the MassTransit mailing list and post your questions/issues there.

Running the PDC Visual Studio 2010 Drop on VMware Fusion

At the Microsoft PDC in Los Angeles this year, attendees received a CTP of Visual Studio 2010 on an external HD along with all the conference materials. VSX came installed on Windows Server 2008 (along with TFS) giving attendees a chance to dig into the new features of .NET 4.0 and the IDE.

Unless you’re on a Mac. The VM was released in Microsoft’s VPC format which can only be run on a Windows host. Or can it?

To run the CTP under VMware Fusion, you’ll need to convert it to the proper format. To do this, you’ll need to install the VMware Converter on a Windows system. Once installed, plug the PDC drive into a USB port and find the directory containing Visual Studio 2010. In VMware Converter, click the Import Machine button and follow the instructions. Be sure to pick the latest virtual machine version if you are using Fusion 2.x, as this will give you the best performance.

8c0d37fc7dd5cbe6de9e680b6d6d42ea.png

I chose to create the new image on the external drive so I could copy it to my Mac. The conversion took maybe 40 minutes to finish. Once converted, I connected the external drive to my Mac and copied the directory (VSXCTP in my case) to the Virtual Machines folder in my Documents folder. I then used the Library window to open the VM, which copied it into my library.

FusionLibrary.jpg

After starting up the CTP under Fusion, I had to install the latest version of the VMware Tools, after which Windows 2008 discovered a bunch of new hardware. Once the tools were installed, the machine runs nearly as fast as my Windows 2008 Workstation hack that I had previously installed.

I haven’t tried running the VMware Converter inside of a VM under Fusion, but I would imagine that it might work. Again, I didn’t attempt this, so if you do it and it works, reply and let me know about it!

Good luck and enjoy the CTP!

Hitachi 7K320 Hard Disk Upgrade in MacBook Pro

Tonight I upgraded the drive in my MacBook Pro from the Fujitsu 160GB that came with it to a new 320GB 7200 RPM Hitachi. I was in desperate need of space (thanks to VMware Fusion and my need for 3-4 virtual machines) and felt with the new 7200 RPM drives now available that it was time to pull the trigger.

The install went smooth and quick, thanks to the guides at iFixit (and others). I used SuperDuper to clone the internal drive to the new drive installed in an external USB enclosure. The process went quickly (maybe 3 hours to copy over 120GB of actual data) and soon after I had the upgrade complete.

Here at the details of the upgrade:

Hitachi HTS723232L9A360:
  Capacity:	298.09 GB
  Model:	Hitachi HTS723232L9A360
  Revision:	FC4OC30F
  Serial Number:	xxxxxxx
  Native Command Queuing:	Yes
  Queue Depth:	32
  Removable Media:	No
  Detachable Drive:	No
  BSD Name:	disk0
  Mac OS 9 Drivers:	No
  Partition Map Type:	GPT (GUID Partition Table)
  S.M.A.R.T. status:	Verified
  Volumes:
Macintosh HD:
  Capacity:	297.77 GB
  Available:	186.59 GB
  Writable:	Yes
  File System:	Journaled HFS+
  BSD Name:	disk0s2
  Mount Point:	/

Hopefully that means all is well (I really have no clue). Everything seems to work so far as it did before so I’m a happy camper!

VMware Fusion 2.0 Beta 1

It looks like VMware has dropped a public beta of VMware Fusion 2.0 to the public. There are too many new features in this release to mention, so I will just share the link:

http://communities.vmware.com/community/beta/fusion

Be sure to check the release notes to see if they impact your work before upgrading to this beta release.

Items of interest I took away from the release notes:

  • Use Fn+M to simulate the non-existent insert key in Windows (hello R#)
  • Multiple display support for virtual machines (hello second monitor)
  • Improved compatibility with Visual Studio (not sure what this is yet)

Be sure to check it out!

Developing for Windows on Mac OS X

This past week I setup a new development environment on my MacBook Pro. As I got into it, I realized that it might be a good idea to share the setup process with others who might be switching to a Mac. Unlike a lot of people that use Windows XP for development, I do all my .NET development on Windows Server 2003. I have always had a firm belief in developing on your target environment.

For this discussion, I will be using VMware Fusion to run Windows. I’ve always been a fan of VMware, and their Mac OS X version continues to impress. There are many slick features in VMware Fusion, including Unity mode and dual-processor support. I’m going to be installing on my MacBook Pro, which is a 2.4 GHz Core 2 Duo with 4 GB of RAM (using the Santa Rosa platform, for full 64-bit memory support). I’m going to install the 32-bit version of Windows Server 2003 since the tools are all 32-bit applications.

I highly recommend getting your installation disks as ISO files (from MSDN, of course). VMware can mount the disk images directly, and they load a lot faster than using the physical media. For the purpose of this installation, you’ll need the following disk images:

  • Windows 2003 Server R2 with Service Pack 2 (disk 1, 2 is not needed)
  • Visual Studio 2005 Professional
  • Microsoft MSDN Library for Visual Studio 2005 (optional)
  • Microsoft SQL Server 2005 Developer Edition

You’ll also need the following downloads:

Creating the Virtual Machine

To create your virtual machine, start up VMware. On the Virtual Machine Library window, select New. On the New Virtual Machine Assistant, click Continue. For Operating System, choose Microsoft Windows, for version, choose Windows Server 2003 Standard Edition. When choosing a name for your VM, I find it helps to pick something that reflects what development will be done. I have two, one called W2K3x2K5 and one called W2K3x2K8. As you might guess, the first has Visual Studio 2005 and the latter has Visual Studio 2008.

When choosing a disk size, be sure to give yourself enough room for your tools and applications, but don’t go overboard. Before I rebuilt my VMs, none of them were over 14GB in size so I chose a size that would give a little room to grow. Now, you could pick something like 40GB and configure the VM to grow the disk file as space is consumed but I prefer to allocate the entire disk in 2GB chunks at creation to get the best performance. I don’t usually use a lot of local space since all of my source code is kept in a remote Subversion repository.

The next screen is the Windows Easy Install. This is an easy way to get the operating system setup without any user intervention. Just make sure your install disk ISO is ready, and enter your name, password, and Windows key. Check the “Make your home folder accessible to the virtual machine” so that you can easily transfer data from OS X to Windows. I make the folder read only, since I don’t trust Windows to write to my home folder. Once the Finish screen displays, uncheck the Start and Install now option since we want to make some tweaks before the OS install begins. You can go ahead and pick your ISO for the installation.

Once the VM has been created, go back to the Virtual Machine Library, pick your virtual machine, and click Settings. We need to tweak a few things before we let Windows install.

  • Battery – I let the guest see the battery status
  • Display – Uncheck since we are not using XP
  • Memory – I give the VM 1492 MB, but you can adjust to taste.
  • Processors – Two (2) virtual processors should be set for installation.
  • Network – NAT or Bridged are the only real options here. NAT is good when you don’t need other machines to have access to the VM, but use Bridged if you want a direct link to the network. If you use NAT, you can get to your Mac from the VM using the .host name.
  • Sound – I like sound, I enable it.
  • Shared Folders – This should be fine based on how the VM was created.
  • USB – I like to be able to use my flash drive in the VM, so I enable this option.

Once the settings are tweaked, go ahead and fire up the VM. Windows should install without any user intervention and after a short time (the install runs super fast from the ISO) you should have a working Windows Server 2003 installation. Once you have it up and you are logged in, it’s time to run Windows Update to get all the latest patches (there will be a ton of them). Go ahead and let them install, and be sure to get the optional .NET 2.0 and .NET 3.0 packages as well.

Now that we have Windows setup, it’s time to take away all the things we don’t need.

  • Disable automatic updates — we can do that when we need to do it.
  • Disable remote access into the machine (no Remote Desktop or Remote Assistance).
  • My Computer, Properties, Advanced, select Adjust for Best Performance for Memory and CPU.
  • Set virtual memory to a fixed size of 1GB.
  • Advanced Startup and Recovery – Uncheck all reporting and set Debugging Information to none.
  • Disable error reporting and turn off critical error notification

In the control panel, we need to tweak a few things as well:

  • Set your time zone and turn off automatic time synchronization.
  • Turn off the screen saver, set the background to none, and make sure Windows Classic is selected for the theme.

In the registry, this tweak really decreases disk access in your VM:

  • HKLM\System\CurrentControlSet\Control\FileSystem
    Add a new DWORD named NtfsDisableLastAccessUpdate and set it to 1.

I also disable the following services:

  • Automatic Updates
  • Error Reporting Service
  • Help and Support
  • Windows Time
  • Wireless Configuration

Remove the following files:

  • All the $whatever$ directories in C:\Windows except for the $hf_mig$ directory.

Add Operating System Components

  • Use Add/Remove Programs, and select the Add/Remove Windows Components option.
  • Add IIS (including ASP.NET support)
  • Add Message Queueing (if you plan to use it)
  • Remove Enhanced Internet Explorer Security
  • Install any extra fonts you use for development, such a Consolas.

It’s probably a good idea to run Windows Update again after adding these features since they’ve likely been patched.

Back Up Your New VM

Now that we have a nice clean system, I recommend you shut down the VM and make a backup copy. Simple copy the Documents/Virtual Machines/YourVMName to an external drive so you can easily create new VMs without doing the Windows install again. If you do so, I recommend using SysPrep to reseal the operating system so all new SIDs are created. Do not make a backup for the purpose of closing after installing SQL Server 2005 since it goes crazy if you change the machine name after it is installed.

Software Installation

I recommend installing Visual Studio 2005, followed by SQL Server 2005. For Visual Studio, if you aren’t going to do any Smart Device programming, I highly recommend you uncheck all those packages from the installer. I would also choose not to install Visual J# for obvious reasons. Once the install is complete, be sure to run it at least once. Then install SQL Server 2005 (running as Local System when asked). If you don’t care about SQL 2000 support, don’t bother with the compatibility sort orders and just pick Latin from the top. Once both are installed, go ahead and install VS2005 Service Pack 1 and SQL Server 2005 Service Pack 2.

At this point, you have a pretty basic system with the needed applications. If you’re going to do any work on open source projects, you will need Subversion, TortoiseSVN, and NAnt. Many recommend VisualSVN, but I have never used it so I can’t comment but I’ve heard good things. When downloading applications to install, I recommend pulling them down using Safari into your Downloads folder. Then in your VM, go to the “on my Mac” share and run the installers from your shared folder. I never download anything inside the VM unless I absolutely know it can be trusted (which is pretty much never).

You will notice that I didn’t install any “fearware” such as virus or spyware tools. That’s my style, I don’t really care to slow down my system with things of that nature. I maintain a tight VM and rarely introduce anything from the outside so it’s my choice. Your mileage may vary.

And before I write another word, you should install Resharper and start on your path to becoming a Resharper Jedi.

Wrap Up

I hope this post has been helpful for those looking to setup a development VM. I’ve found that using Leopard OS X for everything but development to be a pleasure compared to the applications available for Windows.

FTP Editing with TextMate using Cyberduck on Leopard

While I spend most of mine developing applications with .NET in Visual Studio 2005, there are times when I want to tweak a site built in PHP/MySQL. Since all my sites are hosted on GoDaddy, I don’t have SSH access into the server. This leaves FTP as the sole choice for editing remote content. While a solid practice would be to have a local development environment to text changes, it’s a blog, and it’s just not that important to me if I make a quick mistake. Plus, sometimes you’re dealing with Authorize.NET or PayPal, or FedEx, or another cart-based solution that requires cURL through a proxy.

For editing remote files, I use Cyberduck and TextMate on OSX. Cyberduck handles the FTP interface nicely with a finder-like interface. A quick click and you’re editing the remote file in TextMate. Make your change and save and Cyberduck automatically updates the file on the server. Or at least it did with Tiger.

It seems that some things broke with Leopard in how file update notifications are handled with Cyberduck. If you try to update using the built-in software update, you won’t get anything newer than 2.8 — which doesn’t have the fix. So if you’re using Leopard, you can get this functionality back by installing a nightly build of Cyberduck. It’s a quick install (simply copy to the Applications folder) and you’re back up and running. Do yourself a favor at the same time and turn off the Growl notifications for connection/disconnection to avoid some on-screen spam when saving the file.

Mac Family Expands to Two

In a shocking turn of events my wife, having reached a breaking point with her 1-year old Dell laptop, decided to accept a new 20″ iMac as a replacement. My MacBook Pro, having been the lone AppleTalker on the network, welcomed the new addition with a heartfelt “BonJour!” It turns out that the new member of the family sports the same 2.4 GHz CPU as the MacBook Pro, but came up slightly short on RAM. Nothing a quick trip to NewEgg couldn’t fix with the addition of an extra 2GB stick to bring the total up to three.

Out of the box the machine handled like a Tiger, but within an hour had advanced with Leopard like reflexes. Moments later, the new machine reached out to the new .mac account to synchronize all her settings with the interwebs. The MacBook pro, sensing the desire to share information, enabled his fast user switching to allow easy selection of user accounts. On either machine, my wife and I can quickly jump to our account and have our settings immediately available (mail accounts, bookmarks, keychain of web site passwords, etc.). This should make travel nice, since we’ll also be able to jump Back to Her Mac while away if we need to snag any pictures for the family.

The road has been pretty trouble free so far. A slight configuration problem with IMAP on Gmail caused Mail to dump out some nasty remarks, but tweaking the settings on the server made all happy again.

At the same time, I threw a Lacie Ethernet Big Disk (1TB) on the network to store all of our shared files (over 280 GB of lossless audio and movie files), plus at least another 100GB of photos, plus back of files of tons more stuff. This should allow me to reduce the footprint of the single remaining Windows machine significantly. I’m thinking very soon a Mac Mini running Leopard OSX Server might be joining the household to round out the remaining slot.

Now to reformat the old laptop and get it up on eBay…