Gentoo 2008.0 Roadmap.

After the troubled last weeks, there is eventually a good news about Gentoo: there is a roadmap to the release of the long awaited 2008.0 version of this extremely good distribution.

Just to drop few lines about Gentoo, it helps sometimes to remember the main feature of this distribution (or, as many use to define it, meta-distribution): it’s compiled from scratch starting from a minimal binary base (that can itself be rebuilt as well). This may sound difficult and boring, but in fact it is neither: the portage structure and the emerge tool helps in the process of installing applications and automates everything, giving at the same time the possibility to customize every aspect of the building process.

Just as an example, the portage tree (as is called the database of available applications) can be updated as easily as writing (as root)

# emerge --sync

or, if the helper application eix is installed

# eix-sync

Updating the system (or world, aka non-system, or a single package) application is in now way harder:

#emerge -v -a -u -D [system | world | package-name ]

… where -a is for being actually asked for a confirmation before updating anything, -v for verbose mode, -u for update, -D (optional) for an update that digs deeper in the dependency tree to find packages to update.

For the very first steps of the installation, i is important is to follow the simple instructions easily found in the quick install docs to get the system up and running: this gives a first platform to start emerging the whole system.

For the faint hearted: Sabayon Linux, aka Gentoo made easy

For those who are still scared of compiling the whole system from the very beginning, well, there is still a chance: Sabayon Linux. This Italian distribution offers a complete, fully working and easy to administer Gentoo distribution. It is available both in CD and DVD and had all the features and benefits of Gentoo. Just without the need of compiling everything: this last option is still available, but you are not required to do it.

Try it. You’ll be pleased!

VoIP, SIP, Wengo and Linux.

After a long break, I started again to use VoIP. In fact I am a paying subscriber of wengo, a French company which offers a really cheap alternative to the more famous skype for calling landlines all over the world. After noticing that my favorite application, openwengo (the GPL, qt based client developed by wengo), was randomly crashing, I decided to recompile it. The gentoo ebuild of wengophone binary package was updated, so I emerged it. It compiled fine, so I tried to run it. No way. There were complaints about libcrypto.so and libssl not to offer version number. Funny enough, I did not manage to let my system understand that it should use the library that came together with the wengo binary package (that were thus probably working for it). And in the meanwhile, the working version got uninstalled…

Second try: I added a layman overlay portage called “voip”, that containes a source ebuild of wengo. Compiling it worked fine again, but the resulting binary just crashed few seconds after getting registered on line.

Darn. I *want* to use the money in my wengo account, I want to use Linux (I have no windows at all) and I want to call my friends alla around Europe from my computer!!!

Today I decided to try to benefit of wengo best feature. In fact, from the very first day I tried it, I was pleased by the the protocol chosen by the French communication company: the one called SIP. There is plenty of free and commercial SIP clients, and most of them /probably all of them, in fact…) can be used to register on the wengo VoIP server.

I tried many of them: here is then my comparison and, more important, here are some tips on how to configure them with a wengo account.

A small list

Looking for info about SIP clients, I stumbled upon this page, in Italian. Among them, I installed (emerged) some:

Ekiga looks good and is pretty easy to configure. Kphone is rather poor as for the interface but works fine.
I like Twinkle very much, is easy and good enough for my needs.

All of them need to be configured in order to connect to the wengo SIP server.

How to configure SIP clients

Every client needs some basic information to connect to wengo: first of all username and password. Please, notice that the username and password you provide to the openwngo client are a simplified version of the actual ones. Most of the information you need can be found on the page resulting from this https query, where you need to paste your normal wengo data.

You’ll get something like this:


?
	<sso vapi="1">
<status code="200">OK</status>
<user>SOMEUSERNAME</user>
<userid>SOMEUSERNAME</userid>
<displayname>SOMEUSERNAME</displayname>
<password>SOMECOMPLICATEDPASSWORD</password>
<outbound>1</outbound>
<realm>voip.wengo.fr</realm>
?
	<proxy>
<host>213.91.9.206</host>
<port>5060</port>
</proxy>
?
	<server>
<host>voip.wengo.fr</host>
<port>5060</port>
</server>
?
	<httptunnel>
<host>httpproxy.wengo.fr</host>
</httptunnel>
</sso>


Here you’ll find all the information needed to configure your wengo account on any other client!

References

  1. Ekiga configuration on Ubuntu forum
  2. Information on how to get the needed data on openwengo wiki

javascript diverses

Still fooling around this the iyc2007 pages. And learning a bit of javascript.

Exactly, I was looking for a way to get the actual document absolute path, in order to link to the right page when writing many pages on different levels. Probably it’s no wonder for may people, but maybe someone is looking for the same answer i was looking for today.

So this is the code:


<script type="text/javascript">
var docPath = new String;
docPath = location.href.substring(0,location.href.lastIndexOf("/"));
document.write(location.href.substring(0,location.href.lastIndexOf("/")));
</script>

For this page, this is the output of the script:

Actually, I needed it to feed the flv mediaplayer with the path of the file, which behaves strangely if you feed it with relative path. This way gives the absolute path, as you can see.

News from my blog

Ok, as posted yesterday, I upgraded some parts of the blog. In fact I installed plaintxtBlog version 3.0.2 by Scott Allan Wallick. The previous one, version 2.3, was really outdated, as Scott himself pointed out in a comment on this very pages. Sorry, Scott, if I did not upgrade earlier, and thanks a lot for the theme you developed.

This version runs really smooth and, as before, it’s widgets ready. So I finally managed to install some widgets on the sidebar. Especially, the CD covers you can admire on the said sidebar are brought to you by a nice widget developed by a guy called Dog Of Dirk. The widget is Run for Cover. I just modified some parts of the php code of the widget to make it valid XHTML 1.0 Transitional code. I tried to contact the author, but found no useful address on his page. The mod is really easy, and concerns adding a alt attribute to the img tag that is generate to display the pictures. The substitution is as follows:

