Planeta GNOME Hispano
La actividad Hispana de GNOME 24 x 7

14 de mayo de 2012

IwkMail, mixing WebKit Gtk+, Camel and JQuery Mobile

In the last few weeks, as part of my work here at Igalia, I’ve been playing a bit with the concept of hybrid applications. In this case, I’ve created a basic prototype of a mail application, with its user interface completely written using JQuery Mobile, and with backend code in C and GObject. The result is iwkmail.

Screencast of iwkmail in action

Though it’s a simple experiment, I’ve added some mail basic functionality, so I could try to catch as much as possible of real requirements for how  we could improve the developers WebKit+GNOME experience creating hybrid applications.

My first conclusion is that it’s surprisingly easy and fast to develop such applications. Second, I could reuse tons of source code and modules from my old projects. This approach surely provides a way to create cool GNOME applications, using the most fashionable web client technologies.

So, you’ll get:

  • Browsing messages
  • Read/unread flags
  • Deleting messages
  • Creating and deleting mail accounts.
  • Storage protocols supported: IMAP and POP.
  • For sending mails, we support SMTP. There’s support for an outbox holding the messages to be sent.
  • A plain text composer, allowing to add attachments.

The UI is completely written in Javascript + HTML, using JQuery Mobile.

The backend side is done using Camel library inside Evolution Data Server, so we rely on a library well tested for more than 10 years.  All the code related to this is implemented in C+GObject, and I reused a good set of code from Modest, the default mail client for Nokia N810 and N900. I’ve got involved on its development for 3 years, so that’s a bunch of code I know well enough.

For communication, I use the AJAX-like JSONP protocol, and custom SoupRequest URI scheme handlers. Basically I expose some methods as iwk:addAcccount, iwk:getMessage, etc, and arguments are passed as usual in a web request. The result I obtain from this calls is a JSON object with the results of the call. Simple, and works very well.

I’ve pushed the work on github: https://github.com/jdapena/iwkmail. Feel free to try it!

Oh, I guess it’s very obvious that I did not spend too much time thinking on the project name… So, anyone proposing something that matches the IM acronym (I don’t want to rewrite the class names!) would deserve a beer.

Last, lots of thanks to Igalia for giving me the opportunity to do this experiment. As usual, fun stuff to work with.

13 de mayo de 2012

11 de mayo de 2012

Cosas que me repatean del software libre (III)

Venga, una más para la lista de quejas. Esta es grande y, desde mi punto de vista, sencilla, al menos lo que se conoce como workaround; una vez hecho este, se podría pensar en la mejor solución.

El 12 de septiembre de 2008 se abrió un informe de error en Empathy solicitando poder bloquear mensajes de personas que no estuviesen en la lista de contactos.

3.5 años después no está implementado. 39 comentarios, 12 de los cuales son comentarios para marcarlo como duplicados otros errores

El error probablemente surgió por la cantidad de SPAM que se recibía en la red MSN. Red que dejé de usar entre otros motivos por no poder bloquear la cantidad de SPAM que me llegaba.

Etiquetas: , , ,

06 de mayo de 2012

Praga desde Lavka

Prague from Lavka

Lavka es un club pegado al Puente de Carlos que tiene una terraza fenomenal, desde donde se pueden tomar unas fotos preciosas. Eso sí, como en el resto de restaurantes y bares en Praga, el servicio es lamentable.

Etiquetas: , , , , , , ,

01 de mayo de 2012

Apple and LastFM can still receive open source love

Here we are in an era in which ad-based services (like LastFM) and closed-products (like Apple ones) are on the rise.

But contradicting what you may think, open source is still friendly to them.

If you have an Apple device supported by libgpod* and you're an avid user of LastFM's scrobbling feature, you can today configure Banshee to send all the songs that were played on your device to your LastFM account the next time you connect your device while you have Banshee running.

Pretty handy, especially if you own a device that doesn't have internet connection these days (something definitely not on the rise). You should thank our new Banshee developer Phil Trimble for doing an awesome job on implementing this feature (and on resisting to not sending me to hell when I made the patch reviews...).

The next version of Banshee, in the 2.5.x series, should include this feature. Until then, hold on to your seats! (or compile it yourself from master ;) )

* Beware: not the last generation ones! you would have to donate to libgpod project if you want those recognised.

PS: If you're a developer and want to extend this feature to other kind of devices, you should just implement the interface IBatchScrobblerSource in the corresponding Source class of your device. If you want to make it scrobble to a different service than LastFM, just create a Banshee addin (simple sample here) that subscribes to the ServiceManager.SourceManager.SourceAdded event to then later subscribe to the IBatchScrobbleSource.ReadyToScrobble event from it, to later make the corresponding HttpWebRequests to the scrobbling service.

28 de abril de 2012

Painting video with GStreamer and Qt/QML or Gtk+ with overlay

As part of my work at Igalia I had to work with video and GStreamer for some years. I always used Gtk+ for that so when I needed to do things with Qt and QML, things were different. In my projects I always used pure GStreamer code instead of the Qt bindings for GStreamer because at the moment those bindings were not ready or reliable.

I know two ways of painting video:

  • Overlay way, with a window id and so on
  • Texture streaming

I might write later about texture streaming, but I will focus now on overlay.

Painting

The first way means that you need from your graphical toolkit a window id. That window id is asked by the video sink element in a very special moment and you need to provide it in that moment if you have not provided it before. For example, if you are using playbin2 and you already know the sink you want to use, just instantiate your sink and set the window id at that moment with gst_x_overlay_set_window_handle and set the sink to the playbin2 element by setting the video-sink property.

If you are not using playbin2 and for example you are using GStreamer Editing Services, you cannot use a property because currently there is no one and need to use a more complicated method. I already reported the bug with its patches and hope that they apply them as soon as possible to improve compatibility with playbin2 because the way it is now is a bit inconsistent with the rest of GStreamer code base.

Both Qt and Gtk have now client side windows, which means that your program window has only one X window and it is the toolkit that decides which widget is receiving the events. The main consequence is that if we just set the window id, GStreamer will use the whole window and will paint the video over the rest of our widgets (it does not matter if QML/Qt or Gtk+) and you’ll get very ugly effects. To solve that, you need to set the render rectangle, which are the coordinates (relative to the X whole X window) where you want to paint your video. You need to do that just after setting the window id with gst_x_overlay_set_render_rectangle.

If you do not set your window handle and your render rectangle before the pipeline begins to move, it will ask you about that with the prepare-xwindow-id GstMessage, but this message can happen inside the GStreamer threads and it cannot wait until the main loop runs, it needs the information at that very moment, so you need to connect to the synchronous bus handle. GStreamer has a good example at the GstXOverlay documentation about how to do that. To use the callback in C++, you need to declare a static method and pass this as user data parameter, then you can behave almost as having a normal object method. This is the most common solution used in the GNOME world and fits perfectly with the Qt framework too.

The code to get the window id and render rectangle in Gtk+ would be something like:

GdkWindow *gdk_window;
gdk_window = gtk_widget_get_window(your_widget);
/* as sink you can use GST_MESSAGE_SRC() if you are waiting
    for the prepare-xwindow-id message */
gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(your_sink),
                             GDK_WINDOW_XID(gdk_window));
/* do your maths about your coordinates */
gst_x_overlay_set_window_handle(GST_X_OVERLAY(sink),
                                x, y, width, height);

In Qt, if you are using common widgets, you could use something like:

WId winId = QApplication::activeWindow()->effectiveWinId();
gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(your_sink),
                             winId);
/* do your maths about your coordinates */
gst_x_overlay_set_window_handle(GST_X_OVERLAY(sink),
                                x, y, width, height);

If you are using a QGraphicsScene you would do something like:

/* to get the view you could do something like this
    (if you have only one or will to mess things up):
QGraphicsView *view = your_scene.views[0];
*/
gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(your_sink),
                             view->viewport()->effectiveWinId());
/* do your maths about your coordinates */
gst_x_overlay_set_window_handle(GST_X_OVERLAY(sink),
                                x, y, width, height);

If you are using QML, you would have a very similar approach to the last snippet, because as you should have a QDeclarativeItem, it has a scene() that you can use, to have something like QGraphicsView *view = scene().views[0]; (of course, assuming that you have only one view, which is the most common case).

Overlaying stuff

Some times it is nice do put your controls on top of the video by covering part of the image. It would be like having the video as the background of a canvas where you draw some other widgets. Some GStreamer elements give you the possibility of doing a trick to do this, which is using a colorkey for your background and painting whatever you want on top of that as long as it does not include that colorkey. Some elements like xvimagesink or omapxvsink (used in the Nokia N9 and N950) have the colorkey property that you can read and set. If you are not planning to overlay anything, you can forget about this, but if you do, you need set a color key to the sink and use that color to paint the background of your widget and a good moment is also when setting the window handle:

g_object_set(sink, "autopaint-colorkey", FALSE,
             "colorkey", 0x080810, NULL);

Why do I unset the colorkey autopainting? Because I do not want GStreamer to mess my widget painting.

And more important: Why did I use 0x080810? Because it is a dark color, close to black, but it is not black. Pure black can be dangerous as it is commonly used in themes when painting widgets so you would be getting ugly artifacts. Some people recommend magenta (0xFF00FF) as it is supposedly a color that does not exist in nature (citation needed). I would not do it for several reasons:

  • You will need to synchronize your painting very well to avoid seeing the colorkey
  • If you respect aspect ratio you will see it for sure, because you (or the sink if it is automatic) paint the backgound and the sink draws the image by leaving some empty space.
  • It does not behave well with blendings, as you blend from your widget color to the background, which is the colorkey

