Today I’ve updated Xubuntu to the 14.04 LTS release. The process almost worked without flaws. Almost, because after rebooting, xfce did not start anymore.

As you may know, Ubuntu 14 comes with lightdm, so I’ve opened /var/log/lightdm/lightdm.log and I’ve found the following:

[+0.01s] DEBUG: Seat: Failed to find session configuration unity-greeter
[+0.01s] DEBUG: Seat: Failed to create greeter session

Wait, unity? I’ve installed Xubuntu because I prefer to use xfce, why should be unity configured?! So I’ve opened  /etc/lightdm/lightdm.conf and edited it like this:


After a reboot, probably it would have been enough to restart just lightdm, I got back my desktop environment.

A brief post just to try not to forget. If you want to search for a string in files with a specific name contained in zip archives, this might help you:

find . -name "201501*.zip" -exec unzip -c '{}' "**/600*" \; 2> /dev/null | grep "CONFIG;[0-9]+;" - | more

Sometimes the archives did not contained the file we are looking for, so in order to avoid messages like “caution: filename not matched:  **/600*” we are redirecting stderr to /dev/null. Obviously, after writing my own, I’ve discovered that somebody else already solved a similar problem with the command (actually the manpage says that it is a script) zipgrep. So, the previous line could be rewritten as

find . -name "201501*.zip" -exec zipgrep -s "CONFIG;[0-9]*" '{}' '*/600*' \;

In the end the first try is not that useless, since it could be easily adapted to other archive types.

For once a post that is not computer related. If you have bought an Ikea Pax closet with Hinged doors, and you want to quickly mount the hinges, keep on reading. My Pax is 236 cm high, so the hinges will go:

  • 1st from the top in the third hole
  • 2nd from the top, count 27 holes from the top hinge

And the same applies for the bottom ones:

  • 1st from the bottom, in the third hole from the bottom
  • 2nd from the bottom, count 27 holes from the bottom hinge.

Nothing really complicated, but I hope this could help you speeding up the assembly process.

Per una volta un articolo non relativo ai computer. Se per caso avete comprato un Pax, con corpo da 236cm e ante a cerniera, e volete sapere in quali fori vanno montate le cerniere, continuate a leggere.

  • 1a dall’alto nel terzo foro.
  • 2a dall’alto, contate 27 fori a partire dalla cerniera in alto.

Lo stesso per le cerniere in basso, ovvero:

  • 1a dal basso, nel terzo foro dal
  • 2a dal basso, contate 27 fori a partire dalla cerniera in basso.

Niente di complicato, ma spero di aiutare qualcuno con il montaggio.

Also, mein erster Post auf Deutsch und nicht über Computer, gleichzeitig! Wenn ihr einen Pax Schrank (236cm hoch) mit Scharnier-Türen gekauft habt, und wissen wollt wo die Scharniere montiert werden sollen, bitte weiter lesen.

  • Das 1te von oben geht in das 3te
  • Das 2te von oben: ihr müsst 27 Löcher von oben zählen.

Und genauso das gleiche Vorgehen für die unteren Scharniere:

  • Das 1te von unten geht in das 3te
  • Das 2te von unten: ihr müsst 27 Löcher von unten zählen.

Es ist nicht besonders kompliziert, aber ich hoffen ich kann jemandem helfen.

If that is what you are thinking, and you have a quite big git repository (well, at least mine is about 409 MB, don’t know if that qualifies a quite big), you might encounter a few problems using EGit, the Eclipse git plugin. A quick fix that restored Eclipse to a reasonable responsiveness is to disable label decoration for the git plugin. To do so navigate to Window->Preferences->General->Appearance->Label Decorations and unselect git.


Label decorations had an impact between 10-20 seconds every time I modified the git repository. I can live without fancy decorations, and by the way, check out my tig config file, that is fancy ;)

If you never heard of tig, well, probably you are not a fan of git, or the command line, or just both. There are already a few blog posts about it, like this one, or this one. So if you don’t know what tig is, go read them.

The only think I didn’t like about tig, is that it comes by default with a not very pleasant color scheme. Luckily colours are configurable, so I decided to define a custom color scheme, that aims to recall the 256 colours vim theme desert. Here are a couple of screenshot, that shows how tig is going to look with it.

Screen Shot 2013-05-27 at 09.41.19

Screen Shot 2013-05-27 at 09.41.46

So, if you like it, you can download it from my GitHub page. If you would like to improve it, please write, or open a pull request, or wathever.

JBoss 7.1.1 comes with JBossWS-cxf-4.0.2.GA bundled. But if you plan to deploy a Spring based application, containing some web services, be sure to update to JBoss-cxf-4.1.1.Final, otherwise you will incur in the following error:

Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException
 at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.getSpringBusFactory(JBossWSBus

That’s very simple: follow the official instructions ;) The problem is caused by a known bug.

