Making iSight camera work in Ubuntu

As I said in a previous post, I bought a [[MacBook]], and I am making all bits work correctly. Out-of-the-box support from Ubuntu (the only GNU/Linux I tried on the MacBook so far) is excellent, but some things (camera, WiFi…) need proprietary drivers, so some more tweaks are needed.

I have followed the instructions in the Ubuntu community site, as with the procedures detailed in the previous post.

Basically, it all boils down to:

Fetch the Apple drivers for the camera

As root (if, unlike me, you like sudo, then run the following as user, but prepended with sudo), mount the Mac OSX partition (you didn’t delete it, right?) and copy the relevant file somewhere else (the cp command should be all in one line):

# cd
# mkdir /mnt/macosx
# mount /dev/sda2 /mnt/macosx
# cp /mnt/macosx/System/Library/Extensions/
     IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/
     Contents/MacOS/AppleUSBVideoSupport .
# umount /mnt/macosx

You might have noticed that the Mac OSX partition is not sda1, but sda2. Don’t ask me. It turns out like this after following my own installation instructions. Apple must have decided to install the OS in the second partition for some reason.

Install the required packages

We need a package called isight-firmware-tools. Unfortunately it is not present in the Hardy repos at the moment (it was in the Gutsy ones, I think). You can add a Launchpad repo, editing /etc/apt/sources.list to add:

deb http://ppa.launchpad.net/mactel-support/ubuntu hardy main
deb-src http://ppa.launchpad.net/mactel-support/ubuntu hardy main

Then, as root:

# aptitude update
# aptitude install isight-firmware-tools

You will be prompted for a path to the driver you copied before. You can press Enter without paying much attention, then execute (assuming you copied the driver to your root home):

# cd
# ift-extract -a ./AppleUSBVideoSupport

To activate the driver, restart [[HAL (software)|HAL]]:

# /etc/init.d/hal restart

Test it with [[Ekiga]]

As explained in the Ubuntu community site, you can run Ekiga as user (after installing the ekiga package). Choose V4L2 as video plugin, and Built-in iSight should appear among the Input device list. If it does, the process worked.

Comments (22)

Installing Ubuntu Hardy Heron on a MacBook

Yes, dear reader, I committed the heresy of purchasing an Apple [[MacBook]]. I obviously didn’t do it for MacOS X, for which I couldn’t care less, but for the hardware, which is quite good. I was looking for a laptop as small as possible, keeping price low (it cost 799 eur), and screen not too small (this one has a 13″ one. Maybe even 12″ is acceptable. 13″ sure is).

You can see some pictures of it at my MacBook gallery.

If you, like me, are used to PCs, then there are a few things to note:

  • It has a different layout in the keyboard. Most prominently, some keys are missing: Del, PgUp, PgDn, Home, End. Some others (Win key, AltGr) have substitutes that can be mapped. Also the equivalent to AltGr and right Ctrl are kind of swapped: the key closest to the SpaceBar is right “cmd” (could be right Ctrl), and the farthest one is left “alt” (could be AltGr)
  • The [[touchpad]] has a single button, and tapping on it won’t click. There is no zone on it to use as vertical scroll, either. Luckily the latter can be fixed via software, so that in Ubuntu the touchpad does behave correctly: you can tap-click, and you can scroll with a smooth movement of a finger. The single-button issue is not present in USB mice: they work “normally”.

I would like to outline here the process of installing Ubuntu (Hardy Heron) in this machine. For that, I recommend reading (as I did), the following links:

Repartition of the hard disk

My Mac came with 120 GB (109 real) of HD, all of it devoted to OS X. Unfortunately, the Ubuntu installer can not cope with resizing of [[HFS Plus|HFS+]] partitions. Fortunately, OS X itself can. You can make use of [[Boot Camp (software)|Boot Camp]] as follows: go to Go->Utilities->Boot Camp Assistant. There you can (should) reduce the existing HFS+ partition to the bare minimum (in my machine it was 22GB, because OSX already uses 17GB, and it won’t accept less than 5GB of free disk). Leave the rest unassigned, and quit.

