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)

Microsoft se pasa al humor

Pedazo de noticia que he leído vía EmpresaDigitala.net. Según esta, Microsoft apuesta por la seguridad para diferenciarse del software libre.

¡Oh, sorpresa! MS, la empresa que produce el ubícuo sistema operativo Windows, tan conocido por su invulnerabilidad ante ataques de software malicioso y su práctica ausencia de bugs y errores, ha decidido seguir por el camino de la perfección que la caracteriza, para diferenciarse del software libre, que tantos agujeros de seguridad sabemos que tiene, y cuyos bugs sabemos que se tardan tanto en solucionar. ¡Menos mal! Estoy ya harto de los virus y troyanos en mi Debian. Es que cada vez que me mandan un e-mail tengo miedo de abrirlo, no sea que se me infecte el ordenador. Además el antivirus que tengo todo el tiempo corriendo en segundo plano me come muchos recursos, y no puedo trabajar a gusto. ¡Ojalá pueda pasarme a Windows, y olvidarme de todo este rollo del [[malware]]!

¡Venga ya!

Comments (3)

Another command line vs. GUI round

I am facing, right now, a task that is paradigmatic of when a GUI ([[Graphical user interface]]) would be preferable over a [[command line interface]]: cropping a picture to extract a fragment (a face in a bigger picture, more precisely).

One would, of course, open [[GIMP]], select the area to cut, then “save as”, e voilà! Sort of. First, starting GIMP is not incredibly fast. Then, you have to:

  1. Select the “Selection” tool (with the mouse! That’s so slow)
  2. Use the tool to select the region (with the mouse!)
  3. Open the “Edit” menu (right click)
  4. Choose “Copy” (with the mouse!)
  5. Open the menu again, and choose “Paste selection as new” (with the… you get it)
  6. Go to the newly opened picture, then “Save as”
  7. Introduce name
  8. Accept in the “Export” menu, when prompted about some transparency thingie
  9. Choose some JPG parameters, like quality
  10. Close GIMP

Of course, if you don’t like the result, you have to repeat everything. Then you will realize that the resulting file is too big, and will use [[ImageMagick]] to reduce it.

After doing the above, y resorted to convert, the tool of the [[ImageMagick]] suite that has save my *ss more times than I can count.

With convert, you write a (apparently cryptic and complex) command line once, and then you can reuse it. Cropping a region of an image blindly seems highly problematic, but it isn’t. You just choose a width, height and (x,y) position of top corner and run. If the result is too wide or whatever, you just rerun the command (hitting once the “up” arrow of the keyboard to rescue the last command, then modify at will).

The command line I am using:

convert source_image -crop WxH+x+y cropped_image && display -resize 50% cropped_image

After just a couple of runs (modifying W, H, x and y depending on the previous run), I obtained the desired result.

Comments

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

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