Sunday, February 04, 2007

Ubuntu on Intel iMac: First Thoughts

I've finally got around to installing Ubuntu Edgy on the iMac. Almost everything is working, the notable exception being audio. I've even managed to get XGL/Beryl running, which really spices up the desktop. In fact, I've never seen so much eye candy before, on any OS!

After a few minutes of apt-get installing, browsing, some svn checkouts etc... I started to notice something. This machine is _fast_. The whole user experience is so snappy that I can't feel any lag in the interface, even with some crazy Beryl effects enabled. (I love the burn effect, with maximum particles :-) It makes me wonder... what is OSX doing to make such a powerful machine run like treacle? The Dashboard? Spotlight?

One thing I miss already from my OSX setup, is the way MacPython installs packages into my home folder, rather than the usual /lib/python I've gotten used to. I'm sure there is a way to make this happen in Ubuntu. Anyone got any tips?

UPDATE:
I installed KDE for a laugh, and the audio started working. I loaded Gnome, the audio stayed working. I guess some system setting got tickled during the apt-get operations.

3 comments:

Chris Arndt said...

Packages that come with a setup.py, can always be installed with the --home option, that will install things into ~/lib/python. You would need to set the PYTHONPATH variable to include ~/lib/python then to make this work. Setting per-user environment variables, so that they are present in the whole user session (not only in a bash in a terminal window) is a non-trivial task on Ubuntu, but you can set it easily system-wide in /etc/environment.

You can also have a ~/.pydistutils.cfg that sets the installation destination. Mine looks like:

[install]
prefix=/usr/local

[easy_install]
site-dirs=/usr/local/lib/python2.4/site-packages

This would install third-party packages, which are installed with 'setup.py install' or with 'easy_install pkg' into /usr/local/lib/python2.4/site-packages.

But there is also another way: whenever I want to set up a clean environment for a Python application that has only the packages installed that it needs, I create one with workingenv.py. You can find it in the Cheeseshop (http://python.org/pypi/workingenv.py).

It's really easy and works like a breeze!

Chris

glyph said...

Divmod's "Combinator" can do something like this, and although it should be switched to use the .pydistutils.cfg file (the way combinator interacts with 'setup.py install' is a dirty hack) it also sets up your PATH and PYTHONPATH to point to a standard home-directory installation location (~/.local) as well as a set of other paths, so you can use SVN checkouts of multiple simultaneous Python projects and they will all automatically show up in your path without having to be installed.

Anonymous said...

> I installed KDE for a laugh

It's good it amused you. Now, if you keep using it, you'll continue laughing, but for different reasons.

Popular Posts