Installation of multi-boot system

The first hurdle in our Linux installation is that the Mac machines do not have a “normal” [[BIOS]]. The BIOS is important for Linux/Windows installations, so this is a drawback. Macs come with a thingie called [[Extensible Firmware Interface]] (EFI), instead. However, there is a nice little tool called rEFIt that can help us with it.

To install rEFIt, you can follow the instructions at its Sourceforge site. I followed the Automatic Installation with the Installer Package instructions. Basically I downloaded the Mac disk image from the download page, opened in the Mac OSX file browser, double-clicked it to open it, then double-clicked on the rEFIt.mpkg file inside, and followed the instructions.

This will make the rEFIt menu appear in the next reboot, but only if you hold some key while booting (I think it’s “C”). If you want the menu to always appear, do the following in a terminal, inside Mac OSX:

% cd /efi/refit
% ./enable-always.sh

Installation of Linux OS

After doing the above, you should reboot with an Ubuntu installation CD inserted. If the EFI installation was correct, you will be presented with the rEFIt menu, in which you will have two big icons (OSX and the Linux CD), and five small ones below (“Start EFI Shell”, “Start Partitioning Tool”, “About rEFIt”, “Shut down computer” and “Restart computer”).

Use the left-rigth arrow keys to select the Ubuntu CD, and press Enter. At that moment, or after installing Ubuntu (I don’t recall), the computer could complain saying: “No bootable device — insert boot disk and press any key”. If so, reboot and, in the aforementioned rEFIt menu, choose the second small icon, “Start Partitioning Tool”. This tool will prompt you to update the [[Master boot record|MBR]]. Accept, and let it do its magic.

When booting with the CD, you will have the option to make an absolutely normal Ubuntu installation. The Ubuntu MacBook page says that Boot Camp will complain if you make more than two partitions in total. It will, but for me this is ridiculous, since OSX is already eating up one. There’s no way I will install any Linux in a single partition (withouth even swap!). If you do not care about opening Boot Camp ever again (I don’t), do a totally normal install. I created two 8.5GB partitions for / (one for Ubuntu, another one unused for the future), a 750MB swap partition, and the rest (73GB) as /home (potentially shared among the two Linux I could install).

After the installation, reboot and you will find the aforementioned rEFIt menu. Choosing the penguin icon on the right side will take you to the [[GNU GRUB|GRUB]] screen you probably are accustomed to. What this means is that you have to go through two boot menus when booting, but that’s a minor issue, I think. The first menu is an EFI menu, in which you choose OSX or GRUB. The second one is the GRUB menu that lets you choose among different installed kernels.

And I think that’s it…

I will keep on writing when I have time, at least about how to make WiFi work, and also how to configure [[Compiz Fusion]]. Yes, the X3100 graphics chip that the MacBooks carry is blacklisted, as not working with CF. But, believe me, it does work!

Comments (6)

LWD update

This is a (in principle, monthly) update to my “Linux World Domination” project. You can read the intro in this May 2008 post.

The data presented is different from the one in the aforementioned post:

  • Mac is dropped from it
  • Predictor@home is also dropped
  • Two projects have been added: POEM and Spinhenge
  • D2D means “days to domination”. The expected time for Windows/Linux shares to cross, counting from Feb 3, 2008.
  • DD2D means difference (increase/decrease) in D2D, with respect to last report (a month ago)
Project D2D DD2D Confidence %
Einstein 185.1 21.8
MalariaControl 829.9 -1.1 15.5
POEM never
QMC 1961.7 +122.7 6.1
Rosetta 1301.7 3.8
SETI 4196.5 -370.5 2.9
Spinhenge

Except for QMC@home, all the projects have reduced the D2D. Rosetta and Einstein were expected to never lead to LWD, and now they are.

See you next month!

Comments

Gmail and browser discrimination

Due to [[Mozilla software rebranding|Iceweasel]] (Firefox) being so slow on my machine, I switched to [[Konqueror]], which is reasonably fast and full of features, but nowhere as good as Iceweasel, I must say. However, IW is unbearable, so I’m waiting for FF 3.0 to use IW again.

