Posted on Dec 1, 2011

The Desktop Environment week


Nope, it’s not a national holiday. It’s the week that every geek wastes trying new DEs and, usually, it happens every year.

I don’t know if you are aware of this behaviour, but Linux users certainly do.

On regular basis, upgrades are made to all the Desktop Environments like KDE, Gnome, LXDE and so on and so forth. Linux users tend to hang out different social environments such as IRC, Mailing Lists and forums. In these places, there are lots of discussions like “what is the best DE?” and, usually, Gnome and KDE fanboys are the most involved. Users won’t notice this at the beginning of the discussion but, latently, something starts growing into their minds: the lusting after an alternative DE.

And here comes the worst.

Gnome users are typical the ones that brag about the cleanness and ease of use of their desktop. They are very likely to be self-convinced minimalists and they love GTK because they are clean and have thin borders and small buttons.

KDE users are the one exhibiting the most pastel-rounded smoothly-animated desktop ever. They claim that KDE is so gorgeous because of the integration of every single bit and every single app. They love Qt: these library are the most comprehensive and powerful library in the world and they should be used by everyone. Typically this kind of desktop has lots of hiccups because of the huge amount of enabled effects that are shipped with the default installation.

LXDE users are the ones that finally are celebrating the right-click implementation on their desktops.

Of course there are also the ones that do not use a DE at all. I think they are blessed.

When two different DE-users meet each other, the flames of hatred burn and there is some sort of vendor-buyer approach in which the two sides defend their position and aims to “convert” the opponent like priests do with people.
And here the seeds of a new change got planted in each other brains.

Typically, the KDE user, is the one that can hardly be convinced to switch because his creed relies upon getting more effects and more candy stuff. Unfortunately, there is nothing more bloated than KDE.

On the other hand, Gnome users are the one looking for more minimalism and less buttons, effects but more shortcuts and accelerators. Luckily for them, the world has plenty of alternatives.

When the alternatives begin being considered, the DE week starts.

During this week, the user installs thousands of apps, libraries that pull billions of dependencies with the sole scope of devastating the system. Notice that the productivity drops to nearly zero. The user gots distracted by new buttons, different applications promoting different semantics in their usage. The user starts tuning up the system, blaming against developers for missing features and, obviously, bugs.
The week has almost passed and the user has only to fix the so called “just two things” when, suddenly, realises that he quickly needs to do the typical thing that he always did with that specific program that he loves so much but doesn’t fit into the new environment.
Oh my sweet good Lord, tragedy.

Googling, aptituding, emerging, pacmanning and you name it. Nothing does feel the same as before, nothing seems to be so awesome as before. There’s nothing left to do if not rolling back to the previous habitat in which everything was just fine. At this point the exhaust user, whose productivity is back at maximum level, will exclaim “Aw, fuck off stupid douchebags. My system r0x and there’s nothing better than it. I will never ever never do that again. I just wasted up one week of my life”.
You know, though, that in one year you will be back at square one.

I want to conclude saying that I truly and sincerely give my deepest sympathy to all Gnome users. I know that Gnome 3 sucks for most of you and I hope you will eventually find your way. Once again.

Posted on Feb 3, 2011

Prune Quassel Database

Sometimes it happens that I remember to cleanup my Quassel database because it is growing a lot even if there are chat logs I don’t care anymore.

Anyway, this technique is a little bit extreme because this way you will completely remove any chat-log (both private and public) that occurred before a given date.

If you are using Quassel with sqlite3 database then let me redirect you to a script that’s hosted on a page in my website.

If, instead, you are using Quassel with a postgres backend, then the command to issue is just this one:

psql -U <your_quassel_db_user> -W -d <your_quassel_db> -c "DELETE FROM backlog WHERE time < (SELECT CURRENT_DATE - INTERVAL '120 day');"

The above command will remove any log in the database leaving untouched just those that are not older than 120 days. You can change the interval value by putting anything you want there. I usually feel comfortable having the last 4 months available, just in case.

However, if you are running a multi-identities quasselcore (and, of course, you have access to the database) than you really should refine that query by adding a restriction on the identity you are using or, in a more general sense, the one that you are aiming to cleanup.

Posted on Sep 7, 2010

Synchronize contacts and calendar between Linux, Mac OS X, iPhone and Nokia

Yeah!
Are you wondering if there’s a way to do such a thing? Yes, there is.
It’s a bit complicated, but not-so-much complicated, and here’s a definitive solution for your problem.