Advice: do not mess with colorkey and omapxvsink. Though it is supposed to be writable, it is not and it always uses 0x080810.

Aspect ratio

There are two kind of people:

  • The ones that want to use all the pixels of their monitor/TVs and like damaging their brain with distorted images.
  • The ones that like to see a correctly dimensioned image with some bars giving you a better impression of what was recorded.

As you can guess I belong to the second group.

There are some sinks that do that automatically for you by setting the force-aspect-ratio property, like ximagesink and xvimagesink but there are other that does not and omapxvsink is an example. It is not a big problem but forces you to work a bit more when you select the render rectangle. For that you need to know the video size, which you cannot know until the pipeline is running, which forces to to hook to the GST_MESSAGE_ASYNC_DONE, or in the case of playbin2, you already have the video size when getting the prepare-xwindow-id message. An example to get the video size would be:

GstPad *pad;
GstCaps *caps;
GstStructure *structure;
int width, height;

pad = GST_BASE_SINK_PAD(sink);
caps = GST_PAD_CAPS(pad);
g_return_if_fail(caps && gst_caps_is_fixed(caps));

structure = gst_caps_get_structure(caps, 0);
gst_structure_get_int(structure, "width", &width);
gst_structure_get_int(structure, "height", &height);

/* some videos define a pixel aspect ratio, meaning that the
   video pixel could be like 2x1 copared to a squared pixed
   and we need to correct this */
if (gst_structure_has_field(structure, "pixel-aspect-ratio")) {
    int par_n, par_d;
    gst_structure_get_fraction(structure, "pixel-aspect-ratio",
                               &par_n, &par_d);
    width = width * par_n / par_d;
}

/* trick: some sinks perform better with multiple of 2 */
width &= ~1;
height &= ~1;

HackLab Almería: entrevista en Radio Candil

Todavía no he hablado por aquí del HackLab Almería. Aunque ahora estoy bastante saturado hace unas pocas semanas pusimos en marcha la web para dar cobijo y promover un nuevo colectivo en la provincia con todos los afanes creativos del mundo. Tenemos todas las espectativas del mundo y confiamos animar el cotarro en esta tierra. Así las cosas los amigos de Candil Radio y la asociación ASINTAL han tenido a bien radiar una entrevista con éste que suscribe. Y además tienen la gentileza de publicar el audio del programa.

Gracias por vuestro interés :-)

25 de abril de 2012

Google Drive frente a DropBox

No, no voy a hablar de rendimiento, de espacio de almacenamiento ni de precio. Voy a hablar de “términos de servicio” porque se están diciendo muchas imprecisiones, por decirlo suave.

Como me han preguntado varios (mejor dicho, han preguntado a #Reclameitor) resumo a continuación, poniendo frente a Google Drive un servicio similar: Dropbox:

Dropbox: Seremos siempre propietarios de nuestras “pertenencias”. No damos a Dropbox ningún derecho sobre ellas, salvo lo imprescindible para prestar el servicio. Lo más interesante es que prometen pedirnos permiso para acceder a ellas. Por ejemplo para poder prestar un servicio de miniaturas en tus fotos. Términos de Servicio.

Google: Sus términos de servicio, aplicables también a Google Drive, dicen claramente que aunque el usuario retiene la propiedad intelectual de los contenidos, concedemos a Google licencia para hacer lo que quiera con él, difundirlo, etc; incluso “obras derivadas”, con los fines de prestación del servicio. Términos de Servicio (TOS).

Conclusiones:

  • El problema, a mi entender, es que Google ha unificado el TOS para todos sus productos. Y bueno, en algunos productos no encaja muy bien, que digamos. A lo mejor un día le da por rectificar… o no.
  • Dropbox parece menos “malo” pero tampoco garantizan que si nos piden permiso para algo y no lo damos, no perdamos el acceso a nuestra cuenta. Podrían obligarnos, es decir, o aceptas esta “mejora” o cierras tu cuenta. En el fondo, lo veo igualito que Google.
  • Con Google está muy claro: para documentos privados no lo uses. Eso sí, casi diría que apoyan la documentación libre con eso de mencionar las “obras derivadas”. Vamos, que si subes tus documentos con una licencia CC By-SA, podría ser que Google te ayudase a su difusión y mejora (soñemos…).
  • ¿Crees que la licencia de Dropbox o de otros servicios similares te garantiza que puedas usarlo para documentos privados tranquilamente? Si es así, eres un ingenuo. Pero bueno, si lo haces, al menos cífralos con una tecnología segura.
  • Por último, en ambos casos, se nos reconoce la propiedad de los contenidos. Faltaría más, la propiedad intelectual nunca la perdemos. Lo contrario sería ilegal. Así de simple y así de sencillo. Esta es la base de las muchas tonterías que se están diciendo desde ayer, como que “Google te quita la propiedad de tus cosas…”.

Reclameitor, a su servicio.

24 de abril de 2012

Acceso a MySQL remoto vía Android y SSH tunneling

Otra receta, esta vez para poder acceder desde nuestro dispositivo Android a una DB MySQL remota protegida por un firewall que impide la conexión directa. Necesitaremos realizar 3 pasos: 1) Instalar Connect Bot (para la parte SSH que explicaré a continuación) y MySQL Connect (de Javier Romero). 2) Generar un túnel SSH que permita conectar [...]

23 de abril de 2012

Ya está aquí la World Plone Day 2012

Desde CodeSyntax nos cuentan: Ya está aquí la cita anual que pretende dar a conocer Plone, la World Plone Day. El 25 de abril se organizarán multitud de eventos en todo el mundo para publicitar las características y ventajas de este gestor de contenidos de software libre. Desde CodeSyntax nos sumamos a la iniciativa de [...]

20 de abril de 2012

Cosas que me repatean del software libre (II)

Me quejaba hace no mucho de lo que tarda en responder, de vez en cuando, un proyecto de software libre. Estoy hablando del flujo de trabajo oficial, el normal. No de correos enviados a los desarrolladores pidiendo tal o quejándose de cuál.

Bien, ocho meses y dos publicaciones de GNOME después, la gente de gnome-online-accounts me contesta a un tique abierto en bugzilla sobre la traducción de la aplicación.

Me he callado, pero a punto he estado de escribir algo como «¿de verdad, después de 8 meses contestáis?» y no contentos con eso, «¿no podéis hacer un grep del archivo con lo que he comentado, es tan difícil?».

No conozco a la persona que ha contestado, no sé si es nuevo en el proyecto o lleva desde el principio, por eso no le culparé de nada, pero un proyecto de software libre no debería permitirse el lujo de ignorar feedback durante 8 meses y dos publicaciones.

Etiquetas: , , ,

17 de abril de 2012

Aura

As my colleague Víctor at Igalia has said before in his post, Aura was released to the Nokia Store. Miguel, Víctor and I are quite happy with the result achieved with this app, which intention was to be kind of a port of the Cheese application of the GNOME platform to be used in the N9 or N950 Nokia phones.

The apps allows you to use both cameras (front and principal) to record videos, applying a lot of funny effects (a subset of the GNOME Video Effects) and changing them during the recording. Being Nokia a Finnish company, we decided to name the app after a Finnish Cheese to both honor the GNOME Cheese application and Finland ;)

You can download the app from the Nokia Store where we already got more than 6000 downloads and 100 reviews with a quite good average rating.

You have an example recorded by me with my own phone using the Historical effect and uploaded to Youtube:

And you have even already other videos uploaded to Youtube talking about how Aura works. This one is from a brazilian guy (obrigado!) for FaixaMobi and shows more effects:

Of course, being it free sofware you can also compile it yourself with the code at GitHub and do not be afraid of contributing! The technologies we used were the camerabin element of GStreamer and Qt/QML for the interface where we have the following components:

Aura components UML diagram

  • Main view (aura.qml) with the main interface
  • Controller, which is a mixed QML/C++ object allowing to control the pipeline.
  • Pipeline is a C++ object used by the controller to encapsulate the GStreamer code.
  • PostCapture is also a mixed QML/C++ object that opens the gallery application to show the recorded video and gives you the oportunity of sharing it, deleting it and so on. It uses a C++ controller loaded as a singleton to the context to do some stuff that can only be done in C++. Of course, you can open Gallery yourself and the videos will show up there.
  • EffectManager is a C++ class to load and manage the Effects, which is another C++ class defining how the effect must be applied.
  • Effects (Effects.qml) is a QML component to show the different effects, both software and hardware that Aura can apply. It uses the EffectManager (through the context) to load them and the Controller to apply them.
  • About view (AboutView.qml) is a rework of something done by my colleage Simón Pena and adapted to be used in Aura (Kudos!). It also uses a small AboutViewController to open a Nokia Store URL with the application instead of the browser.
  • ResourceManager is a C++ class used by the Controller to request the proper permissions to record the video.

16 de abril de 2012

15 de abril de 2012

Receta rápida: evitar desconexión por timeout en ssh

Problema: El servidor ssh al que te conectas cierra la conexión cuando detecta inactividad del usuario. Como tienes varias ventanas y tareas abiertas a la vez, ese timeout hace que la sesión ssh se quede bloqueada cada dos por tres. Solución: crear un fichero ~/.ssh/config con el contenido que indico a continuación. Ese fichero se [...]

13 de abril de 2012

Lo que está por venir (o la que os va a caer)

Este fin de semana he estado recomendando a ciertas personas que tengan cuidado con sus ahorros en España. Cada vez leo más que es muy factible que España salga del Euro, por lo que también es posible que se produzca un cambio muy malo, o un «corralito» a la Argentina.

El caso es que justo después de recomendarlo he empezado a leer más artículos publicados sobre el mismo tema; ¿casualidad? No lo sé, es posible, o a lo mejor no, pero tiene mala pinta.

