Displaying 2 posts tagged with 'osx'

Macworld Announcements

So today Steve Jobs took to the stage to deliver one of his customary 'Stevenotes' at the Macworld Expo, and now everyone (myself included, admittedly) is salivating over the Apple TV and the iPhone. While these two announcements certainly are good news, what interested me was the information Apple didn't make available.

Starting with the Apple TV, a couple of questions spring to mind:

  • What Intel CPU does it use?
    The Tech specs page for the Apple TV claims it uses an Intel processor, but it declines to reveal exactly which model it uses. Arguably, it's not really important, because the device runs a specific set of programs and performs a limited number of tasks, so the speed of the chip isn't relevant as long as it can do these things fast enough. Nevertheless, it's curious that we're left none the wiser. Maybe OS X is now running on a 3rd architecture, one now shared between the Apple TV and the iPhone.
  • What OS does it run?
    After all the emphasis placed on the iPhone running OS X, it's odd that there's no mention of the platform in use on the Apple TV. At a guess I'd say it's a stripped-down OS X similar to that employed by the iPhone.
  • Can it run 3rd party applications?
    Will we see custom programs on the device at some point in the future? Judging by how Apple have handled games on the iPod, it's unlikely, but it could happen. How long until we see Linux on it? :)

The iPhone looks like an amazing piece of kit, but there were a few things missing from the announcement:

  • Real system specs
    How much RAM does this thing have? What processor does it use? What about the 3D capabilities? Judging by the shiny graphics and the fact that it's got Cover Flow, it's clearly got some kind of 3D acceleration.
  • What does 'Operating System: OS X' actually mean?
    So we've been told that the iPhone runs OS X, but how much OS X functionality does it actually have? Obviously the interface is very different from the familiar face of OS X that we've seen on notebooks and desktops previously, but what about under the hood? Does it still have the BSD subsystem? Are all the applications we've seen built with Cocoa?
  • Does it run custom applications?
    For me, this is the big one. If this thing is anywhere near as capable of running user-developed applications as Macs and Windows Mobile-powered Pocket PCs and smartphones, it's going to cause me to run out into the street and fall to the floor screaming with glee. I've not (yet) used Xcode for any serious development, but my experience with it so far has been extremely pleasant.
    Visual Studio, for all its faults, does provide a seamless platform for developing and deploying mobile applications on .NET PDAs. The prospect of being able to develop for the iPhone in Xcode and use Cocoa and all its shiny bits is something that really appeals to me, and I'd make the switch from Visual Studio in a heartbeat.
  • Why no 3G?
    Maybe the 3G revolution really hasn't arrived here or in the USA yet, but considering the emphasis placed on internet access on this phone, I'm surprised that it doesn't have a faster connection. On the other hand, I don't know an awful lot about mobile phone networks, so perhaps this point is irrelevant.

I'm sure I had more points to add to this, but I just started watching the keynote stream and now I'm getting distracted...

Overall, I'm damn excited about the iPhone, and as soon as it's released over here (and I can actually afford the damn thing), I'm going to grab one.

date: Tue Jan 9 22:47:17 2007 | permalink | tags: osx iphone

Apache 2.2 and mod_python on OS X

While working on a forthcoming project (watch this space...), I decided it'd be a lot easier to test the code on my local machine rather than SUCS's server.

Tiger (yes, I'm a Mac user these days) comes with Apache 1.3, which is rather outdated, so I looked into updating to a more recent release. Fink has Apache 2.0, but I decided to go all-out and try and get Apache 2.2 running. It turned out to be relatively easy.

Here's my setup:

First of all, we need to get Apache compiled and installed.

$ wget http://www.mirror.ac.uk/mirror/ftp.apache.org/httpd/httpd-2.2.3.tar.gz
$ tar zxf httpd-2.2.3.tar.gz
$ cd httpd-2.2.3
$ ./configure --with-mpm=worker --enable-so
$ make
$ sudo make install

That should install Apache into /usr/local/apache2.

Next, download and compile mod_python:

$ wget http://www.mirrorservice.org/sites/ftp.apache.org/httpd/modpython/mod_python-3.2.10.tgz
$ tar zxf mod_python-3.2.10.tgz
$ cd mod_python-3.2.10
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/bin/python
$ make
$ sudo make install

That'll build mod_python and put the appropriate files in /usr/local/apache2/modules.

Configuring our newly-compiled Apache to replace OS X's default one is easy enough - a few changes to /usr/local/apache2/conf/httpd.conf and extra/httpd-userdir.conf is all it takes. Download an archive with all the necessary patch files here. Note - these configuration changes don't cause Apache 2 to behave exactly like Tiger's Apache 1.3, and there may be parts I've overlooked that could be exploited.

To apply the patches, run the following as root (from the directory with the extracted contents of the archive):

# patch /usr/local/apache2/conf/httpd.conf httpd.conf.patch
# cp httpd-userdir.conf /usr/local/apache2/conf/extra/.

By now, you should have a working Apache 2 setup on your Mac, but how can we make it start at boot? This is relatively easy - we can use /Library/StartupItems to accomplish this. The zip file contains the files you need to put in this directory to automate Apache's startup.

Unzip the archive and then cp -r Apache2 /Library/StartupItems/. as root.

That's it! To get the server started, you can run sudo /sbin/SystemStarter start "Web Server" and then browse to http://localhost/ to test your new Apache installation! And then, of course, you can dive into the world of Python.

Update - 26th Jan '07: I had cause to reinstall Apache on a new machine, and the above instructions work perfectly with Apache 2.2.4, mod_python 3.3.0b and Python 2.5. The only change required, apart from the differences in filenames, is to change /usr/local/bin/python to /usr/local/bin/python2.5 on the configure line of the mod_python build stage.

date: Wed Aug 16 22:00:52 2006 | permalink | tags: osx python howto