Posts Tagged ‘mac’

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 192.168.0.8 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.

5 things Windows does right

June 6th, 2010

We’ve all heard a lot of bad news about Microsoft over the past decade, especially the past few years. Security problems, broken hardware drivers, annoying interface changes, confusing security features, etc.

It’s gotten to the point where it’s tough to think of anything good about Windows, aside from the fact that “it’s there” and there’s a lot of games for it.

But I see some good things about Windows where Microsoft has done the right thing, and done it consistently. Let’s look at those.

1. Backwards compatibility

Let’s say you’re running a business. You have a very important application that’s 20 years old, no longer supported, and there’s no budget to upgrade. What to do?

Well if it was written for Windows (or even Microsoft’s previous operating system, DOS) there’s a good chance it still works perfectly fine today. In fact, if it doesn’t require any special hardware, it’s basically guaranteed to work. This saves you a lot of money on hiring people to write a new application.

Backwards compatibility is a key feature of Windows. Even on a 64 bit Windows 7 machine, you can run applications designed for 32-bit Windows 2000 by design.

I’m not sure if it’s more strange that Microsoft considers this a mandatory feature, or that Linux and Apple don’t bother. There’s certainly no technical reason NOT to support old applications, so this is definitely something Windows gets right.

2. Forwards compatibility

With the latest Visual Studio you can still write applications for Windows 2000 out of the box. Although the underlying architecture of Windows has changed quite a bit over the years, the core APIs are binary compatible.

Sure, it takes some effort to avoid the convenient new APIs introduced in XP and Vista, but it’s by no means impossible.

3. Free Service Packs

Whereas Apple charges for small upgrades to the OS, Microsoft gives them away for free in the form of service packs. These upgrades are designed to change as little as possible under the hood, but bring in new features, new applications, and security updates.

And while some service packs have presented problems, Microsoft has usually been quick to fix these issues with incremental patches through Windows Update (aka Microsoft Update.)

4. Hardware drivers

Something most Windows users don’t even notice — when they work — is hardware drivers. Windows consistently ships with an amazing array of hardware drivers for just about everything. The major complaints tend to be printers and WiFi, where the manufacturer may need to supply something specific.

But this is one area where Windows really shines compared to the competition. On Linux, hardware drivers can be impossible to find or tricky to install. Linux users often encounter issues with graphics *cough* ATI *cough*. Apple avoids the problem entirely by shipping only custom hardware; an easy solution that bypasses the issue.

5. Multimedia and server in one OS

Linux is optimized for use as a server. Mac OS is optimized for multimedia.

But Windows? It does a pretty good job at both, out of the box, without (much) configuration. Somehow they’ve optimized the timing in the kernel to allow for both. This is not as trivial as it sounds.

Multimedia requires processing a rapid fire of tiny pieces of information. Servers require processing large chunks of information at unpredictable intervals. It’s not easy to adjust your timing to do both, but Windows pulls this off without a hitch.

Conclusion:

Windows isn’t all bad! Microsoft goes out of their way to make Windows a stable, consistent OS that runs a wide variety of applications. Keep this in mind next time a UAC prompt makes you want to put your fist through your monitor.

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.