Curiosamente me he puesto a pensar en qué pasaría si todos empezasen a cambiar el dinero de entidad —ya que no se fían de unas cuantas— o a acumular efectivo... Y justo, me ha saltado el resorte: esto me suena.

Sigue leyendo...

Etiquetas: , , ,

10 de abril de 2012

Cómo pedir ayuda para corregir un problema de programación

Estimado amigo/a, acabo de leer tu descripción del error y petición de ayuda: “He probado algunas cosas y la aplicación Java me falla siempre diciendo no sé qué error. Ya no sé qué hacer. Ayúdame” Tengo algunos consejos para poder ayudarte. En concreto 10, que se resumen en uno: especifica el error. Si no describes [...]

Este blog ha sido traducido a rumano

Por esas carambolas de la vida un día te encuentras que alguien ha querido traducir tu blog a rumano. Alexander Ovsov se ha tomado la molestia de elegir y traducir el modesto blog de quien suscribe: Jurnalul de Ismael Olea.

Gracias Alexander :-)

09 de abril de 2012

Fotos antiguas de Praga y su correspondiente toma actual

Buscando fotos de mi calle en Praga me topé con este blog, ProměnyPrahy, que publica una foto antigua de una calle de Praga junto a una foto actual.

Un ejemplo, como otro cualquiera, podría ser de la plaza de la Ciudad Vieja

staromestske-namesti-1945.jpg staromestske-namesti-1945-n.jpg

Etiquetas: , ,

06 de abril de 2012

Cómo una inmobiliaria de Alemania me estafó 330 euros

Érase que se era un joven español que se fue a vivir a Alemania durante un año. El joven decidió alquilar un apartamento muy barato, por el que pagaba 308 euros y por el que dejó 630 como fianza, de la que sólo le devolvieron 302 euros, porque sí.

Para contar la historia más completa he creado la web  http://gh-immo.no-ip.biz/ traducida a dos idiomas (la traducción al alemán es vía web, así que no creo que sea muy correcta). Espero que esta gentuza no le vuelva a timar a nadie.
Ya puestos, de vergüenza el trato (o la falta de él) que recibí de la Embajada y el Consulado.

Sigue leyendo...

Etiquetas: , , , , ,

RetroShare for Fedora (reprise)

Some days ago I've improvised a packaging for RetroShare. Then Aiman wrote me and tuned a better one. Now you can find it it from my repository: retroshare-0.5.3-3.b.fc16.i686.

Hope you'll find it useful. Enjoy.

05 de abril de 2012

Bitcoin 0.6.0 for Fedora

I've updated the Bitcoin package for Fedora: bitcoin-0.6.0-1.fc16.i686. You can add my repo to your system if you wish too.

At the moment, the same concerns of the previous release about packaging still applies, but as far I can see it's operative. Please give me some feedback if you find some defect.

Enjoy!

04 de abril de 2012

How to use XPath expressions in shell scripting using xmllint

This is a minor tip I want to share. A little example of a nice software feature that made my day.

I've been messing with HTML scrapping and I took a look on xmllint (maybe new) features. My intention was to extract a particular pattern, for which the --xpath option could be fine. I've never been very good tuning xpath expressions so I made a search about how to approach this. I found an amazing feature of the xmllint shell mode. As explanation here I show the workflow used:

  • get your document, I used and HTML one
  • I didn't tested with broken HTML but you can test it with xmllint --html
  • get into shell: xmllint --html --shell [document], keep in mind [document] can be a remote URI.
  • in the shell mode you can search for a precise string, in my case I chose the one inside the desired pattern: grep [string]
  • here is when magic happens: xmllint answers with the xpath expression you can use for a xpath query
  • exit the shell
  • copy the extracted xpath expression to CLI: xmllint --html --xpath [xpath]
  • here it is.

You can tune your expressions adding new predicates, as using specific attributes, or extracting the text() node, etc.

Enjoy.

Repositorio CVS/SVN de LuCAS en github

Hace poco un colaborador del extinto TLDP-ES/LuCAS me preguntaba por las fuentes de uno de los documentos que alojábamos en el control de versiones del proyecto. Fue toda una agradable sorpresa. Desde la debacle de HispaLinux esos servidores desaparecieron de la faz de las IP.

Como tenía archivada una copia de la presunta última revisión del repo he aprovechado a subirla a un repo público, aunque sólo sea a efectos históricos. A partir de ahora está accesible en https://github.com/olea/LuCAS.

Descanse en paz LuCAS/TLDP-ES. Fue una gran satisfacción trabajar en él y creo que en su momento prestó un gran servicio en una época en la que las facilidades de autopublicación en Internet eran muy limitadas.

01 de abril de 2012

Creando panorámicas con hugin (2011.2)

Hace mucho tiempo escribí un par de manuales para el uso de hugin (Composición de dos fotografías con hugin, Composición de varias fotografías con hugin). Hasta hace no mucho no volví a crear ninguno, pero hace ya un par de meses que me di cuenta de lo desfasados que estaban, así que creo que hay que ponerse al día.

Hablaré de la versión 2011.2 que es la que tengo, el paquete oficial en Fedora 16, y que también es válido para versiones superiores (creo que sólo existe la 2011.4).

Las recomendaciones anteriores para la creación de panorámicas siguen vigentes: solapamiento entre imágenes de un 25%; tirar las fotos con un trípode; mantener la misma configuración (no automática) en la cámara, etc. No obstante, para esta prueba yo solapé alrededor de un 30%, usé trípode pero en configuración automática. En definitiva el consejo es para un resultado óptimo y menor reajuste ya dentro de hugin, pero no es 100% necesario para conseguir una buena foto panorámica.

Lo primero que se puede ver es que la pantalla principal es diferente, más sencilla y limpia.

hugin_1.jpg

Sigue leyendo...

Etiquetas: , , , , , , ,

31 de marzo de 2012

29 de marzo de 2012

GNOME 3.4: WebKit2 and kinetic scrolling

The web at your fingertips

The GNOME Project has released GNOME 3.4, the second major release of GNOME 3. A lot of new features, UI improvements and other enhancements are included in this release, as well as important changes in the development platform. You can see all the details in the release notes.

One of the applications that has received a major revamp is Epiphany, the GNOME Web Browser, not only because of the beautiful new interface, but it also has significant improvements in performance and stability. If Epiphany is not your default browser, give it a try when you upgrade to GNOME 3.4. See Xan‘s and Diego‘s blog posts for more details of the new Web Browser.

WebKit2

GNOME 3.4 includes WebKitGTK+ 1.8.0, the first stable release that contains an initial WebKit2 GTK+ API. It’s disabled by default, though, since it’s still a preliminary version, so you need to build with –enable-webkit2 configure option. It’s already possible to try it out with Devhelp 3.4 which can be optionally built with WebKit2 using –with-webkit2 configure option. If the current API is enough to port your application, give it a try and let us know, you can use the webkit2 devhelp branch as a reference. We’ll provide a migration guide soon too.

Kinetic scrolling

GTK+ 3.4 has finally support for kinetic scrolling in GtkScrolledWindow. I’m very happy to know that the work made by Igalia during the GTK+/Meego Handset integration project has helped Carlos Garnacho to properly integrate kinetic scrolling in GTK+.

What’s next?

During the next development cycle, the Igalia WebKit team will continue to focus on making Epiphany even more awesome, with more UI improvements, and of course porting it to WebKit2.

Sobre las críticas a la huelga general del 29M

A todos aquellos que están en contra de la huelga y de las anteriores protestas: me habría gustado (mejor no) ver lo que sería de España si nuestros abuelos, padres, primos y tíos no se hubiesen pegado con los grises, ni se hubiesen enfrentado a los coletazos del "régimen".

¿Creéis que España sería un sitio mejor si la gente sólo tragase? ¿Exactamente como le gustaría a la élite que gobierna y dirige el país?

¿De verdad? 

Entiendo que no muchos podáis hacer huelga por distintos motivos, pero recordad, la próxima vez que algo se consiga en una huelga no será por vosotros, y si sois coherentes, renunciad a algunos de los derechos que se obtuvieron con anteriores huelgas y protestas.

Etiquetas: , ,

28 de marzo de 2012

25 de marzo de 2012

Historia de un meneo

Menéame y su efecto ya no son lo que eran, o eso o he preparado muy bien el servidor para aguantar el tráfico. Voy a pasar a explicar la historia completa sobre el comportamiento del servidor y cómo me preparé para una circunstancia así, en la que he conseguido no sólo seguir navegando sin complicaciones durante el meneo, sino que el blog no se cayese y el servidor aguantase todo el tráfico y todas las peticiones.

El día 21 menearon la entrada De los Erasmus españoles pero no llegó a portada hasta el día siguiente hacia las 19:50 (aprox.). La verdad es que yo ya no contaba con que saliese publicada. Había recibido unas 600 visitas de Menéame y Facebook el día que la menearon, pero no parecía que llegase a portada por los pocos meneos que tenía. Eso sí, tenía muchos «clics».

Lo primero que quería comentar acerca de Menéame es que parece que ha perdido muchos usuarios y que han cambiado el algoritmo. En la ¿mejor? época de Menéame hacían falta más de 200 meneos para llegar a portada, si no recuerdo mal. Probablemente ambas cosas hayan pasado hace tiempo, pero ya no me fijo en ello. El caso es que la última vez que miré el meneo, antes de su publicación, apenas 30 personas lo habían meneado. Imagino que entró en «populares» por la cantidad de «clics» y de ahí acabó en portada. No lo voy a negar, yo también animé a mis contactos en Facebook a que la meneasen, no sé si muchos lo hicieron.