I use an [[e-mail client]] to read my e-mail over [[IMAP]], my main account being a [[Gmail]] one. However, I sometimes visit the Gmail site, for example to set it to fetch e-mail from some other accounts. I had always done it with IW, and everything worked fine, but now with Konqueror it doesn’t.

With Konqueror I get the message:

and some features are missing (specifically, the option set how to fetch e-mail from other accounts, and some others).

I could understand it if Konqueror were missing some functionality/plugin that IW has and Gmail requires. But it is not the case. I can tell Konqueror to identify itself as Firefox, and THEN the Gmail page shows up correctly, so obviously it’s not due to Konqueror’s limitations. It sounds like a case of sloppy programming from the guys at Google, with something like:

if browser is one of 'IE', 'Firefox', 'Safari':
  show this page
else:
  show dumbed down page

After years of discrimination to non-IE users, and a tremendous fight to make webmasters produce standards-compliant sites, instead of specific browser-compliant ones, we still have to suffer this shit. And from Google, the “don’t be evil” guys, supporters of free software and all that BS.

By the way, this issue is known, and mentioned, for example, in the Wikipedia page for Gmail.

Comments (5)

Linux e-mail clients rant

I am really disappointed at the [[e-mail client|MUA]] offer I am finding for by Debian box. I have tried [[KMail]], [[Mozilla Thunderbird|Thunderbird]], [[Evolution (software)|Evolution]] and [[Claws Mail]], and all of them fail at some point. All four errors are different, and all of them almost total showstoppers.

Note: I access my e-mail through Gmail [[IMAP]]. I don’t really care if these MUAs are good at [[POP3]] or whatever. I want good IMAP.

KMail 1.9.9

The [[GUI]] is nice, has all features I want, everything OK… It’s just that browsing the remote folders is hopelessly slow. I can brush my teeth in the time it takes to delete a message, and I don’t want to go into what I can do in the time it takes to move a message from one folder to another one.

Apparently this could be fixed in KMail2, which will come with KDE4. The problem is that I want it fixed now.

Thunderbird 2.0.0.14

This one is also very good in general. Actually, its problem is not due to itself. Its probably due to some bad interaction with [[X.org]] or something: everything works fine, but starting up and subsequent rendering/deleting of the window itself is really slow. If I minimize and maximize it back, it takes ages to reappear. I have this problem with TB and Firefox (actually Icedove and Iceweasel in Debian), and with no other program.

Evolution 2.22

Again, almost everything is fine. Almost. The single problem is that if the “To” and/or “From” fields in the message list contain non-ASCII characters, they appear garbled. Nowhere else does this happen. Even other fields, such as “Subject” can contain accents or ñ with no problem, as can the text body.

This would be a cosmetic issue I could live with, but there are two problems I can not tolerate: I do not want these errors to appear in the messages I send when replying to garbled messages, and more importantly, I have sometimes had recipient lists containing non-ASCII characters mangled. I don’t want to click “Reply all” and end up sending the message to only 3 of the 10 recipients.

This problem will supposedly be fixed in version 2.23.

Claws-mail 3.4.0

Again and again, almost everthing is right. Now messages can contain non-ASCII chars anywhere, browsing folders is fast, manipulating/drawing/erasing the program window is fast… BUT, replying to a message, regardless of the settings one chooses, does not include the original message quoted. This seems a minor error. It isn’t.

The thing that bugs me most is that I can not understand how these problems happen with [[free software]] packages. If you take KMail, Evolution and Claws, each one has a single error that the other two have already fixed… Couldn’t they just copy each other? That is precisely the whole point of free software.

Couldn’t KMail browse/scan/manipulate the IMAP folders with the efficient method Evolution and/or Claws use?

Couldn’t Evolution display the message fields with the error-free method KMail and Claws use?

Couldn’t Claws quote the original message as anyone else in the Universe does?

If only the three errors where not spread among the three MUAs, there would be one that I could use!

