Cosas del pasado, con un poco de arte

En aquellos días… huy no, que la historia es otra. Probemos de nuevo. Érase una vez… mmmh, tampoco. No parece buen principio para la historia de hoy. A ver a la tercera:

Tiempo ha, servidor solía dejarse caer por el GPUL (el Grupo de Programadores y Usuarios de Linux de la facultad), y además de meterse en otros fregados diseñar algún que otro cartel, a decir verdad con algo más de gusto que los diseñadores de las portadas de ciertos álbumes. El caso es que hoy, mientras buscaba el disco compacto de uno de mis juegos viejos, encontré una copia de seguridad del portátil que utilizaba por aquel entonces (un iBook G3 que todavía funciona después de nueve años, eso si que es un récord de TCO para un portátil).

En dicha copia de seguridad me encontré con un par de perlitas. Nada menos que dos de los carteles que en su momento diseñé en mi época de máxima actividad en GPUL:

Como «bonus», me he topado también  con el que —hipotéticamente— iba a ser el fondo de pantalla de GNOME en la versión de GPUL LiveCD que nunca llegó a ver la luz del día:

Ya véis que uno nunca sabe lo que se encontrará en el futuro al hacer copias de seguridad 😉

Acontecimientos ¿históricos?

Ricardo Galli nos recomienda la lectura de un artículo de Dijkstra (que tengo a medio leer, pero es como mínimo «apasionante»), y tras reíme un buen rato de algunos de los comentarios aparecidos en Guarrapunto me acordé de que, oiga usted, existe un grupo de chalados intenta un nuevo conato de huelga que, con un nada que se tuerzan las cosas, lo que conseguirá es dar (aún más) mala imagen del colectivo de informáticos. Yo me quedo con esta frase del artículo de Dijkstra:

La Ingeniería del Software, por supuesto, se presenta a sí misma como otra causa valiosa, pero es un colirio: si lee cuidadosamente su literatura y analiza lo que realmente hacen quienes se avocan a ella, descubrirá que la ingeniería de software ha adoptado como su estatuto «Cómo programar si usted no puede».

Y mientras unos se dedican un esfuerzo estéril a una causa perdida, yo me he dedicado los últimos días a convertir mis CDs al formato libre OGG Vorbis después de haber borrado los MP3 que tenía, con el resultado de que hoy el mundo es un poquitín más libre.

Perfect «Suspense» (with a Vaio TZ11MN/N)

Maybe you already know about my trip throught all the oddities with the suspend to RAM feature with GNU/Linux running on my Vaio TZ11 notebook… yesterday I was able of workaround one of the things which was annoying me in the last weeks: the X11 Intel video driver was frozen after coming back from suspend! This happens when using the uvesafb framebuffer driver, but not in plain-old VGA text mode (which is way too ugly: you cannot see the penguins when the system boots!).

First I tried using the intelfb driver in the framebuffer, but I got exhasperated because it does not know how to set-up video modes (at least with my hardware), so you need to pass vga=some-mode in the kernel command line… Unfortunately, trying to set the VESA mode this way before the driver is initialized makes some interesting effects: the framebuffer can flicker horribly, the machine can refuse continue booting after setting video mode, the image on the panel can be totally screwed… depending on which video mode you are trying to set.

The final solution was using the old (but still trusty) vesafb driver. I had to try different kernel command lines until it worked. After some rebuilds, I got a working kernel configuration with the VESA framebuffer driver. The following is needed in the kernel command line: video=vesafb:1366x768-32,ywrap,nomtrr vga=0x362.

Maybe you already suspect that: 0x362 is a nonstandard video mode (1366×768, 32bpp). I had to boot using the uvesafb driver and read the mode list from /sys/devices/platform/uvesafb.0/vbe_modes, and then re-build the kernel to put back vesafb

I spent two hours of testing until it worked, so I am sharing the information here: you know, I don’t want ohers to waste their time as I do 😀

Holy FLOSS updates

AbiWord 2.6 is able of loading Office Open XML documents. Yikes!

Things move fast in the Open Source world… and thanks to that now I can read «unfriendly» document formats without leaving GNU/Linux and without using stinky proprietary software on top of Wine. Holy shit…

Update on Gentoo r5u870 packaging

This is a small update on where to find the driver for the Ricoh r5u870 webcam properly packaged for Gentoo GNU/Linux. This driver is needed in order to use the webcam present in some HP Pavillion and Sony Vaio (including my TZ11) laptops.

If you have read my previous post, you already know it: the hard drive of my iBook (which was being used as home server) died last week, so with a little help from my friends™ I have moved the overlay to a new place. We also splitted the overlay in two, so please be sure to use the contrib overlay, which is where the media-video/r5u870 belongs.