A las 20:00 me llega un correo de mi monitorización local avisándome de que el Apache está usando 150 conexiones. Luego otro con 180 conexiones con el que, de paso, reiniciaba el apache, cosa que se ve perfectamente en la memoria libre disponible en ese momento.

La buena fortuna quiso que tuviese terminada la monitorización gráfica un día antes de que el meneo se publicase, aunque me di cuenta de que estaba monitorizando mal el uso de memoria y CPU de Apache MySQL, monitorizando un solo proceso de los muchos que había lanzados.
Tengo que decir que mis dos blog son extremadamente modestos, Turismo Google hace unas 250-300 visitas diarias (sigo trabajando en él, a ver si despega) y La puerta de Tannhauser unas 100 150, por lo que las estadísticas de tráfico saliente un día normal son así:

Trafico saliente en Deimos en un día normal:
Trafico saliente en Deimos en un día normal

Bien, el día que salió la noticia a portada del Menéame esto fue lo que ocurrió:

Sigue leyendo...

Etiquetas: , , , ,

21 de marzo de 2012

Monitorizando deimos

Desde que decidi renunciar a idefix y hospedar mis blogs en deimos, me propuse hacerlo bien. Su chroot, su scripts de monitorización y su todoYa tuve una experiencia desagradable hace tiempo y no quiero que me vuelva a pasar.

Por lo que además de crear respaldos cada cierto tiempo de forma automática (y manual por otra parte), tengo mis scripts que se ejecutan de forma periodica y me mandan un correo con diversa información, según lo que esté pasando en el servidor.

Lo último que me ha dado por hacer es, además de monitorizar y almacenar el tráfico saliente por la interfaz de red, pintarlo. Al principio no almacenaba la información, sólo la comparaba con el valor anterior. Luego me dije que así podría saber el tráfico saliente real del servidor, guardadito todo en su CSV por día. Y ya puestos, en vez de hacer una gráfica con una hoja de datos... pues con PHP-GD.

traffic-all-turismogoogle.net.jpg

Sigue leyendo...

Etiquetas: , ,

20 de marzo de 2012

Netlink-based D-Bus

As stated in my last blog post, we have been looking at different options for optimizing D-Bus. After some internal discussion and reviewing of the feedback we got, we think the best solution is to get the best ideas from AF_DBUS, but without having to create a new socket family, which wasn’t very well welcomed by the Linux kernel developers. This brought us to having to choose a transport that allowed us to do that, so we decided on Netlink (an IPC mechanism for kernel to user-space communications).

Below is a detailed description of the architecture we are planning.

Netlink sockets
The Netlink protocol is a family of socket based IPC mechanism that can be used to communicate between the kernel and user-space processes and between user-space processes themselves. It was created as a replacement for ioctl and to receive messages sent by the kernel. It is a datagram-oriented service with both SOCK_RAW and SOCK_DGRAM valid socket types. It is based on the Berkeley sockets API and uses the AF_NETLINK address family. Netlink supports different Netlink families such as NETLINK_ROUTE, NETLINK_FIREWALL and NETLINK_SELINUX, each of which is used to communicate with a specific kernel service.

Since Netlink is used as an IPC mechanism for processes (and the kernel) on the same machine, its address only has a port number that identifies each peer (nl_pid). Since Netlink supports both unicast and multicast communication, a message to a group (nl_groups) can also be sent but only process with uid 0 are allowed to send multicast messages from user-space. A Netlink address is represented using the sockaddr_nl data structure:

struct sockaddr_nl {
        __kernel_sa_family_t    nl_family;      /* AF_NETLINK   */
        unsigned short  nl_pad;         /* zero         */
        __u32           nl_pid;         /* port ID      */
        __u32           nl_groups;      /* multicast groups mask */
};

A Netlink message header consists of the fields:

struct nlmsghdr {
        __u32           nlmsg_len;      /* Length of message including header */
        __u16           nlmsg_type;     /* Message content */
        __u16           nlmsg_flags;    /* Additional flags */
        __u32           nlmsg_seq;      /* Sequence number */
        __u32           nlmsg_pid;      /* Sending process port ID */
};

The Netlink protocol is explained in detail here.

Generic Netlink subsystem
Every Netlink family is identified by an integer number that allows using different Netlink services. Currently there are 21 assigned Netlink families from a maximum of 32. To avoid a shortage of Netlink families the Generic Netlink subsystem was created.

The Generic Netlink subsystem can multiplex different communication channels on a single Netlink family NETLINK_GENERIC. Generic Netlink subsystem is not only a simplified Netlink usage but also the communication channels can be registered at run-time without modifying core kernel code or headers.

The Generic Netlink subsystem is implemented as a service bus inside the kernel and users communicate with each other over it. The users can reside both in user-space or inside the kernel. The bus supports a number of Generic Netlink communications channels that are dynamically allocated by a Generic Netlink controller. This controller is a kernel Generic Netlink user itself, that listens on a special pre-allocated Generic Netlink channel “nlctrl” (GENL_ID_CTRL) where users send requests to create, remove and learn about available channels.

Communication channels are uniquely identified by a channel number that is allocated by the Generic Netlink controller. Users that want to provide services over Generic Netlink bus have to communicate with the Generic Netlink controller and ask it to create a new communication channel. Also, users that want to access those services have to query the Generic Netlink controller to know if these services are available and which channel number are currently using.

Every channel is identified by a Generic Netlink family and defines a set of commands that users can trigger. Each command is associated with a function handler that gets executed when a user sends a message specifying this command.

A Generic Netlink message header consists of the fields:

struct genlmsghdr {
        __u8    cmd;
        __u8    version;
        __u16   reserved;
};

Generic Netlink uses the standard Netlink system as a transport so its message format is defined as follows

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                Netlink message header (nlmsghdr)              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |           Generic Netlink message header (genlmsghdr)         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |             Optional user specific message header             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |           Optional Generic Netlink message payload            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The family (communication channel) used is specified using the Netlink message header (nlmsghdr) type field (nlmsg_type).

Each Generic Netlink family can use a family specific header to be used by the service provided in that channel.

D-bus as a Generic Netlink service
D-Bus can be implemented as a Generic Netlink service by creating a new Generic Netlink family (communication channel) “dbus”. Applications will use this communication channel to send and receive D-Bus messages.

In this scenario, most of the work that is currently done by the dbus-daemon will take place in the D-Bus Netlink service, such as adding applications to the bus when they gain ownership of a name (NameAcquired signal), route the messages to the destination based on the application’s unique name and maintaining match rules (AddMatch method).

The D-bus daemon will only be a special user of the Generic Netlink D-bus service, although it will still have some responsibilities such as authentication and, of course, implementing org.freedesktop.DBus service.

The other D-Bus users (apart from dbus-daemon itself), will just work as they do now, using the D-Bus wire protocol on top of the Netlink transport, although they will have to do some extra step, as explained below.

Genetlink D-bus will provide to applications the following services:
Mechanism to create and delete D-Bus buses: Since we need to separate the traffic for the different buses (system, user, etc) in the kernel module, we need a way for dbus-daemon instances to register buses in the kernel module. To do so, we can specify D-Bus family commands DBUS_CMD_NEWBUS and DBUS_CMD_DELBUS. The process who creates the bus will be the D-bus daemon implementing that bus and all the messages that have org.freedesktop.DBus as destination will be routed to it.

Besides the commands, we have to define a way to specify the name and type of the bus to be added. We can either store that information in a user defined header or define Generic Netlink family attributes to pass that information to the D-bus Generic Netlink service. In any case, the dbus-daemon will be the responsible for choosing a unique name (in the form netlink:name=unique_name), so that the kernel doesn’t have to read any configuration at all, and just has to associate the unique addresses with each bus.

Another option would be to map a D-Bus bus to a multicast group and use the Generic Netlink controller CTRL_CMD_NEWMCAST_GRP and CTRL_CMD_DELMCAST_GRP commands. But we need more fine-grained control over the routing of the messages. We can’t just use genlmsg_multicast() and send the message to every application in the bus. A signal message sent to a bus is not received by all the applications since AddMatch rules can prevent some applications to receive the message. So, we have to maintain our own multicast group based on match rules.

Connect and disconnect from buses: To allow applications to connect to a bus we can define another set of D-bus family commands DBUS_CMD_CONN_BUS and DBUS_CMD_DISC_BUS. When an application wants to connect to a bus, first the bus type is checked, if the type is a
session bus, then only processes that are executed with the same uid as the one for the D-bus daemon are allowed. This restriction is not true for system bus, which allows connection from processes running as any user. Connection requests are routed to the D-bus daemon who does the authentication.

As the create/delete group case, we need to specify to which bus we are trying to connect. We can also store that information on the user defined header or define a set of Generic Netlink family attributes.

Transport to send and receive messages: Receiving messages is straightforward. You only have to create a socket with:

int sd = create_nl_socket(NETLINK_GENERIC, 0);

and use standard BSD socket API such as recv().

To send messages to the bus we have to define a Generic Netlink D-bus family command DBUS_SEND_MSG and fill the Netlink header, Generic Netlink header and if applicable a D-bus service specific header:

struct sockaddr_nl nladdr;
struct {
	struct nlmsghdr n;
	struct genlmsghdr g;
	char buf[256];
} req;
char *dbus_message;

memset(&nladdr, 0, sizeof(nladdr));
nladdr.nl_family = AF_NETLINK;

req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
req.n.nlmsg_type = dbus_family_id;
req.n.nlmsg_flags = NLM_F_REQUEST;
req.g.cmd = DBUS_SEND_MSG;

na = (struct nlattr *) GENLMSG_DATA(&req);
na->nla_type = DBUS_ATTR_PAYLOAD;
na->nla_len = NLA_HDRLEN + strlen(dbus_message);
memcpy(NLA_DATA(na), &dbus_message, strlen(dbus_message));
req.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);