Comments (14)

A hurdle in the instalation of Ubuntu Hardy Heron

I decided to give a try to Ubuntu Hardy Heron, and installed the [[amd64]] version of it in my laptop.

My gripe is caused by a really annoying issue with the installation in a multiboot system. I have a laptop with four root partitions (Windows, Debian, Fedora and Ubuntu), and obviously [[GRUB]] generates the menu that allows me to choose at boot time. The file that GRUB reads is /root/grub/menu.lst, at /dev/sda5 (the Fedora partition, which was the last one).

The annoying issue I mention is that the installation is absolutely smooth but a [[bootloader]] is not installer. What this means is that when I reboot the computer after installation, I always get the old GRUB menu, and the new OS does not appear in the list.

The only solution I found is to do the following:

  1. Do a normal install of Ubuntu, but do not reboot
  2. Open a console (after installation Ubuntu lauches a GNOME live session)
  3. Locate the kernel and initrd images I need. They are, respectively: /target/boot/vmlinuz-2.6.24-16-generic and /target/boot/initrd-img-2.6.24-16-generic.bak
  4. Mount /dev/sda5 into /mnt/root3
  5. Edit /mnt/root3/boot/grub/menu.lst (the old GRUB menu), and add the lines:
  6. title --------- Ubuntu 8.04 TLS Hardy Heron - sda6 ----------
    root

    title Ubuntu Hardy Heron - kernel 2.6.24
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.24-16-generic root=/dev/sda6 ro quiet splash
    initrd /boot/initrd.img-2.6.24-16-generic.bak
    boot

  7. Reboot

After that, the new Ubuntu appears in the GRUB list.

The procedure is not incredibly difficult, but for a beginner it would be a major showstopper. And, in any case, it is a really sad error.

Comments (3)

Application of the week: Evolution

Around 1 month ago I said I had made the switch from KMail to Thunderbird for managing e-mail. Well, now I must confess I am making another switch, this time to Evolution, the native [[e-mail client]] for [[GNOME]].

The main (sole) reason is that [[Icedove]] (Thunderbird) was unreasonably slow lately. Maybe it’s a matter of versions (I’m running the latest in Debian Lenny), but it was driving me crazy. And so is [[Iceweasel]] (Firefox), but that’s another story. Evolution seems to be as fast as KMail to start up/minimize/maximize/quit, and as fast as Icedove to manage the [[IMAP]] folders (something KMail was seriously lacking).

Comments (3)

How much left for GNU/Linux World domination?

Remember Project BHS? It is an effort I am making to log the evolution of Windows/Linux/Mac/Other market share, via the respective contributions to [[BOINC]] projects.

I have taken a further (and very crude) step towards the estimation of when will the Beast from Redmond fall, by extrapolating the “Number of hosts vs. time” curves to the points of crossing. For that I have fitted the data so far to (very crude, I know) second order polynomials (with [[Xmgrace]]), and calculated the crossing points (with [[GNU Octave]]).

The results can be:

  1. Windows seems to go upwards and Linux/Mac downwards (will never cross)
  2. The crossing point is above 100% or below 0% market share: the extrapolation is unfit (will never cross)
  3. There is a crossing point and lies within 0-100% market share: that’s the World Domintion date!!

I will be posting data for different projects, along with a “confidence” percent. This value corresponds to the fraction of the total time required for Linux/Mac to overcome Windows (according to the present tendency) that is represented in the collected data. If 10-day data suggests that Linux will overcome Windows in 1000 days, then the result is not really very trustable. OTOH, 999-day data suggesting the same is compelling.

An important notice: expected times are not measured from “now”, but from the moment I started collecting data, on Feb 3, 2008 (3 months ago).

The following table illustrates the aforementioned data for some selected projects, with time in days and confidence percent in parenthesis.

Project Linux (%) Mac (%)
Rosetta never never
MalariaControl 831 (11.4) 1142 (8.3)
SETI 4579 (1.9) 3094 (2.8)
Einstein never never
QMC 1839 (4.64)
Predictor 1095 (1.03) never