Let’s start saying that I managed to do that using Google Contacts (this link is a bit messy, you can reach a similar page through gMail’s homepage and by clicking “Contacts” on the left sidebar) and Google Calendar. Of course you’ll need a gMail account otherwise everything explained below won’t work.
Second thing I use a Nokia E52 that’s running Symbian 3rd FP2 that I am sure it supplies a Synchronize application that I can find in MenuControl panelPhoneSynchronization (this is a bare translation from Italian, that’s my native language: MenuPannello di controlloTelefonoSincronizzazione.
Third requirement is an account on Goosync. It’s completely free and you need to do that only if you’re going to sync the calendar. Yeah, you got it right: you don’t need Goosync if you’re going to sync only your contacts.

Well, I think we are all set: let’s start configuring those.

First of all make sure you have a backup of your contacts/agenda. That’s important because it’s aleatory the fact that the data are going to be pulled from the server rather than pushed. If the latter occurs, you’re busted.
Once your contacts are ready and set, you can sync those between the system using:

Linux / Mac OS X
Thunderbird: Use Zindus as I wrote in my previous blogpost
Mutt: Use Goobook

Mac OS X
Mail: Open the Address Book application and, in preferences, set to sync your account data using a Google account

iPhone
Just sync it with iTunes. Unfortunately I don’t know if there’s a “mobile” solution, never dug too much into it.

Nokia
Open the Synchronization application I reported above. Create a new profile and name it as you like, let’s say Google.
Then issue the following parameters:

  • Server version: 1.2
  • Server ID: Google
  • Data transport type: Internet
  • Network connection: As you wish (you can use WiFi or 3g, it’s up to you).
  • Host address: https://m.google.com/syncml
  • Port: 443
  • Username: your_gmail_account_@_gmail_dot_com
  • Password: I think you know that
  • Sync type: Both ways

Than, in address book settings (inside the application, don’t quit it), choose

  • Phone database: C:Contacts.db (but before modifying it please have a test with the default setting)
  • Address book database: contacts

Please double check your settings and make sure that you’ve entered then as I wrote: they are case-sensitive

Once your settings are working, please be aware of the following thing: sync works both ways but it’s not 100% reliable. In fact, sometimes, might happen that you delete a contact, it reappears because you had it in your address book on some old machine and then you have to delete that again. Or it may happen that there are conflicts you have to fix.
It’s not to scare the hell out of you, it’s just to say that it’s better if you keep a backup somewhere safe before doing invasive operation on those.

That’s fine, let’s move forward to the Calendar.

It works like the previous one, except that I haven’t tried to find a solution on Linux, yet.
So, let’s signup to Goosync and, if you follow the instructions on their site, you don’t need to issue the following stuff: it’s enough for you to switch profile to the new Goosync.com (in the same Synchronization application).
However, for the manual kind-of-guy (like me), create a new profile and name it as you like.
Enter the following parameters:

  • Server version: 1.2
  • Server ID: SyncWiseEnterprise
  • Data transport type: Internet
  • Network connection: As you wish (you can use WiFi or 3g, it’s up to you).
  • Host address: http://sync2.goosync.com
  • Port: 80
  • Username: your_goosync_username_here
  • Password: your_password_on_goosync
  • Sync type: Both ways

and, again, go to the Calendar settings and set the database to Calendar.

For what concerns Mac OS X, it’s enough for you to use iCal and, in the preferences, create an account and point it to the Google Calendar account. Make sure you deselect all the local calendars or you’re going to freak out.
iPhone applies to the same rule aforementioned: use iTunes and sync everything with it.

As you have might already understand, the limits given by this solution are:

  • You have to manually sync the data on the phone: good for people that don’t want the phone to start sending data while they’re outside, bad for people that commit a lot of changes to their contact’s list or have tons of appointments.
  • You have to manually switch between the two profiles: pain in the ass for the same above reasons. Of course you can buy a Premium account at Goosync website and then you can share contacts and calendar using the same profile.

Posted on Apr 17, 2010

Mutt and Google Contacts

I’ve begun using this amazing client to read my mail.
One thing I’m used to do is to keep all my contacts synchronized online with Google Contacts.

After a (small) research, I’ve run into goobook , a small python program that relies on gdata to perform queries onto Google Contact service.

It’s very handy and light so I’ve written the ebuild and I can say that it works like a charm.

If you are interested in configuring it, please keep reading.
Once installed you have to configure it properly in order to reach your account.

Fire up your favorite text editor and create a file named .goobookrc in your user’s homedir and put in there this content:

[DEFAULT]
email: youremailatgmaildotcom
password: yoursupahsecretpassword
max_results: 9999
cache_filename: ~/.goobook_cache
cache_expiry_hours: 24


That’s it. Goobook is configured.
Try it by running goobook query yourfriendnamehere. It’ll show the results if everything went well.

If you are, like me, a Mutt user, open your mutt configuration file and add the following lines:

# mail address completion
set query_command="goobook query '%s'"
bind editor <Tab> complete-query
macro index,pager a "<pipe-message>goobook add<return>" "add the sender address to Google contacts"


That’s it. This should be enough to set properly mutt to use goobook.
As you’ve probably already noticed, this will also configure your client to add contacts by pressing the ‘a’ letter on your keyboard.

All information written here has been taken from goobook official wiki page that contains something more.

Posted on Apr 16, 2010

XEN: Improve disk performance on domU

This post is about a nice discovery I made when I upgraded my XEN dom0 kernel to the latest one (2.6.32-).
I suddenly noticed that the I/O performance was highly dropping down when moving few small files (~350MB) from one partition to another one of the same hard-disk.

I worried myself so I began investigating about the issue and, eventually, I posted on xen-users mailing list .

After few days I’ve been told that the problem was probably given by the I/O scheduler on the guest machine.

The solution is to disable domU scheduler and leave all the work to the dom0 scheduler. And it, actually, did the trick for me.

In order to do that, just add ‘elevator=noop’ to the kernel’s bootflag of your guest machine and check if the system becomes more reactive.

If you are interested into the whole dynamic or you’re simply willing to understand better the reasons why this happens, here’s the thread on XEN mailing list.

If you’ll find a possible explanation for such a slow-down.

Just to be curious: drop me a comment about if something changes or not on your systems.