ret = sendto(sd, (char *)&req, req.n.nlmsg_len, 0, (struct sockaddr *) &nladdr,
	     sizeof(nladdr));

All this is even easier when using libnl, a library that simplifies a lot the use of Netlink in user-space applications. This library is used in other system services, like NetworkManager, so adding a dependency on it to D-Bus shouldn’t be a problem.

The Genetlink D-bus service will parse the D-bus message, add the sender field and route to the correct destination in the case of a unicast message. If the message is a signal, the service will get the recipients list according to the match rules.

Also, it will process the NameAcquired and NameLost signals as well as the AddMatch method calls, so that it can keep track of where the messages need to go to.

Security framework: In the previous sections, authentication was mentioned as one of the responsibilities of the dbus-daemon itself. This is indeed what it does right now, but with the kernel Netlink module doing the routing based on user id, as explained above, maybe no authentication is needed on the dbus-daemon side. The question is whether the dbus-daemon should trust all that comes from the kernel or just do an extra check.

For some more fine-grained security, D-Bus services can use PolicyKit to prompt the user requesting the operation for extra authentication.

Support sending large messages: Some D-Bus users complain about bad performance from D-Bus when sending large chunks of data over it, that being the reason for file descriptor passing being available on D-Bus. It is true, though, that one can argue that those applications shouldn’t be sending that much data over the bus, and that it is the application’s responsibility, but the truth is that the problem exists.

Netlink provides the ability to send large messages by using multipart messages, so that the data to be sent can be sliced into chunks (no bigger than the kernel socket buffers’ size), resulting in better performance.

Implementation details
All this needs a bigger change to libdbus/bindings as in our initial plan, since the Netlink messages, as explained before, carry on an extra header that needs to be parsed before the real D-Bus message is processed.

So, for libdbus, we will implement DBusServerNetlink object for the implementation of a Netlink-based D-Bus server, and DBusTransportNetlink for the actual implementation of the wire protocol to be used when using Netlink as a transport. DBusTransportNetlink will be responsible for getting and parsing messages from the Netlink D-Bus kernel service.

For bindings, similar work will be needed to add support to reading and writing Netlink messages, but with the use of the libnl library, this should make it easier, and anyway, it is part of our plan to add whatever code is needed to the most popular bindings.

And that’s all for now, any comments/feedback is appreciated.

18 de marzo de 2012

Cambios estéticos en el Aloweblog y URL

Acabo de terminar el cambio a un CSS más limpio y con la tipografía algo más grande. Evidentemente está basado en una ventana de GNOME 3 (yo es que soy muy original). Con todo, espero que les guste el nuevo tema.

El cambio me ha costado bastante, ya que mi conocimiento de CSS es justito, el maldito elemtno float hacía que el div contenedor acabase donde acababa él, y por lo tanto se comía la imagen de fondo que hace de parte lateral de la ventana. Al final, leyendo unos foros en español he conseguido encontrar la propiedad overflow: hidden; que se le debe aplicar al div padre para que se haga con el control del tamaño del div que tiene el float.

En fin, todo esto viene a cuento de que me ha dado por poner también los botones sociales en La Puerta de Tannhauser y con el poco espacio que tenía en la anchura de las entradas, se acababan viendo mal y superponiendo algunos sobre otros. Total, que me dije «llevas 6 años con el mismo diseño, ¿no crees que es hora de cambiar?» Iba a poner de cabecera una imagen de las tres siguientes:

5022318867_4084d4a4b3_o.png

6231594638_b833c4c1b1_o.jpg

6292261464_d2f88db0cb_o.jpg 

La que más me convencía era la del teatro de Düsseldorf, por la estética y los colores del blog, pero eso forma parte del pasado; quería la cabecera del Orloj pero no era capaz de verlo. Mientras ajustaba las imágenes con GIMP lo vi claro. Y aquí está el resultado.

Por otra parte, también he cambiado la dirección del blog, ahora estoy en aloriel.turismogoogle.net, ya que algunos amigos se han quejado de que no pueden enviar a Menéame o Tuenti mi blog porque el dominio no-ip está expulsado. Continuaré con no-ip un tiempo, pero les aconsejo que vayan actualizando sus enlaces si les interesa seguir leyéndome.

Etiquetas: ,

17 de marzo de 2012

Signing-party CACert y PGP en Madrid

 

El próximo 26 de marzo, a las 13h, tendrá lugar en el IES Clara del Rey de Madrid, un evento de verificación de identidad y firmado de claves PGP y CACert. Quienes queráis alcanzar un peldaño más en el uso de CACert (es decir, tener verificada la identidad real en los certificados digitales) o simplemente queráis aumentar vuestra red de confianza de PGP, podéis aprovechar esta reunión en la que se tratará de reunir un número suficiente de notarios CACert para aumentar esta red. Esperamos que sea un éxito :-)

Visualizando un grafo de dependencias en PHP

Receta rápida para visualizar un grafo de dependencias en PHP, como el que acompaña a este post (pincha sobre la imagen para hacer zoom sobre ella). Se trata del grafo de dependencias PHP de la aplicación Babelium Project, pero piensa que el objetivo es aprender a generar un grafo como éste de cualquier aplicación que [...]

16 de marzo de 2012

Epiphany meets the web app stores

In last weeks, I’ve been taking a look at the web applications standards support in Epiphany, as part of my work at Igalia. Xan wrote about the Save as web application feature present in Epiphany 3.2, that is a base for very simple (and userful) web applications support in Gnome desktop.

To continue with this work, I’ve been investigating on adding support for some web app stores. So I’ve done an experimental implementation for Mozilla Open Web Apps (as in 2011 tech preview), Chrome Web Store hosted and packaged apps, and Chrome CRX-less apps.


Screencast using Chrome Web Store.

This is an experiment. Not supported, and it may actually stay out of official Epiphany. So there are lots of things not working at all. This is first a way to have a big number of apps to play with our application mode, and improve it. So no permissions check, URL’s match may be broken, many apps will fail to even log in… Did I say it is an experiment? Most obvious issues are related with this external links handling bug.

But, if you just want to play with it, just try my branch webapp in my Epiphany Github repository. By default, support is disabled, so you’ll have to enable these keys:

$ gsettings set org.gnome.Epiphany.web enable-chrome-apps true
$ gsettings set org.gnome.Epiphany.web enable-open-web-apps true

You can try with Mozilla Labs Apps Dir from 2011 tech preview and Chrome Web Store.

15 de marzo de 2012

Busquedas por combinación de colores en Flickr

Viendo las visitas de mis fotos en Flickr me encuentro un enlace interesantérrimo: idée Multicolr Search Lab, que se define como:

The Multicolr Search Lab allows you to browse through 10 million of Flickr's most ‘interesting’ Creative Commons images using Idée's Piximilar technologies to find ones that share the same colours. Choose up to 10 colours from our palette of 120 different shades.

Multicolr Search Lab le permite examinar más de 10 millones de fotografías Creative Commons calificadas como interesantes en Flickr y que son similares en sus colores. Elija hasta 10 colores de nuestra paleta con 120 opciones.

Y permite hacerse con cosas como las de abajo:

idee_search_color_lab_1.jpg

Sigue leyendo...

Etiquetas: , , ,

14 de marzo de 2012

He grabado otro corto

He grabado otro corto. Esta vez soy un mago con un ligero problema de actitud. Está muy divertido.
Míralo, ríete y compártelo:



12 de marzo de 2012

De los Erasmus españoles

Este fin de semana se han celebrado varias fiestas de carnaval en Praga y me he vuelto a dar cuenta de algo que ya vi en su momento, aunque lo vi desde dentro y ahora lo he visto desde fuera.

Grupos de españoles, mucha gente, todos juntos, todos en su gueto. ¿20, 30 españoles? ninguna otra nacionalidad en el grupo, o apenas visible...

¿Por qué? Probablemente por esa idiosincrasia española tan reconocible y perenne: la incapacidad de aprender y hablar otros idiomas.

¿Desde cuándo aprenden inglés en la escuela los jóvenes españoles? ¿se empieza a los 5 años? ¿a los 10? Supongamos que los Erasmus tienen entre 20 y 25 años. ¿Entre 10 y 15 años no son suficientes para poder decir correctamente 5 putas malditas frases seguidas en inglés? 

Sigue leyendo...

Etiquetas: , , ,

07 de marzo de 2012

D-Bus optimizations II

As explained in my previous post, we are working on optimizing D-Bus for its usage on embedded systems (more precisely on GENIVI).

We started the discussion on the Linux-netdev mailing list about getting our patch to add multicast on UNIX sockets accepted, but, unfortunately, the feedback hasn’t been very good. So, since one of the premises from GENIVI is to get all the work we are doing accepted upstream, we have been thinking in the last few days about what else to use for, as stated in my previous post, fixing the main issue we have found in D-Bus performance, which is the number of context switches needed when getting all traffic on the bus through dbus-daemon. So, here’s a summary of the stuff we have been looking at:

  • Use TIPC, a socket family already available in modern kernel versions and which is targeted at clustering environments, although it can be used for communications inside a single node.
  • Use ZeroMQ, which is a library that, from a first look, provides the stuff we need for D-Bus, that is multicast on local sockets.
  • Provide the multicast on UNIX sockets as a new socket family (AF_MCAST), although this wasn’t well received neither on the linux-netdev discussion. This will contain a trimmed down version of AF_UNIX with only the stuff needed for doing multicast.
  • Extend the AF_DBUS work from Alban to include what we have learnt from the multicast AF_UNIX architecture. This would mean having a patch to the kernel that, as with the AF_MCAST solution, would have to be maintained by distributors, as the linux-netdev people didn’t like this solution neither.
  • Use Netlink, which has all that we need for D-Bus, that is, multicast and unicast, plus it is an established IPC mechanism in the kernel (from kernel space to user space), and is even used for other services similar to D-Bus. We would create a new Netlink subfamily for D-Bus, that would contain code to do the routing, as Netlink, for security reasons, does not allow direct connection between user space apps.
  • Use KBUS, which is a lightweight messaging system, provided as a kernel module.

