May 18 2008

latex2html and UTF8 encoding

The last two days I have been fighting with latex2html. I am writing my books in LaTeX, in a Debian GNU/Linux machine. The .tex source file has UTF8 encoding, as has any new text file I create under Debian. One of the books it is written in Spanish, so there are a lot of accented characters:

á, é, í, ó, ú.

When I used pdflatex to generate a PDF document, all was ok, but when I tried to generate HTML with latex2html, the accented characters were generated as:

á, é, Ã, ó, ú

By the way the preamble of my .tex file was like this:


documentclass[10pt,letterpaper]{book}
usepackage[spanish]{babel}
usepackage[utf8x]{inputenc}
usepackage{makeidx}
author{Miguel Cobá}
title{Historias de Tristania}
begin{document}
maketitle
include{ch1}
end{document}

After a lot of research I finally could find the right invocation of latex2html to generate HTML correctly with accents:

latex2html -html_version 4.0,latin1,unicode book.tex

So, when using LaTeX to write something with accents, the encoding of the .tex files is UTF8 and want to generate HTML from the very same source .tex files, use the command above.


May 16 2008

The Debian OpenSSH problem grows bigger

It appears that the problem affects all the systems that are related to Debian.

From Erich Schubert’s blog:

Any Linux/Unix/*BSD system is vulnerable that grants access to a key that was generated on an affected Debian or Ubuntu system”

Well, sysadmins, time to work! :)


May 15 2008

Debian SSH/OpenSSL vulnerability fix

Today I updated the Debian GNU/Linux machines under my control in order to apply the fixes for DSA-1571 and DSA-1576.

I had to regenerate several keys in the servers but now it appears to be all safe again.

That was an error from a Debian package mantainer but, in spite of that, Debian remains my GNU/Linux distribution of choice.


Apr 20 2008

Linux kernel powered wireless card.

A bit of background first. Last year I got a new laptop (HP dv6420la). All worked fine, except for the wireless card. It is a BCM4312 rev 02. It only worked using ndiswrapper. This was acceptable, because in the end the important thing was that the tool (the laptop) worked. But I always had the feeling that it was not perfect. Besides, half the time it didn’t booted correctly because the wireless card didn’t initialized ok. This hanged the machine and the only solution was to cold reboot the laptop. Not very good for my files but that was the price to pay in order to have a working wireless card. All the time I follow the news on linuxwireless.org waiting for the time when native kernel support for my wireless card were incorporated to the mainline kernel. From time to time I installed new versions of the kernel and tested the card without success, but the progress was evident. My hopes were bigger and bigger as the months passed. Finally (thanks Larry Finger, the author of the patch, and the linux wireless team) mainstream kernel included the code necessary to drive the BCM4312 rev 02 card.

It was included in kernel 2.6.25 and this kernel was stamped stable just two days ago. So, one more time (hoping it were the last) I put to test a new kernel in my laptop.

I downloaded the full sources from kernel.org (because it isn’t yet in debian repositories). As root:


laptop:~# cd /usr/src
laptop:~# wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2

Then I installed the required dependencies needed to custom compile/install a kernel (instructions here):


laptop:~# apt-get install build-essential fakeroot

I unpacked the sources:


laptop:~# tar jxf linux-2.6.25.tar.bz2
laptop:~# cd linux-2.6.25

I copied the config file from my current kernel:


laptop:~# cp /boot/config-2.6.24-1-amd64 .config

and made the kernel package:


laptop:~# fakeroot make-kpkg --initrd --revision=miguel.1.0 kernel_image

This compiled the kernel and built the deb package leaving it in /usr/src/linux-image-2.6.25_miguel.1.0_amd64.deb. I chose the default answers in the config phase. Finally I installed it with:


laptop:~# dpkg -i /usr/src/linux-image-2.6.25_miguel.1.0_amd64.deb

As I was using ndiswrapper (as told here), I had to undo the changes made for ndiswrapper to work:


laptop:~# /etc/init.d/networking stop
laptop:~# rmmod ndiswrapper
laptop:~# ndiswrapper -r bcmwl5
laptop:~# m-a purge ndiswrapper --force
laptop:~# dpkg -l |grep ndiswrapper # to check ndiswrapper packages
# update the following accordingly
laptop:~# aptitude purge ndiswrapper-common ndiswrapper-source ndiswrapper-modules-2.6.22-2-amd64 ndiswrapper-utils-1.9

Also, I removed bcm43xx from /etc/modprobe.d/blacklist, and finally left just the following lines in /etc/network/interfaces:


auto lo
iface lo inet loopback

in order to let NetworkManager to manage the network interfaces (wired and wireless).

The time to test this setup came, so I rebooted the laptop and watched the boot messages. No errors. Finally the led turned blue and when I logged in with my user the NetworkManager showed a list with all the wireless networks available. I chose mine and I was showed a windows asking for my password. I entered it and the connection was made.
So here I am, writing this from my recently and brand new kernel powered BCM4312 rev 02 wireless card.

So, thanks to the ndiswrapper team, but I have to say goodbye. I invite you to update to kernel 2.6.25 and to left behind ndiswrapper.

Thanks to the Linux Wireless team, and in general to the FOSS community for the work made. Thank you all.


Oct 19 2007

Reuniones

Hacía tiempo que no veía a LowGmaN.

Ayer nos fuimos a tomar un café y a platicar un par de horas. Después de transmitirnos los chismes de rigor y las actualizaciones de información familiar y laboral, llegamos a la parte que más disfruto de conversar con él. Es el único, además de Aline, con el que puedo explayarme y hablar libremente sobre mis proyectos con Linux, Software Libre y las tecnologías en las que ando inmerso.

Es absolutamente motivador contarle lo que he aprendido y sobre todo ver la manera en que se entusiasma conmigo. Siempre terminamos planeando como vamos a llevar a cabo los planes, él la parte comercial y del negocio y yo la parte técnica. A veces pienso que lo aburro con tanta cháchara pero nunca se queja. Es más, hasta se emociona (o eso creo yo :D ).

El caso es que ayer estuvimos platicando de Smalltalk, Seaside, bases de datos orientadas a objetos, test driven development, Ruby on Rails y las (cada vez más evidentes) carencias de los frameworks en Java.

Es el único que ha aceptado el riesgo de usar las nuevas tecnologías que le propongo. Hace más de un año, cuando Ruby on Rails era más desconocido (¿más aún?) que hoy, me dijo, has mi aplicación en lo que quieras, yo confío en ti. Woa, pues le propuse hacerlo en Ruby on Rails y aceptó. Finalmente se puso en producción y todos felices. Fue el primer proyecto grande que hice con RoR. Todo lo demás que había hecho eran proyectos personales de prueba y de aprendizaje.

En fín. Volviendo al punto, siempre es agradable ver que alguien está dispuesto a apostarle a lo nuevo, de ver el potencial de la nueva tecnología y usarla.

Si no fuera por personas como él aún estaríamos usando COBOL para hacer proyectos, aunque en esta época deberíamos decir: aún estaríamos usando Java para hacer proyectos.


Sep 3 2007

Beyond Java (and Java Frameworks). Part 1

Al fin llegué a mi límite. Demasiado esfuerzo para hacer cosas simples. Demasiados archivos que modificar para realizar un cambio. Y lo peor de todo, ¡demasiado XML para programar!

Java no es un lenguaje que se distinga por ser conciso para expresar algoritmos y soluciones a problemas. Es tolerado tomando en cuenta sus otras ventajas (garbage collector, una buena biblioteca de clases, entre otras). Pero si además de eso agregamos toneladas de XML para realizar la mitad de la programación y configuración de tu aplicación llegamos a un punto extremo.

› Continue reading


Sep 1 2007

Fotos

Después de algunos días de tener abajo la sección de fotos ha regresado corregida y mejorada.

Inicialmente tuve la intención de usar alguno de los sitios de fotos de internet como Flickr o Picasa Web. Picasa Web era el candidato ideal porque ya tengo cuenta en Google y por tanto ya no tenía que registrarme en otro sitio como es el caso de Flickr. Finalmente me decidí a hostear yo mismo mis imágenes. De esta manera yo tengo el control completo de todo. Después de buscar un rato y comparar las opciones me decidí por Gallery2.

Entre todas las ventajas que tiene gallery, la más importante es que puedo subir directamente las fotos desde f-spot o digikam.

Por tanto cree un nuevo subdominio para poner ahí la galería. La dirección es http://fotos.leugim.com.mx.

Inicialmente, manejaba mis fotografías usando f-spot. La interfaz es muy amigable y en cuanto a manejo de fotografías no le pide nada a Picasa o a iPhoto. Pero desgraciadamente no hace lo mismo con los videos. Algo muy importante para mi era la capacidad de almacenar tags y comentarios directamente en las imágenes (usando EXIF e IPTC) y no en una base de datos externa (como XML o sqlite). De esta manera, si en algún momento decido cambiar de aplicación para el manejo de mis fotos, no tengo que volver a clasificarlas y comentarlas.

Desafortunadamente, f-spot no lo hace en la versión que viene con Debian Etch (0.2.1) y para instalar la versión de Debian Testing me marcaba demasiados conflictos. Por tanto intenté instalarlo a partir del código fuente. ¡Ja!, toda una aventura. Finalmente desistí y busque una mejor solución.

Encontré que digikam puede almacenar los tags y comentarios directamente en el archivo, y que además, aunque la versión que viene con Debian Etch no es la que trae esta funcionalidad, es mucho más sencillo instalar la versión más reciente directamente desde el repositorio svn de kde. Así que por el momento estoy usando digikam 0.9.3, compilado a partir del svn y no tengo ningún problema. Todos mis tags y comentarios son guardados en el archivo de la foto. Además, como cereza del pastel, al exportar las imágenes a gallery, éste obtiene los tags y comentarios que asigné a las imágenes y las utiliza para poner los títulos y comentarios que aparecen en la galería. :D DRY en acción.

Así que ahora a subir fotos por montones.


Aug 13 2007

SCO Group v. Novell Inc

Finalmente, después de varios años de un lentísimo proceso legal, el 10 de agosto de 2007 se falló en uno de los tantos casos de litigio que involucraban al SCO Group. Desafortunadamente para ellos, el juez que llevaba el caso determinó que el copyright del código fuente de UNIX y de UnixWare pertenece legalmente a Novell Inc.

› Continue reading


Aug 6 2007

Laptop

Las tarjetas de crédito deberían estar prohibidas. Al menos enterradas en algún lugar remoto y difícil de alcanzar.

Este fin de semana fuimos al Palacio de Hierro y salí con una laptop bajo el brazo. No se si reír o llorar. Sentimientos de culpa y de alegría luchan por el dominio de mi pobre alma! jaja. Bueno, no tan drástico.

El caso es que ya tengo laptop. Después de años de decir que yo no iba a usar una laptop porque eran mejores las de escritorio (más actualizables, más baratas, más potentes, más expandibles, más durables, más lo que sea), me he rendido y la compramos. Y no esta nada mal:

  • 1.8 GHz AMD Turion™ 64 X2 Dual-Core Mobile Technology TL-56 64
  • 512KB+512KB L2 Cache
  • 1024 MB DDR2
  • NVIDIA GeForce Go 6150
  • 15.4” WXGA High-Definition HP BrightView Widescreen Display (1280 x 800)
  • LightScribe SuperMulti 8X DVD±RW with Double Layer Support , Dual format DVDRW, but only +R double layer

Traia una cosa llamada MS Windows Vista Home Premium que duró aproximadamente una hora antes de ser desechada para darle lugar a un maravilloso Debian GNU/Linux 4.0 :D

Fue un relajo poner a funcionar todos los dispositivos integrados de la laptop porque muchos de ellos solamente tienen drivers propietarios, pero al menos ya esta ahora corriendo Debian sin mayor problema. En un post posterior describiré el proceso detallado por si a alguien le sirve.

Ahora a transferir mi /home de mi desktop a mi laptop.


Jun 5 2007

SETI@home

Hace unos días recibí un mail de SETI@home invitándome a continuar apoyándolos en su búsqueda de señales de inteligencia extraterrestre. Hace ya varios años que soy participante de este proyecto. Específicamente, desde Octubre de 2000. ¡Ya llovió, como dicen!

› Continue reading