Long time, no blog entries.
I have to say that my life changed quite a bit: a newborn baby to take care of (Riccardo), a new job and soon a new house.
Another thing that I changed (less important than the above, but daily used) is the operative system: I've switched from Microsoft Windows to Kubuntu Linux
The move was painful, especially at the beginning, and IMHO still not possible for an average user. For my mother it would have been impossible to figure out how to make wifi and video card working, let alone the modem, on my Lenovo T43p.
However, I recently found 2 useful Linux hacks.
First Hack: How to avoid duplicate commands in the bash history (when you hit arrow up in a shell).
; at the beginning of the file there is an entry such as:
It's probably remarked, or has another value. Setting it to 'erasedups' made the hack.
Second Hack: How to correctly configure /etc/hosts when using DHCP.
It turns out that the dhcp client may run scripts when it binds (and when it releases).
The scripts for binding are
, and all the scripts inside directory
Correspondent scripts for releasing are
and those inside directory
was missing in my configuration. I created it and put this inside:
# This script updates /etc/hosts with the address received by the DHCP server
cp -a $HOSTS $BACKUP
cat <<EOF > $HOSTS
# This file is generated by a script: do no edit; edit instead $LOCAL
# Created by $0 on `date`
127.0.0.1 localhost localhost.localdomain
# The following lines are desirable for IPv6 capable hosts
# Entries from file $LOCAL, if any
test -f $LOCAL && cat $LOCAL >> $HOSTS
if [ "$new_ip_address" ]; then
With this script, /etc/hosts gets regenerated every time the dhcp client runs, and assigns the IP address received via DHCP to the hostname of the computer.
Still not perfect (if you have multiple network interfaces), but it's possible to improve it.
For me, for now, does the job :)