Right now, we have working code for AF_MCAST, and are looking at Netlink, TIPC and KBUS, so will be blogging more details on what we find out in our experiments. But any feedback would be appreciated since, as stated before, we want to have all this work accepted upstream. So, comments, suggestions?

Córdoba en inglés se dice «Cordouva»

¿De verdad? ¿En inglés Córdoba también es «Cordova»? La primera vez que lo he visto, y más en Google.

cordova_google_maps.jpg

cordova_busqueda_google.jpg

Etiquetas: , , , ,

06 de marzo de 2012

RetroShare for Fedora

I've made a pretty dirty porting of the RetroShare package from Unity Linux for Fedora. It's not published in my repository until a minimal QA could be done. You can download it using this interin URI: http://olea.org/tmp/retroshare/retroshare-0.5.2a-2.i686.rpm

Caveats:

  • it's build in F16
  • SPEC source still needs love, so there is a weird dependency error forcing to install with the --nodeps flag
  • I didn't have the time to run it yet, so maybe it's not even operative

You can report me any issue through the comments bellow.

04 de marzo de 2012

Asus Zenbook unboxing

Last friday we bought an Asus Zenbook for Ana and I’d like to share some pictures of its unboxing. I don’t usually do this kind of things but this time I’ll do an exception since the computer presentation is full of impressive details.

IMG_20120302_212323 IMG_20120302_212416 IMG_20120302_212441 IMG_20120302_212559 IMG_20120302_212734 IMG_20120302_214950

Note the hapinness in Ana’s face :-)

On the technical side the computer has an Intel i5 processor with 4 Gigabytes of RAM an a 128 Gb SSD hard drive. It can boot Fedora 16 in less than 8 seconds and the startup time of big programs like Firefox or LibreOffice is blazing fast too.

03 de marzo de 2012

mt_srand deja de ser cuasialeatoria en PHP

Me envia, muy amablemente, un correo Sergio Aguilar quejándose de que le he metido en una lista negra por llenarme de «spam» el blog. Cuando me doy cuenta que desde hace no sé cuánto no se pueden publicar comentarios. Así que me pongo a investigar el porqué, y me encuentro con que la función que comprueba si la suma de los dos numeritos falla...

¿Por qué? ¿desde cuándo?

Pues desde PHP 5.2.1 que cambió mt_srand y cuando quiera que se instalase en el servidor que aloja La puerta de Tannhauser y Turismo Google:

La implementación de Mersenne Twister en PHP ahora usa un nuevo algoritmo de semilla de Richard Wagner. La misma semilla ahora ya no produce la misma secuencia de valores como sucedía en anteriores versiones. No se espera que se vuelva a cambiar de nuevo este comportamiento, aunque se considera inseguro confiar en él. 

Al parecer no soy el único descontento:

God bless my PHP 5.3.6, there is NO such strange behavior like this:

"---
Since 5.2.1
Mersenne Twister in PHP now use new algorythm of reinitializing, developed by Richard Wagner
Same seeds not produce same chains of values.
---"

O_

One's more: God bless my PHP 5.3.6, there is NO such strange behavior!
Same seeds produce SAME chains of values.
And it MUST be so!
M.T. IS PSEUDO random number generator. It is useful feature.

If we need truly random we will initialize our web-applications by mt_srand(Microtemperature_of_CPU)

Una vez más, gracias Sergio.

Etiquetas: ,

02 de marzo de 2012

Borrando el pasado

A comienzos de la semana vi que mi cuenta de correo de GMail estaba bastante llena, un 92% me avisaba Google, así que decidí tomar cartas en el asunto y eliminar algunos de los casi 40 000 correos que tenía mi cuenta.

Sé perfectamente que quién me ha reventado la cuenta ha sido mi primo con fotos de la familia, pero es mi primo, no puedo borrar tantas entrañables fotos que siempre veo, de mi familia en el exilio... no, ese soy yo...

En fin, que lo primero que (re)descubrí es que no hay una forma simple para encontrar correos grandes en GMail. Gran fallo. Existen herramientas de otros pero no me voy a dedicar a usarlas, lo siento pero no. Así que haciendo uso de has:attachment mp3 pps pdf ...fui capaz de ver correos que ya no deberían estar ahí. Canciones en español, inglés, eslovaco, checo, danés y alemán... enviadas durante mis juveniles años universitarios, durante y después del erasmus... documentos en Word y PPS con las típicas gilipolleces que ya ni lees... PDF de cosas que ya ni te interesan... Publicidad, registros, invitaciones a GMail y redes sociales...

Sigue leyendo...

Etiquetas: ,

28 de febrero de 2012

WebKitGTK+ 2.0 for GNOME 3.6?

That’s the plan! But, what’s exactly WebKitGTK+ 2.0? It will be the first stable release of WebKit2 GTK+ API, leaving the current WebKit GTK+ API in a maintenance mode. WebKit2 GTK+ is not just about multi-process architecture, robustness, stability and all other great things the new WebKit2 model brings, it’s also a redesign of the current WebKitGTK API to make it even more convenient and easier to use.

In the Igalia WebKit team,  we have planned a Roadmap of the tasks we will be actively working on to release WebKitGTK+ 2.0 for GNOME 3.6. Even though unit tests play a very important role in the WebKit2 GTK+ API development, we know that real applications using the API usually reveal issues that the unit tests or test programs like MiniBrowser don’t catch. For that reason, we have set milestones consisting of porting real applications to the new API.

  • GNOME 3.4: Applications using a small part of the API. We will focus on porting Devhelp.
  • GNOME 3.5: With the first unstable releases of the 3.5 cycle we should be able to port applications using the API more extensively. We will focus on porting Yelp.
  • GNOME 3.6: We should be able to port any application using WebKitGTK+ without major regressions. We will focus on porting Epiphany.

This is, of course, a plan, if we eventually don’t manage to achieve the milestones, we will release WebKitGTK+ 1.10 for GNOME 3.6 and current plan will be postponed to GNOME 3.8. Needless to say that any help would be more than welcome :-)

27 de febrero de 2012

Acceder a notificaciones.060.es con Fedora

A la hora de acceder al servicio de notificaciones oficiales de la administración pública española me he encontrado un problema con el uso de applet java con funciones criptográficas.

Mi configuración de partida consistía en

  • java-1.6.0-openjdk-1.6.0.0-65.1.11.1.fc16.i686.rpm
  • icedtea-web-1.1.4-4.fc16.i686.rpm

siendo icedtea-web el plugin java para navegadores (vía NPAPI) oficial de openjdk. No soy un gran usuario de applet vía web pero hasta ahora no recuerdo haber tenido ningún problema. Supongo que en este caso la clave está en los servicios criptográficos X.509.

Tras varias investigaciones esta es la configuración que me ha funcionado

  • Oracle JDK (en sabor RPM)
  • Scientific Linux java-1.6.0-sun-compat
  • he mantenido java-1.6.0-openjdk como alternativa java principal, lo cual es independiente del funcionamiento del plugin del original Oracle
  • adición de certificados X.509 a la infraestructura java de usuario (los applet no saben manejarlos desde el almacén del navegador) con ControlPanel:
    • [Seguridad]->[Certificados]->[CA de firmante]->[Importar]-> fichero FNMTClase2CA.crt
    • [Seguridad]->[Certificados]->[Autenticación de cliente]->[Importar] -> fichero con su certificado FNMT.
  • prueba de compatibilidad: enlace desde la especificación de requisitos de acceso.

Al acceder al certificado digital java pedirá la contraseña de protección que es exactamente la misma que tenía en el fichero importado.

Tras verificar el funcionamiento correcto he podido acceder a las notificaciones que tenía pendientes en notificaciones.060.es.

Ni con la configuración java afinada Chrome pasa la prueba (google-chrome-stable-17.0.963.56-121963).

Los usuarios de applet con funciones criptográficas que no usen servicios basados en certificados de la FNMT pueden encontrar útil la configuración general.

Lecciones aprendidas

  • El plugin de java ahora se llama libnpjp2.so, aunque siguen distribuyendo libjavaplugin_oji.so por motivos que desconozco. Me ha hecho perder una preciosa y enorme cantidad de tiempo con pruebas frustrantes.
  • Para los usuarios Fedora (y entiendo que CentOS, RHEL, etc) parece que tenemos la mejor manera de integrar el JDK oficial de Oracle a través del paquete java-1.6.0-sun-compat de Scientific Linux. Antes usaba la adaptación de JPackage java-1.6.0-sun pero creo que ya es innecesaria aparte de desactualizada.

D-Bus optimizations

In the last month and a half, I have been working, as part of my work at Collabora, on optimizing D-Bus, which even though is a great piece of software, has some performance problems that affect its further adoption (specially on embedded devices).

Fortunately, we didn’t have to start from scratch, since this has been an ongoing project at Collabora, where previous research and upstream discussions had been taking place.