As an example, the curve fits and corresponding crossing points are given in the following figure, for the case of SETI@Home. You can infer the limited trustability of the predictions from the tiny time extent of the data points used to extrapolate the curves. As time goes by, curves will be more and more trustable, so expect updates to this “project”.

seti_small

SETI@Home data (click to enlarge)

The software used to process the data is BHS, and can be found at my home page.

Comments (2)

Firefox 2 beats IE6 at my site

I regularly check the visit stats at this blog, and today is the first time that the browser with most accumulated visits is [[Mozilla Firefox|Firefox]] and not [[Internet Explorer]]. IE began ahead because some Chinese hacker(s) used the Windows XP/IE6 duo to try some nasty things at the site, and generated a lot of visits. After I banned these IPs, the visits from Firefox users have gone up steadily, and now the total visit stats are:

  1. Firefox 2 (33.5%)
  2. Internet Explorer 6 (32.6%)
  3. Firefox 1.0 (10.4%)
  4. IE 7 (4%)

Regarding OSes, [[Windows XP]] is still the most prominent one, with 53% of the visits, followed by generic Linux at 12.9%, then other versions of Windows and specific Linux distros.

Comments

My music collection hits 8000 songs

Following the “report” series started with my first summary of info about the music collection I listen to, I will update that info in this post.

The data (in parentheses the difference with respect to last report, 5 months ago).

Files

Total files        8073 (+1037)
  - Commercial     4987 (+522)
  - Jamendo        3001 (+468)
  - Other CC       31 (+0)
  - Other          54 (+47)
Total playtime     21d (+3d)
Disk usage         38GB (+6GB)
Artist count       1034 (+217)
Album count        738 (+120)
MP3 count          0 (+0)
OGG count          8073 (+1037)

Last.fm

Playcount           36279 (+10033)

Most played artists Joaquín Sabina - 2516 (+264)
                    The Beatles - 1228 (+245)
                    David TMX - 771 (+172)
                    Silvio Rodríguez - 745 (+119)
                    Fito & Fitipaldis - 622
                    Siniestro Total - 611 (+75)
                    Bad Religion - 573
                    La Polla Records - 537
                    Extremoduro - 443
                    Ska-P - 420

Most played songs   Cuando aparezca el petróleo (E. Sánchez) - 56 (+14)
                    La del pirata cojo (J. Sabina) - 52 (+5)
                    Conductores suicidas (J. Sabina) - 48 (+2)
                    Tirado en la calle (E. Sánchez) - 46
                    Y sin embargo (J. Sabina) - 45 (+5)
                    Pacto entre caballeros (J. Sabina) - 45 (+3)

Amarok

Playcount         25596 (+7410)

Favorite artists  Ska-P - 95.08%
                  Leihotikan - 94.39%
                  Rafael Caballero - 94.30%
                  Su ta Gar - 94.10% (+2.24)
                  NanowaR - 94.02%
                  Simon and Garfunkel - 93.84%
                  Juan Luis Guerra - 93.65% (+0.8)
                  La Caja Negra - 93.57% (+1.93)
                  Peiremans - 93.48% (+1.52)

Favorite songs    You shook me all night long (AC/DC) - 99%
                  Km 0 (I. Serrano) - 98%
                  Salir (Extremoduro) - 98%
                  1st movement of Winter (A. Vivaldi) - 98%
                  Torn (N. Imbruglia) - 98%
                  Total eclipse of the heart (B. Tyler) - 98%
                  Todos los segundos cuentan (La Caja Negra) - 98%
                  Fiesta pagana (Mägo de Oz) - 98%
                  New America (Bad Religion) - 98%
                  Las cuatro y diez (L.E. Aute and S. Rodríguez) - 98%
                  Soldadito marinero (Fito & Fitipaldis) - 98%
                  Cuando aparezca el petróleo (E. Sánchez) - 98%
                  Jet pilot (System of a Down) - 98%
                  Tirado en la calle (E. Sánchez) - 98%

Comments

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »