Posts Tagged ‘osx’

Ubuntu as an OS X TimeMachine server

August 19th, 2012

One of the best features of Mac OS X is TimeMachine, a ridiculously easy to use backup system. The downside to TimeMachine is you either have to use an external hard drive or buy Apple’s TimeCapsule backup hardware.

Turns out there’s a third option — use a Linux PC as your backup server.

With Ubuntu Linux 12.04, I highly recommend following this guide, which explains the safest route. Keep in mind it’s completely unsupported by Apple, of course, so if your backups are overwritten with My Little Pony pictures, don’t go complaining to the Genuis Bar.

A couple notes on the guide:

  • Most users can safely ignore the part about Shorewall settings.
  • The guide glosses over user-level security. You could use your normal user account for backups, but you should consider setting up a special user account just for TimeMachine. That way if someone hacks into your Mac, they’ll only have access to your backups and not your entire Linux PC.

How I fixed my broken wifi after the Mac OS X 10.6.4 update

September 16th, 2010

Yesterday I grudgingly let Software Update reboot my computer to install Mac OS 10.6.4. After it booted up, the wifi was dead.:(

Now my first thought the router wasn’t working, but my iPhone and my other laptop were still connecting just fine.

I looked in the network settings and found the IP address was invalid. It appeared to be a global network address, not a 192.168.0.* address for my internal network. How puzzling.

After some Googling around, I found several “fixes” which did nothing, including holding down Option-Command-P-R while the system boots to clear the configuration, deleting a network config file, removing and re-adding the Airport connection… nothing. Just a waste of time.

Finally I figured out a working solution on my own. The problem turned out to be DHCP. See, normally DHCP is the protocol that assigns an IP address to your computer. Without it, you’d have to enter the address manually.

Here’s what I did:

  1. From the wifi icon, at the top of the screen, select “Open Network Preferences.”
  2. Select Airport from the list and click the Advanced button.
  3. Select the TCP/IP tab
  4. In the “Configure IPv4” drop-down, select “Using DHCP with manual address”
  5. The “IPv4 address” box becomes available. Here’s where you enter an address. (See below)
  6. Disable Airport, then turn it back on.

If you’re wondering, the IP address you enter will depend on your configuration. I entered and there’s a good chance that if you have fewer than 7 other computers on your network, that will work for you as well. This part may take some experimenting and knowledge of your router’s typical assigned IP addresses.

C/C++ with Eclipse Galileo on Mac OS 10.6

September 13th, 2009

Getting Eclipse to compile your C/C++ applications on Linux has always been a breeze.  On Windows, it’s always been hell.  And on Mac, it’s somewhere in between.

Here’s what you need to get started:

Your Mac OS install DVD has a few optional components that aren’t part of the standard installation.  One of these is XCode, which is Apple’s wonky IDE.  It comes with the GNU toolchain, which is exactly what you’ll need.  If you’ve installed the right thing, you should be able to open a new terminal window (note: a NEW terminal window) and run “gcc”.  If it’s installed, it will return with something like “gcc: no input files.”  Which is true — you didn’t give it any input files.

Now onto the next problem.  Eclipse’s C/C++ Development Tools (CDT) plugin doesn’t work with 64-bit binaries without some significant tweaks because it won’t recognize the binary as a valid application. And on Snow Leopard, GCC compiles 64-bit by default.  Damn!

There’s two workarounds for this, use whichever one suits you best (but not both!):

  1. Switch back to 32 bit binaries. In each project, right click and select Properties, and open the C/C++ Build section, and click settings.  Under MacOS X C++ Linker, click Miscellaneious.  There’s three text fields; in the one that just says Linker flags, add “-arch i386” (without the quotes).  Then go to the GCC C++ Compiler section, hit Miscellaneous, and add the same text to the Other flags box.  Now you just need to do a clean build, and you should be good to go.
  2. Don’t use the Run dialog.  You can use the Run External command to run the 64-bit executable.  This can be somewhat annoying if you have several build options, or you like changing the name of your project.  But it works.

Remember, you only need to make ONE of the above changes. Don’t make both!

Hopefully this helped someone out there.  And even more hopefully, this will be fixed in the next verison of Eclipse.

Update: forgot the “i” in “i386” and added emphasis about only making one of the two changes.