Based on this great work (by Alban Créquy and Ian Molton, BTW), we started our work, looking first at the possible solutions for the biggest problems (context switches, as all traffic in the bus goes through the D-Bus daemon, as well as multiple copies of messages in their trip from one peer, via the kernel, then to the daemon, to end up in the peer the message is targeted to), which were:

  • AF_DBUS work from Alban/Ian: while it improved the performance of the bus by a big margin, the solution wasn’t very well accepted in the upstream kernel mailing list, as it involved having lots of D-Bus-specific code in the kernel (all the routing).
  • Shared memory: this has no proof-of-concept code to look at, but was a (maybe) good idea, as it would mean peers in the bus would use shared memory segments to send messages to each other. But this would mean mostly a rewrite of most of the current D-Bus code, so maybe an option for the future, but not for the short term.
  • Using some sort of multicast IPC that would allow peers in the bus to send messages to each other without having all messages go through the daemon, which, as found out by several performance tests, is the biggest bottleneck in current D-Bus performance. We had a look at different options, one of them being AF_NETLINK, which mostly provides all that is needed, although it has some limitations, the biggest one being that it drops packets when the receiver queue is full, which is not an option for the D-Bus case.
    UDP/IP multicast has been mentioned also in some of the discussions, but this seems to be too much overhead for the D-Bus use, as we would have to use eth0 or similar, as multicast on loopback device doesn’t exist (hence no D-Bus in computers without a network card). Also, losing packets is another caveat of this solution, as well as message order guarantee.

So, the solution we have come up with is to implement multicast on UNIX sockets, and make it support what we need for it in D-Bus, and, of course, make use of that in the D-Bus implementation itself. So, here’s what we have right now (please note that this is still a work in progress):

The way this works is better seen on a diagram, so here it is. First, how the current D-Bus architecture works:

and how this would be changed:

That is, when a peer wants to join a bus, it would connect to the daemon (exactly as it does today), authenticate, and, once the daemon knows the peer is authenticated, it would join the accept‘ed socket to the multicast group (this is important, as we don’t want to have peers join by themselves the multicast group, so it’s the daemon’s job to do that). Once the peer has joined the multicast group, it would use socket filters to determine what traffic it wants to receive, so that it only gets, from the kernel, the messages it really is interested in. The daemon would do the same, just setting its filters so that it only gets traffic to the bus itself (org.freedesktop.DBus well-known name).

In this multicast solution, we might have to prevent unauthorized eavesdropping, even though peers need to authenticate through the daemon to join the multicast group. For this, we have been thinking about using Linux Security Modules. It is still not 100% clear how this would be done, so more information on this soon.

The above-mentioned branches work right now, but as I said before, they are still a work in progress, so they still need several things before we can call this work finalized. For now, we have succeeded in making the daemon not get any traffic at all apart from what it really needs to get, so a big win there already as we are avoiding the expensive context switches, but the socket filters still need a lot of work, apart from other minor and not so minor things.

Right now, we are in the process of getting the kernel part accepted, which is in progress, and to finish the D-Bus branch to be in an upstreamable form. Apart from that, we will provide patches for all the D-Bus bindings we know about (GLib, QtDBus, python, etc).

Comments/suggestions/ideas welcome.

17 de febrero de 2012

De falsos amigos y no

Me encuentro leyendo «The third twin» (El tercer gemelo) y es evidente que lo ha escrito Ken Follet. Su estilo es, al menos en los tres libros suyos que he leído, el mismo. En cualquier caso no vengo a hablar del autor.

Durante la típica descripción previa y exhaustiva que Follet hace de sus personajes, menciona que una chiquilla es «garrulous», que automáticamente traduje como garrula; me sorprendió el adjetivo, pero ¿por qué no?

El caso es que al cabo de unos minutos me entró la curiosidad y me fui al diccionario a ver qué decía:

garrulous / 'gar?l?s/ adjetivo
charlatán, parlanchín


Diccionario Espasa Concise © 2000 Espasa Calpe:
garrulous ['gar?l?s] adjetivo locuaz, charlatán,-ana


'garrulous' also found in these Oxford entries:
Spanish:
gárrulo

Parece que sí, que es lo mismo. No, espera... gárrulo. ¿Gárrulo? No sería la primera vez que WordReference mete la gamba, pero ¿gárrulo? A ver:

garrulo, la.
(Quizá de gárrulo).
1. adj. coloq. Dicho de una persona: Rústica, zafia. U. t. c. s.

Quizá de gárrulo:

gárrulo, la.
(Del lat. garrulus).
1. adj. Dicho de un ave: Que canta, gorjea o chirría mucho.
2. adj. Dicho de una persona: Muy habladora o charlatana.
3. adj. Dicho de una cosa: Que hace ruido continuado, como el viento, un arroyo, etc.

Y esto ya tiene más sentido.

Etiquetas: , ,

16 de febrero de 2012

So you just installed Fedora. What now?

I’ve been a happy Fedora user since it was not called Fedora, not even Fedora Core. I used Redhat 8 and Redhat 9, then Fedora Core 1-6, then Fedora 7 – 16. When I got my current laptop, in september of 2009 I installed Fedora 11 and I’ve been upgrading without formating the hard drive until now. After 4 upgrades (12, 13, 14 and 15) I decided to install it from scratch since every upgrade leaves old stuff and I think it’s a good practice to clean it up every once in a while.

In this post I’ll summarize the things I did after installing Fedora 16 64 bits so I can use it as my personal reference for future installations.

Post install quick changes

The installation went smooth and after the first boot my main user was configured with English as its language. I changed it to Spanish and answered yes to the question about renaming the main folders (Downloads, Music, Videos, etc.).

As I installed Fedora with a encrypted home partition, every time my computer boots up I get asked for the password to open such partition. So I configured GNOME to automatically log in with my main user to avoid entering another password.

Auto login

After that I configured my online accounts. This is a new feature of GNOME 3.2. It’s nice to have your Google contacts integrated in GNOME aswell as your instant messaging accounts. I also set a picture for my user profile.

GNOME Accounts

System update and must-have programs

Then I updated the system since it was a couple of months since Fedora 16 came out:

yum update

Then I installed a few programs I can’t live without:

yum install epiphany gnote gnucash vim emacs hamster-applet Django rhino gimp planner wine

Backup restore

I copied my personal files from my external hard drive into my home directory but I didn’t do the same with the configuration files (everything starting with a dot). The reason is that I wanted to selectively copy those configuration files I know what they do and start doing source control on them. I already do that with Emacs and several other programs

Non Fedora packages

Then it was time to install that software that does not come with Fedora for different reasons (propietary software, not well packaged applications, etc.).

First I installed Chromium following the instructions of http://fedoraproject.org/wiki/Chromium

Using similar instructions I installed the Adobe Flash plugin for the browsers: http://fedoraproject.org/wiki/Flash

Then I added the RPMFusion repository with these instructions http://rpmfusion.org/Configuration and then I installed the NVidia drivers for my graphic card:

yum install kmod-nivida

As a web developer I like to have as many browsers as possible so I installed Opera: http://www.opera.com/browser/download/

When I tried to install Skype it didn’t work. Then I realized that the binary available Skype is compiled for 32 bits systems. So I had to install the 32 bits dependencies for Skype:

yum install mesa-dri-filesystem-7.11.2-1.fc16.i686 libgcc-4.6.2-1.fc16.i686 glibc-2.14.90-24.fc16.4.i686 nss-softokn-freebl-3.13.1-15.fc16.i686 libstdc++-4.6.2-1.fc16.i686 zlib-1.2.5-6.fc16.i686 libjpeg-turbo-1.1.1-3.fc16.i686 libffi-3.0.10-1.fc16.i686 2:libogg-1.2.2-3.fc15.i686 libselinux-2.1.6-5.fc16.i686 gamin-0.1.10-10.fc16.i686 glib2-2.30.2-1.fc16.i686 libICE-1.0.7-1.fc16.i686 ncurses-libs-5.9-2.20110716.fc16.i686 1:dbus-libs-1.4.10-3.fc16.i686 freetype-2.4.6-4.fc16.i686 expat-2.0.1-11.fc15.i686 alsa-lib-1.0.24-2.fc15.i686 libcom_err-1.41.14-2.fc15.i686 fontconfig-2.8.0-4.fc16.i686 readline-6.2-2.fc16.i686 sqlite-3.7.7.1-1.fc16.i686 flac-1.2.1-6.fc12.i686 1:libvorbis-1.3.2-1.fc15.i686 libsndfile-1.0.25-1.fc16.i686 llvm-libs-2.9-6.fc16.i686 libtiff-3.9.5-1.fc16.i686 2:libpng-1.2.46-1.fc16.i686 libXau-1.0.6-2.fc15.i686 libxcb-1.7-3.fc16.i686 libX11-1.4.3-1.fc16.i686 libXext-1.3.0-1.fc16.i686 libXfixes-5.0-1.fc16.i686 libXrender-0.9.6-2.fc15.i686 libXi-1.4.5-1.fc16.i686 libXtst-1.2.0-2.fc15.i686 libXrandr-1.3.1-2.fc15.i686 libXcursor-1.1.11-3.fc15.i686 libXdamage-1.1.3-2.fc15.i686 libXinerama-1.1.1-2.fc15.i686 libXxf86vm-1.1.1-2.fc15.i686 libpciaccess-0.12.1-1.fc15.i686 libdrm-2.4.30-1.fc16.i686 mesa-dri-drivers-7.11.2-1.fc16.i686 mesa-libGL-7.11.2-1.fc16.i686 libasyncns-0.8-2.fc15.i686 keyutils-libs-1.5.2-1.fc16.i686 krb5-libs-1.9.2-4.fc16.i686 openssl-1.0.0g-1.fc16.i686 1:qt-4.8.0-7.fc16.i686 libuuid-2.20.1-2.2.fc16.i686 libSM-1.2.0-2.fc15.i686 tcp_wrappers-libs-7.6-64.fc16.i686 pulseaudio-libs-0.9.23-1.fc16.i686 lcms-libs-1.19-4.fc16.i686 libmng-1.0.10-5.fc15.i686 1:qt-x11-4.8.0-7.fc16.i686 alsa-plugins-pulseaudio-1.0.24-3.fc16.i686 libXScrnSaver-1.2.1-2.fc15.i686 libv4l-0.8.5-1.fc16.i686 libXv-1.0.6-2.fc15.i68

I hope Skype gets better and they release a 64 bits version as the Adobe guys did with Flash, finally :-)