The lines

$rfc_imgHTML = "<img src='" . $rfc_AMZimg['image'] . "' "
. "title='" . $rfc_safe_title . ": " . $rfc_safe_artist . "' ";

must become

$rfc_imgHTML = "<img src='" . $rfc_AMZimg['image'] . "' "
. "title='" . $rfc_safe_title . ": " . $rfc_safe_artist . "' " . "alt='" . $rfc_safe_title . ": " . $rfc_safe_artist . "' ";

And the XHTML validates.

Another new entry is a category cloud loaded as a widget. The former one was taken from a piece of code I found somewhere (I really can’t remember where exactly) that looked like this:


< ?php
// Recupero le informazioni sulle categorie dal database
$qrystr = "SELECT cat_ID, cat_name, category_count from $wpdb->categories ORDER BY cat_name";
$cats = $wpdb->get_results($qrystr);
//Recupero il numero massimo di post per una singola categoria
$max_value = 0;
foreach ($cats as $cat)
{
if ($max_value < $cat->category_count) {
$max_value = $cat->category_count;
}
}
//Considero 15 scalini , a partire da 60% a 200%
//Per modificare questi due valori basta modificare i valori delle variabili
$percentuale_minima = 80;
$percentuale_massima = 190;
$percentuale_scalino = 10;
$numero_scalini = ($percentuale_massima-$percentuale_minima)/$percentuale_scalino;
$post_per_scalino = $max_value / $numero_scalini;
// Stampo tutte le categoria all'interno di un div (id=cloud)
// assegno una classe alla categoria (o alle categorie) piĆ¹ grandi
echo '<div id="cloud">';
foreach ($cats as $cat)
{
$catname = $cat->cat_name;
$catlink = get_category_link($cat->cat_ID);
$postcnt = $cat->category_count;
if ($postcnt != 0) {
$percentuale_fontsize = $percentuale_minima+(Round($postcnt/$post_per_scalino)*$percentuale_scalino);
echo '<a href="',$catlink,'"';
if ($percentuale_fontsize==$percentuale_massima) {
echo ' style="font-size: ', $percentuale_fontsize,'%" class="top_category" title="',$postcnt,' post">';
}
else {
echo ' style="font-size: ', $percentuale_fontsize,'%" title="',$postcnt,' post">';
}
echo $catname,"\r";
}
}
echo "";
?>

In fact it worked perfectly. But I found a way to better integrate the theme, and in fact this is a widget named Category Cloud Widget developed by Lee Kelleher.

I just needed to differentiate the most used category with some visual effect, so i added


if ($count == $max_num) { $max_class="class=\"top_category\""; } else { $max_class=""; }

after these lines


foreach ($counts as $catname => $count)
{
$catlink = $catlinks{$catname};

and defined a top_category css class for the cloud div. In the original widget the cloud is a <p> but I prefered to have a div.

I still have to fix some minor problems with the page templates and finally I need to solve the permalink problem with mod_rewrite that prevents galleryo (an old plugin) from working properly.

Mitakuye Oyasin!

IMAGE FILE EXECUTION OPTIONS

After a while, I am back on the net. And with a new bad windows story, but with an happy end. Here you are.

Few days ago a colleague called me saying that her computer, finally, was really too slow, the Internet connection behaved in weird way and she could not use her computer anymore. She was at home, ill, and she needed her computer to be connected to the world. I took my motorbike and reached her place. On my USB stick I had all the tools I thought would have been useful to cure the – probably – infected computer: Avira AntiVir (a free Antivirus software that proved a valid alternative to commercial, high cost softwares), SpyBot (good anti spy- and malware software), Mozilla Firefox (because browsing shouldn’t be the way you get any virus!) and ZoneAlarm (a good free firewall software).

First of all, I said to myself, let’s fire up the Antivirus. If any nasty thing is on this computer, Avira will kill it. And in fact I found something like 100 different viruses, trojan horses and similar malware. Some of them where deleted, some others just put on quarantine. Ok, now let’s restart the system and start installing the various little useful programs to immunize this damn buggy Windows XP. Yes, yes, it’s easier to say than to actually do! After reboot, the computer displayed the nice wallpaper and nothing more. No icons, no program bar, no start menu. “oh my, oh my” I thought. Before my intervention the computer was _at least_ working, even if badly. Now, no way. I could only run the task manager and from there run single applications.

No way to fire up the “missing” explorer.exe, which, as you all know, is responsible for icons and start menu. Looking for it in the windows folder gave a “explorer.exe cannot be found” error. Damn, it’s there! I see it. But no way. We had no internet and so I had no chance to get any information from anywhere. I decided to take the poor laptop with me and, if needed, format and reinstall all the system. But I hate it. It’s a defeat. It’s loosing against crappy Microsoft products. And in fact, I found a solution, surfin’ around the web. In a forum I found the light. I discovered a “criminal” register key in Windows which is responsible of redirecting calls to one executable to another. Why should any sane person want this, it’s something beyond my understanding.

The key is
HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENT VERSION\IMAGE FILE EXECUTION OPTIONS\

In my friends computer I found one of the entries pointed from explorer.exe to one of the viral files quarantined by the antivirus. There was another one redirecting away from iexplorer.exe. “aha! now I understand some strange Internet Explorer behaviour!” I shouted!

I deleted the entries and restarted the computer. “Eureka!”. It worked. And I saved hours of my time for reinstalling the whole system.

Damn Bill. Damn Windows.

Mitakuye Oyasin!

PS: no, I don’t know which virus did such a thing. Sorry.