I hope this change will make things better, so have a nice time using your camera and remember to thank the driver authors (thanks Alex & Sam!) and report packaging bugs if you encounter any problem 😉

I hate hard disks

The hard disk of my old (but working) iBook G3 has died yesterday. This means all the stuff which was hanging on foobar.homeunix.org, including my Gentoo overlay, some photo albums and other random stuff will not be available in a while. This also includes mailing lists at ml.mine.nu. Sorry for the inconvenience, and expect updates as soon as I can fix up things. Fortunately I have a fairly complete backup…

How-to: Bazaar smart server on Nginx

This is a recipe which will teach you how to set-up a Bazaar smart server on top of the great Nginx HTTP server. I will not deal with optimization or fancy setups at all, the goal is just having your Bazaar branches published, feel free to comment if you feel like the proposed setup could be improved.

First of all, you will need the following:

  • An Un*x box. It does not matter which particular incarnation you prefer (*BSD, GNU/Linux, MacOS X…), just make sure the following components work with your operating system of choice.
  • Bazaar 1.0 or newer.
  • Nginx 0.6.x with the latest mod_wsgi builtin (Manlio did a great job bringing WSGI support o life!)
  • Your text editor of choice.

Now, the recipe for a read-only repository of Bazaar branches:

  1. Install Nginx with mod_wsgi. If you are a fortunate Gentoo user, you can use the Nginx ebuilds from my overlay the Connectical Overlay, just make sure you set python USE-flag when emerging www-servers/nginx.
  2. Create a directory where you will store your branches. I myself decided to place them under /home/bzr. Make sure that Nginx will be able of reading its contentse e.g. by making the directory and its contents world-readable.
  3. Write a small Python script which creates a WSGI application for the smart server and save it to /home/bzr/smartserver.wsgi. It should look like the following:
          from bzrlib.transport.http import wsgi
    
          application = wsgi.make_app(
             root="/home/bzr",
             prefix="/bzr",
             path_var="REQUEST_URI",
             readonly=True)
  4. Edit /etc/nginx/nginx.conf and add the directives into a server section, be sure to use the same location as in the prefix variable above:
          location /bzr {
             wsgi_pass /home/bzr/smartserver.wsgi;
          }
  5. Restart Nginx and enjoy: Now you can access a branch stored at /home/bzr/mybranch using the bzr+http://host/bzr/mybranch URL.

Final note: you must have include wsgi_vars somewhere in your Nginx configuration file, in a server section. That’s all for today. And remember… Bazaar and Nginx are a joy to work with! 😉

ACPI S2 vs. Gentoo vs. Vaio TZ11

Yes, yes, yes! The thing started working reliably today, at last! The software combo which makes the thing work is as follows:

  • sys-kernel/gentoo-sources-2.6.24-r3. I believe that any kernel version in the 2.6.24 series will do the thing. The ALSA code included in newer releases also fixes the problem with the built-in speakers and they will no longer be disabled on bootup.
  • I am using uvesafb for the framebuffer, because intelfb and the i810 driver cannot be used together (yet).
  • Video card driver is x11-drivers/xf86-video-i810-2.1.1. Versions above 2.2.x will not work.
  • Gentoo has now split packages for HAL, I have installed sys-apps/hal-0.5.10 and app-misc/hal-info-20071030. HAL is needed for Gnome Power Manager to work. Be sure of setting the acpi and laptop USE-flags.
  • Last, but not least, gnome-extra/gnome-power-manager-2.20.2, which I am using from the Gnome panel to suspend gracefully. You may have guessed it: I still haven’t figured out how to suspend without having the X-Window system running.

Just a final note: if Gnome Power Manager thinks you have two batteries take a look at this FAQ entry, the kernel is reporting the existence of your battery using two different subsystems! I had to disable CONFIG_ACPI_BATTERY because CONFIG_POWER_SUPPLY could not be disabled with my set of kernel options.

Now I am really happy with my slim 11-inch laptop 😀

Get the women!

Excerpt from eutils.eclass, as included in the official Gentoo package tree:

  # Make a desktop file !
  # Great for making those icons in kde/gnome startmenu !
  # Amaze your friends !  Get the women !  Join today !
  #
  # make_desktop_entry(, [name], [icon], [type], [path])

This is not the first joke I find while surfing Gentoo-related websites (their bugtracker has some funny tickets) or system-specific code. Humor is definetely good, especially when you are striving to improve some code and find hilarious comments like that. So please, please keep smiling, Gentoo folks!