Then I installed Dropbox following these instructions http://www.dropbox.com/install?os=lnx and after that I started the Dropbox daemon:

dropbox start -i

Finally I installed support for listening mp3 and watching videos in propietary codecs:

yum install gstreamer-plugins-bad gstreamer-plugins-ugly

Advanced configuration

Now, it was time to configure some things in more detail. I installed gnome-tweak-tool and enabled the date in the clock area of the GNOME Shell top bar.

I also setup some keyboard shortcuts:

  • Windows key + T opens a Terminal
  • Left shift  + Right shift switches my keyboard layout beween English and Spanish (I use English layout for programming and Spanish layout for writting docs and emails)

I restored my Hamster db into the ~/.local/share/hamster-applet/ directory

I also configured Subversion to not store my password in plain text but in GNOME Keyring, which stores them encrypted. To do so I added the following option to the ~/.subversion/config file:

password-stores = gnome-keyring

and this other option into the [global] section of the ~/.subversion/servers file:

[global]
....
store-plaintext-passwords = no

 

14 de febrero de 2012

12 de febrero de 2012

Opciones

Con la nueva reforma laboral por decreto-ley, si eres español y vives y trabajas (es un decir) en España creo que sólo tienes tres opciones:

  • o estás pensando en cómo y cuándo va a ser la próxima gran huelga general
  • o estás pensando en irte del país
  • o eres un empresario que se está frotando las manos

De verdad, pensaba que no se podía hundir más el país y a su sociedad, al parecer me equivocaba.

Etiquetas: ,

08 de febrero de 2012

Wed 2012/Feb/08

02 de febrero de 2012

And... we're back

Después de una gran caída, llega un gran levantamiento. Esta vez, desde un servidor nuevo y mucho más modesto al que espero que no le entren kernel panic con tanta frecuencia.

Disculpen las molestias.

Etiquetas:

01 de febrero de 2012

Back to FOSDEM

So it seems I’m going to FOSDEM this year (yay!), together with a bunch of other Igalians who will be attending as well, coming from different places from across the globe (well, mainly from Europe this time).

I know some people will probably disagree with me on this, but for me FOSDEM is one of the greatest events of this kind, and so I’m quite happy to go there this time, specially after not being able to attend last year due to some unexpected (and unavoidable) personal matters.

Opposite to other occasions, this time I’ll be there not only as an attendant but also as an speaker, talking about WebKitGTK+, its status and the roadmap of the project towards WebKit2 (the split process model “flavour” of WebKit), together with my mate Philippe, on Sunday afternoon. Thus, for the first time ever, nobody will be able to accuse me of going there just because of the beer event, which wouldn’t be true anyway.

For the impatient ones, the talk will be mainly about reporting on the work done during the last months in “WebKitGTK+ land“, as well as on the stuff that is already planned for the upcoming releases. Good examples of those would be, for instance, the ongoing effort to add support for Accelerated Compositing, or just the new features related to WebKit2GTK+ such as, of course, the solution for enabling accessibility support there. Ah! And of course, we’ll try to run some demos there too… fingers crossed!

Besides, I’m of course looking forward to meeting some people I haven’t seen for a while now (haven’t attended to the latest Desktop Summit either, due to very good reasons too), so if you see me around and want to chat and/or meet for a while, just let me know. I must look shy, but it’s usually a matter of minutes (seconds?) for my shyness to go away…

So that’s it. Just a final line to say “thanks” to my company for fully sponsoring this thing.

See you in Brussels!

30 de enero de 2012

Forma tu propia nube de palabras (wordcloud) con R

Una receta rápida para que no se me traspapele :-) El siguiente script en R lee un fichero de texto (/tmp/article.txt), lo analiza y genera una vistosa nube de palabras. Depende de los paquetes tm (text mining), RColorBrewer (para la gestión de paletas de color) y wordcloud (el verdadero artífice de la nube final). En [...]

27 de enero de 2012

Accessibility support in WebKit2GTK+

As Piñeiro already mentioned in some posts, last week a bunch of hackers attended the ATK/AT-SPI Hackfest 2012 here at the Igalia offices, in the lovely city of Coruña.

As the guy working on accessibility support for WebKitGTK+, I attended the hackfest to join some other great people representing different projects, such as Mozilla, Orca, AT-SPI, ATK, GTK+ and Qt. So, apart from helping with some “local” organizational details of the hackfest and taking some pictures, I spent some time hacking in WebKitGTK+‘s accessibility code and participating in some discussions.

And from that dedication I managed to achieve some interesting things too, being my favorite ones a big refactoring of the a11y code in WebCore (so it’s now better organized and hence more readable and easy to hack on) and pushing my patch for enabling accessibility support in WebKit2GTK+, after going through a meticulous process of review (see the related WK bug), which started with the patch I wrote and attached back when attending to the WebKitGTK+ hackfest, as I mentioned in my previous entry in this blog.

Yeah, I know that some weeks have already passed since then and so perhaps you’re thinking this could have been done faster… but I’ve spent some weeks on holidays in Barcelona in December (pictures here!) and so I wouldn’t have much time before January to devote to this task. However, the patch got integrated faster than what I would expect when I proposed the first version of it, so I’m quite satisfied and happy anyway just by being able to announce this at this moment. Hope you share my joy :-)

So, what does this mean from the point of view of accessibility in GNOME? Well, that’s an easy question to answer: from now on, every browser that uses WebKit2GTK+ will be as much accessible as those using the previous version of WebKitGTK+, and this is definitely a good thing. Of course, I’m certain there will be bugs in this specific part that will need fixing (as it always happens), but for the time being this achievement means “yet another thing less” preventing us from pushing for upgrading some applications to switch to WebKit2GTK+, such as devhelp (some ongoing work already done, as my mate Carlos announced yesterday), yelpliferea… and the mighty Epiphany browser, which is rocking more and more ech day that goes by.

Last, I’d like to share with you an screenshot showing this new stuff, but as I am a little bit tired of always using Minibrowser (that small browser we use for testing WebKit2), so I decided to try instead that new branch Carlos recently pushed for devhelp, so you could check that what I mentioned before is actually true.

So here you have it (along with a couple of additions done with Gimp):

As you can see, devhelp is running and Accerciser is showing the full hierarchy of accessible objects associated to the application, starting in the UI process (GTK+ world) and continuing in the Web process, where all the accessible objects from the WebKitGTK+ world are being exposed. As I explained in a previous post, the magic making possible the connection between the two process is done by means of the AtkSocket and the AtkPlug classes, also represented in the screenshot attached above.

So, that’s it.

26 de enero de 2012

Porting devhelp to WebKit2

When MiniBrowser was ported to the new WebKit2 GTK+ API, I said we had plans to create a webkit2 branch for epiphany. And we’ll do it as soon as we have enough API, but epiphany uses most of the WebKit API so this is going to take a bit. In the meantime, we have decided to focus on other applications that use a small part of the WebKit API like devhelp, yelp, liferea, etc. Yesterday I pushed a webkit2 branch into the devhelp git repository with some initial commits that allow to use devhelp with WebKit2. Even though WebKit2 is available in the latest WebKit unstable releases, there’s a bug and public headers are not installed, so you need to build WebKit from git to be able to build the devhelp webkit2 branch. The main functionality works, but there are still some features missing that we are currently working on:

  • Policy client: used by devhelp to decide what to do with unknown content and to open links in a new tab with middle click. Martin Robinson is working on Policy Client API for WebKit2, the patches are pretty good and will be pushed soon.
  • Search: We already agreed on the new API and Sergio Villar wrote the patch that will also land soon.
  • Printing: This is not only about adding API, it requires adding support for printing in the Web process too. The main problem is that we need to show the print dialog in the UI process and render pages for printing in the Web process, so we can’t use GtkPrintOperation. We have already patches to implement basic printing support and adding initial API. These patches only work for UNIX, so patches to make it work in win32 would be really appreciated.
  • Editing commands: There’s already a patch to add cut, copy and paste API, but we are discussing the possibility to move to a more generic approach for editing commands.

And here is the mandatory screenshot, although there’s nothing special since WebKit2 changes don’t affect the UI.

Devhelp using WebKit2

Devhelp using WebKit2

We will keep updating the webkit2 branch when new API lands in WebKit until there aren’t regressions. Then we’ll focus on yelp which requires two important challenges: DOM bindings and context menu API.

25 de enero de 2012

Openshift: computación gratuita en la nube de RedHat

OpenShift Express es una plataforma (PaaS) gratuita para el despliegue de aplicaciones en la nube proporcionada por RedHat. En ella podremos desplegar aplicaciones Java, Perl, PHP, Python y Ruby.  Además, permite la instalación (también gratuita) de un servidor de bases de datos como MySQL, Postgres o MongoDB.  El procedimiento es bastante simple: al abrir una cuenta, [...]

20 de enero de 2012

Multitouch is near…

So, after a few strives during the last year, the multitouch Xorg patches were posted and merged to master last month, making multitouch available in the upcoming Xorg release. This turns the multitouch GTK+ branch into a suitable candidate for GTK+ 3.4, which obviously deserves a video demoing what’s up there:



Hopefully soon in master, very soon…