Archive for June, 2008

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)

Xmgrace landscape plots to landscape PDFs

This is a howto provided to me really kindly by my workmate Gisela. She wanted to transform an [[Encapsulated PostScript|EPS]] file obtained with [[Grace (plotting tool)|Xmgrace]] to PDF, but the landscape/portrait properties were messing around.

The setup is the following: we produce a landscape plot with Xmgrace, and save it as EPS. Then we want to convert it to PDF, but keeping its landscape nature. The problem is trickier that it sounds.

We need (all available at the repositories of most Linux distros):

  • Xmgrace
  • [[ImageMagick]]
  • ps2pdf

Steps to Sucess(tm), assuming an A4 paper size:

  1. In Xmgrace, go to Page setup, and choose A4
  2. Print the plot (whithin Xmgrace) to EPS format (fileL.eps)
  3. Rotate to portrait typing the following from a terminal:
    % convert fileL.eps -rotate "+90>" fileP.eps
    The greater than sign after the 90 meaning “rotate only if infile is landscape”.
  4. Convert to PDF:
    % ps2pdf -sPAPERSIZE=a4 fileP.eps
    (for Letter size, omit the “sPAPERSIZE” option)
  5. Rotate the PDF back to landscape:
    % convert fileP.pdf -rotate "-90<" fileL.pdf

That’s it.

Comments

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)