For my last couple of Java projects, I decided to use Maven. It was a long due  experiment. I’m not gonna talk about my experience with it, maybe in a future post, suffice to say that I’m quite satisfied. The first project went to production a couple of weeks ago, and all went fine, except for one thing. Reading the specs of the project, I overlooked the tiny little print that stated: “The final product must be built with Ant“.
, was the first thing I thought. Obviously, the client refused the proposal to install Maven. As a programmer, I usually try to solve my problem the lazy way. I really don’t want to commit all the project dependencies to the Subversion repository. That sort of freaks me out. Here enters the Ant mvn task. For the sake of simplicity, the mvn task can be seen as, more or less, a wrapper that allows to invoke a Maven build from ant. I felt I was on the right track, but I thought I had one more problem to solve: how to install Maven on any possible build machine ? Luckily, the answer lied in the documentation.

<target name="build">
    <artifact:mvn mavenVersion="3.0.3" pom="./pom.xml">
        <arg value="package"/>

This snippet shows how to invoke a Maven goal, specifying the pom location and the Maven version we would like to use. The first time you run the build, the mvn task will take care of downloading mvn with all the necessary dependencies. That was easy.
There is one last thing to take care of though, dependencies. My project depends on a few libraries, and in particular on the JMS jar, which, due to license restrictions, cannot be distributed through a Maven repository. So I have to install it in my local repo, and the following snippet shows how:

<artifact:pom id="jms-dep" file="deps/jms-1.1.pom"/>
<artifact:install file="deps/jms-1.1.jar">
    <pom refid="jms-dep"/>

This snippet should go in a target executed before the build one. So, let’s have a look at the complete build.xml:

<project name="gestoreAlert" default="build" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
        Invoke mvn package goal.

    <path id="maven-ant-tasks.classpath" path="maven-ant-tasks-2.1.3.jar" />
    <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
        classpathref="maven-ant-tasks.classpath" />

   <artifact:localRepository id="local.repository" path="~/.m2/repository" layout="default" />

   <target name="deps">
       <artifact:pom id="jms-dep" file="deps/jms-1.1.pom"/>
       <artifact:install file="deps/jms-1.1.jar">
           <pom refid="jms-dep"/>

       <artifact:pom id="jboss-javaee-dep" file="deps/jboss-javaee-5.1.0.GA.pom"/>
       <artifact:install file="deps/jboss-javaee-5.1.0.GA.jar">
          <pom refid="jboss-javaee-dep"/>

       <artifact:pom id="kryo-dep" file="deps/kryo-2.0.5.pom"/>
       <artifact:install file="deps/kryo2-2.05-all.jar">
          <pom refid="kryo-dep"/>

   <target name="build" depends="deps">
       <artifact:mvn mavenVersion="3.0.3" pom="./pom.xml">
           <arg value="package"/>

Any key on the keyboardA few weeks ago I was waiting for my flight at the Zurich Airport. While watching an episode of the last season of House, a guy tapped on my shoulder asking for help with the wifi connection. He wanted to know if he could surf the web. Obviously there were a few different available network. So I answered him «Sure, just connect to any open network, and surf on some website […]». So he said: «Ok, thanks, I’ll connect to any network.» At first I didn’t pay much attention to his answer, but just a second before leaving the wating lounge, I checked the available networks with my phone. And there was the any network. Those Swiss have some humor :-)

A few months ago, a MacBookPro became my working machine. As a long time Linux user, I’m pretty much used to case sensitivity in everything I do. Like searching in a man page, for instance. If I don’t remember the meaning of ‘-l’, why should I care about ‘-L’? So, if you’re like me, you might wanna have a look at /private/etc/man.conf at the lines

PAGER        /usr/bin/less -is
BROWSER      /usr/bin/less -is

and remove the -i options.

You’re probably thinking “Wait a moment, you really wrote a post about this ancient technology in 2012?” Yeah, I know, I use WhatsApp too, and not only because it is based on an Erlang backend. So, if you’re already an expert on the matter, you can stop reading now, I won’t take it personally ;)

A few weeks ago, I read some articles regarding the problem of SMS’ cost, when sending texts with accented caps. One of the article’s heading was something like “Beware the accents, they are worth 70 characters”.  Come again please, a single letter that takes 70s? That must be quite some hype, right? When I owned my old faithful Nokia, I simply used to ignore orthography writing, for example, è or E’ instead of È and so forth. Now that my Android handset has an almost QWERTY keyboard, I try to write correctly, so I knew it was time to understand what was really going on. Follow me, it will only takes some very basic maths.

Texts are encoded using a character set called 03.38. With this encoding, your mobile may choose between 3 different encodings: 7 bit, 8 bit or 16 bit. The 7 bit one is the default GSM encoding, we’re not interested in the 8 bit one, while the 16 bit corresponds to UTF-16 alphabet. In some older documents you may read UCS2 instead of UTF-16, this is simply due to the fact that UTF-16 is the successor of UCS2. One more fact, and then you’ll be needing your trusted calculator. An SMS is long at most 140 octets. Hey you nerd, I only want my 160 characters! Don’t worry, here they are:

  • 7 bit encoding: 140 * 8 / 7 = 160 characters
  • 16 bit encoding: 140 * 8 / 16 = 70 characters

So, if you write a character not included in the 7 bit alphabet, like the infamous È, your phone will (probably) silently switch to the UTF encoding, which explains the reduced available text.

Long story short: will an accented character eat up 70 precious characters? No way :)

Reference: 3GPP Alphabets and language-specific information


Get every new post delivered to your Inbox.