"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." (Robert A. Heinlein)

Wednesday, 30 December 2009

Switching to Xubuntu

In spite of my first impressions after some weeks of real use my desktop computer seems to be slowed down by the latest Ubuntu upgrade. The system is still functional but, while using some application, like Firefox, it starts loosing in fluidity. I so decided to try changing the desktop manager installing XFCE in place of Gnome.
Installing XFCE on Ubuntu is just a one-command matter:
sudo apt-get install xubuntu-desktop

Thursday, 24 December 2009

Saturday, 12 December 2009

Recovering accidentally deleted photos using Linux

I suppose it happened almost everybody to have some digital photo accidentally deleted from a memory card. It happened to me some days ago, after a power failure, I discovered the photos I was moving from the camera already had disappeared from the memory card but never had been saved on the hard disk.

The undelete process

The memory card, fortunately, did no suffer any damage during the power failure. Following instructions on this Ubuntu community documentation page I installed foremost:
sudo apt-get install foremost
then I executed it
sudo foremost -i /dev/sdc1 -o /recovery/foremost
/dev/sdc1” is the card reader device .
The program extracted all previously deleted in the output directory all neatly separated, by file type, in different folders.

Sunday, 29 November 2009

Some post-upgrade activities on the EEEPC

After the upgrade to Ubuntu 9.10 I spent some time installing some of the applications I had in the previous installation and doing some little system tuning.
  • Enabled the bash “smart” completion function that helps completing not only file names but also commands options: I edited the “bash.bashrc” file ...
sudo gedit /etc/bash.bashrc
and removed comments from the following lines (more details here)
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
  • Installed Fbreader: I installed it using “Ubuntu software center” then I copied files “books.xml” and “config.xml” from the previous installation backup in the ".FBReader" folder in order to keep my configuration and books list.
  • Installed TrueCrypt: I just downloaded the last version from here and installed it following the same process I already used.
  • Installed Java and NetBeans: Ubuntu 9.10 repositories are quite up-to-date so I first installed Java JDK (1.6.0_15) using apt-get command:
sudo apt-get install sun-java6-jdk
then I simply installed Netbeans (6.7.1) from the software center

Tuesday, 17 November 2009

Installed Ubuntu 9.10 (NBR) on EEEPC 900

The upgrades season continues … after upgrading my desktop I decided to give a try to the lastly released Ubuntu version also on the EEEPC. I so downloaded, using bittorrent, Ubuntu 9.10 NBR ISO image from here and prepared a bootable SD card using the utility provided in Ubuntu desktop. I then started the EEEPC from the SD card reader and had my first test run on the system.

Tuesday, 10 November 2009

Upgraded to Ubuntu 9.10

I recently upgraded my desktop computer (Sempron 2400) to the last released Ubuntu version. I decided to upgrade using the Ubuntu update manager, I so started the upgrade process and ... went to bed since it promised something like eight hours of download time.
The day after I continued the installation process and, at last, restarted my machine.

Saturday, 24 October 2009

Alice 3 (beta) on the EEEPC

To be a programmer might result a satisfying activity but hardly it can be defined “fun”. One can work for months to a project with no better reward than an error free log file. I'm not complaining of my job but I understand what makes it sometimes unpopular among students. Alice is an educational development environment that tries to make programming less boring to students by providing an easy way of writing programs that interact with a 3D game-like environment.

What's new in version 3

The key points in Alice are the easy user interface that let you program only by drag-and-drop operation, the availability of many easy methods to manipulate the 3D environment and a rich library of 3D objects and characters ready to be used in programs. In particular Alice version 3 provides an object library enriched by a subset of Electronics Arts™ SIMS 2™ characters.
Among the many improvements of Alice 3 the one that triggered my interest was the availability of a plug-in to import Alice projects in NetBeans, this makes easy using Java to interact with Alice 3D world.

Friday, 23 October 2009

Happy blogbirth-day!

Blog-birthday, blog-versary how do you prefer to call it? Anyway one year is already passed from my very first post. I could bore you with a long post full of anecdotes from the past, considerations about the present and good proposals for the future … but you know this is not my style. So many thanks to all the blog visitors and readers and, in particular, to a friend who, one year ago, convinced me to start blogging. Please come in and have your (virtual) slice of cake!

Monday, 12 October 2009

Converting videos to AMV format using Linux

Many cheap, “made in China”, MP3 players also have video playing capabilities. In spite of the low display quality these devices can be used to view in a satisfying way many low quality videos like for example Youtube videos.
Unfortunately the video format used, identified by the AMV or by the MTV extension, is out of common video format standards because specifically studied to be suitable to very low-end hardware. In addition conversion software provided with the players is Windows-only (and often a little buggy).
I recently discovered how to use Linux to convert videos to AMV video format. (It's a recent discover only to me since the project is dated 2007)

Saturday, 3 October 2009

Random text generation with Polygen

I've already been talking about random text generation showing some simple database technique in my early posts. I'm now going to talk about Polygen: a simple Linux program that can be programmed to produce virtually random text of any complexity desired.


Polygen is installed on Ubuntu simply by apt-get command:
sudo atp-get install polygen, polygen-data
once installed it can be easly tested calling it with one of the example grammars as parameter. For example:
polygen /usr/share/polygen/eng/genius.grm

it should write a random answer text like this
How can I do for receiving a RW space bar from Photoshop NT?

You neither should mount the modem to the desktop, nor have to click a ROM virus to the DVD driver but from Office and from the control tools inside Internet Explorer 2000 you neither can ever unmount a printer, nor can load the wordprocessor for pinging a display on a BIOS display.

Saturday, 19 September 2009

Bridging between two wireless routers

I recently stepped into the wireless world. I changed Internet provider and I had to send back them the old modem they leased me and buy a new one. I so decided not only to buy a wireless router modem but also an extra wireless router. My idea was to make them connect together and get rid of the wire crawling under the carpet across all the living room (the phone socket and the computer room are quite in the opposite side of my house).

Sunday, 13 September 2009

Parental control with Open DNS and Linux

My son is growing up very fast (he's 11) of course he is beginning using Internet. I think the better way for children to use the 'net is together with their parents anyway, better safe than sorry, I decided to activate a content filtering service.
Open DNS offers an excellent free content filtering service. Enabling it it's only matter of subscribing, enabling content filtering options and replacing in your network configuration Open DNS servers in place of those provided by your ISP.

Handling the dynamic IP

Open DNS works its content filtering on IP address basis. In most Internet connection IP addresses are dynamically assigned by ISP and may change every time you connect. This means that Open DNS must be kept updated on your current IP address in order to apply your content filtering preferences. This operation can be automatically executed by a small program installed in the client computer.

Sunday, 30 August 2009

OpenShot for video editing

Editing home videos is one of the activities I use my desktop computer for. I'm still using some Windows program to di this but I'm continuously looking for the definitive Linux program to solve my problems.
I first read about OpenShot in this post of Gabuntu blog. I so decided to try it even the program is still in a development phase (version 0.9.22).

OpenShot is available as .deb package, I downloaded them from OpenShot's download page. The files needed are two: OpenShot main package and a dependency archive containing the packages required by OpenShot installation. I also downloaded the optional Italian language package. I so extracted the dependencies package and installed them all as follows:

Tuesday, 18 August 2009

Recovering a unfinished DVD using Linux

I spent some of this summer days off converting my old VHS-C videos to DVD format. It's usually only matter of playing the old cassettes on a VHS recorder connected to my Panasonic DVD recorder, I only have to change cassette every 45 min. And finalize the DVD every three cassettes, just a long simple boring task.
Unfortunately last time (about a week ago) the DVD recorder refused to finalize two disks (which means four hours and half of work). I don't know if the problem was because of defective DVDs, recorder overheating or simple, plain bad luck. I so started looking in the 'net for a solution. Things started to become interesting when I found not only a solution but a Linux solution! This post on Rip Linton's Blog sounded a little odd at first but it worked and solved my problem.

Saturday, 1 August 2009

Three games for the EEEPC

The EEEPC flexibility gives you, among many other things, also a reasonably good portable games machine. Speaking about gaming depends a lot on personal preferences, one could spend a lot of time playing simple games like solitaries, I'm going to speak about three near commercial quality open source games: Glest, Torcs and Vega Strike.

Installing all of these three games in EEEBuntu is quite easy: just matter of selecting them in the “add remove programs ...” utility. After installation ended all games needed only a little of manual configuration to adjust  them to EEEPC resolution.

Friday, 24 July 2009

Upgraded to Firefox 3.5

I recently updated both my desktop and my laptop machines to the new Firefox version
Sempron 2400 (Ubuntu 9.04)
I upgraded to Firefox 3.5 on my desktop Linux installation (Ubuntu 9.04 on Sempron 2400) simply by following instructions suggested on Ubuntu community documentation page about installing firefox new versions. I so simply clicked on Firefox's 3.5 APT Link (apt:firefox-3.5) to install all needed packages (As you probably already know I ever prefer the easy way).
At last I replaced firefox symbolic link from terminal by simply typing:
sudo rm /usr/bin/firefox
sudo ln -s /usr/bin/firefox-3.5 /usr/bin/firefox
Upgrade Firefox on EEEBuntu it's a quite different thing (I haven't upgraded to EEEBuntu 3.0 yet) I did choose to try the command line way as suggested in Lifehaker and Kabatology blogs.
I backed-up my firefox settings:
cp -r ~/.mozilla/firefox/ ~/firefox_backup
and then launched the long download-and-install command (of course it must be typed all on a single line)
sudo wget -O - http://releases.mozilla.org/pub/
          en-US/firefox-3.5.tar.bz2 | sudo tar xj -C /opt
I didn't resist, so I personalized it in order to install Firefox on the /opt path.
At last I changed the firefox link like in previous installation:
sudo rm /usr/bin/firefox
sudo ln -s /opt/firefox/firefox /usr/bin/firefox 

Tuesday, 7 July 2009

Migrating to Linux: hugin

I use my desktop computer (Sempron2400) mainly to manage my personal photos and videos. Often it happens I have to join two or more shots in a single panoramic photo. Of the many panorama tools I tried the one that permitted  me to obtain the best results with minimum effort is hugin.
Hugin is a multi-platform open source panorama software, it implements many complex image joining algorithms but keeps a simple and effective user interface.
I installed hugin the easy way, by simply selecting its components in the Gnome application installer (the add/remove applications menu voice).

Wednesday, 17 June 2009

JavaFx on EEEBuntu

The newly released version of Sun's JavaFx also comes with a Linux version. Even it's still a beta version I decided  to try it on the EEEPC 900
Why JavaFx on EEEPC?
I know that EEEPC is not the best choice for programming because of the small keyboard, the small screen and so on ... but the high portability of EEEPCgives you an ever-ready programming environment good for little experiments and for just having some fun programming.
Java SDK update
I first downloaded from Sun site the latest Jdk version, JavaFx requires at least 1.6.14 version while the currently installed version on EEEPC was 1.6.10.
I extracted Jdk files by executing its installation file
chmod a+x jdk-6u14-linux-i586.bin sudo mv jdk-6u14-linux-i586.bin /opt
sudo /opt/jdk-6u14-linux-i586.bin
then I configured the newly installed Java as default virtual machine by first adding it to the udate alternatives list (the whole command goes in a single line)
sudo update-alternatives --install /usr/bin/java java
      /opt/jdk1.6.0_14/bin/java 30
I at last selected the just installed Jdk as the default one using the command
 sudo update-alternatives --config java

Wednesday, 3 June 2009

Some blog layout changes

I decided to follow the advice of a more expert blogger and to make some layout changes to my posts. I Also moved  from the profile page to a regular posts sections about me and my machines.
Let me know if you like the new layout.

Tuesday, 26 May 2009

Apache Tomcat om my Linux Server (2)

At last I managed to continue with my Apache Tomcat installation following this howto track.
Apache2 connector installation
I only installed the Apache2 Tomcat connector, since Apache2 is already installed on my server (I use it with Torrentflux):
sudo apt-get install libapache2-mod-jk
I then prepared  Apache workers configuration file
sudo vim /etc/apache2/workers.properties


Monday, 11 May 2009

Migrating to Linux: cdcat

Let me write down a little update about my desktop computer (Sempron 2400) migration to Linux.
After Installation I started with replacing some of the default application. I so installed Mozilla Thunderbird as mail client, Gnome Baker as CD-DVD Burner and Avant Window Navigator as dock bar. I then started looking for a CD-DVD catalog application. I first tried Gnome Catalog and DiskSearch but they left me all but satisfied. I finally discovered CdCat.
CdCat is a multi-platform (Linux, Windows and MacOS) application that let you scan your disks and catalog their content in a searchable archive.
I installed CdCat using apt-get command like this
sudo apt-get install cdcat

Sunday, 26 April 2009

Installed Ubuntu 9.04 on Sempron 2400

I really couldn't resist not to try the recently released Ubuntu version.  I so cleared an almost forgotten 20GB partition on my desktop computer (Sempron 2400) and I started installing Ubuntu 9.04.
Ubuntu, Kubuntu or ...
I'm an eternal undecided between Gnome or KDE (and XFCE isn't bad too) but, since I'm using EEEBuntu on the EEEPC, I got more used to Gnome and this leaded me into installing Ubuntu.
I downloaded the ISO image of Ubuntu CD from the torrent download page. I usually prefer downloading big files using TorrentFlux (on my PIII 550 server). I so started the download in the evening of the 23rd and went to bed. The next morning the download was completed.

Saturday, 11 April 2009

Happy Easter!

Just a simple but sincere Happy Easter to everybody!

Installing Calibre on EEEBuntu

I use often my EEEPC as E-Book reader especially when I travel by train. The program I use (FBReader) works fine and, in border-less mode with the page tilted of 90°, makes the EEPC an almost optimal E-Book reader. But since I'm looking for some extra features I decided to install Calibre.
Calibre is literally a all-in-one e-book software with many features from the library manager to external readers synchronization. I'm mainly interested in two features: Calibre library management and the RSS feed reader.
I simply executed Calibre installation command (all in the same line):
sudo python -c "import urllib2; exec urllib2.urlopen(
      download_linux_binary_installer').read(); main()"

Sunday, 29 March 2009

Apache Tomcat on my Linux server

I installed Apache Tomcat on my little Linux server (PIII-550Mz) since I'm going to test some java server application at home. I mainly based my installation on this howto with some little variation.
I first installed Java jdk 
 sudo apt-get install sun-java6-jdk
 Then I downloaded Apache Tomcat from my nearest mirror server
wget http://apache.fis.uniroma2.it/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.gz
 Then I installed it
tar -xzvf apache-tomcat-6.0.18.tar.gz
sudo mv apache-tomcat-6.0.18 /opt/
sudo ln -s /opt/apache-tomcat-6.0.18/ /opt/tomcat

Saturday, 14 March 2009

Installing TrueCrypt on EEEBuntu

Short after buying the EEEPC I also bought a 320 GB external USB hard disk to be used in support to EEEPC small internal drive. I decided (mainly because of my job) to secure, using cryptography, at least one disk partition. I'm not sure the cryptography settings I did choose would work against any professional hacker but they should be enough to stop  most 'curious' people who might, in any way, gain access to my disk . I decided to install TrueCrypt mainly because it's a multi-platform application so I could possibly prepare encrypted partitions to be used from both Linux and windows computers.
I first downloaded  truecrypt-6.1a-ubuntu-x86.tar.gz  (the x86 32bit ubuntu compiled version) from its site downloads page. then I extracted and executed the installation program ...
 tar -xvf truecrypt-6.1a-ubuntu-x86.tar.gz
The installation graphic user interface started and I simply had to click the 'Install TrueCrrypt' button and then agreed with the software license. Once installation was completed TrueCrypt icon was automatically placed in the 'other' folder.

Thursday, 5 March 2009

Experimenting with Linux: MLDonkey

My little Linux server (PIII-550) works usually as Bittorrent download machine with Torrentflux running on the Apache server.  I desired to expand my little machine capabilities by installing some more download software. MLDonkey is a peer-to-peer client which let you download shared files in various network protocols.
 I did choose the easy way to install it using apt-get command:
sudo apt-get install mldonkey-server
 then I stopped the mldonkey server and edited the downloads.ini file in order to enable web acces from computers in my local network:
sudo /etc/init.d/mldonkey-server stop
cd /var/lib/mldonkey/
sudo vim downloads.ini
 I so edited the file adding my local network address range to allowed ips variable:
allowed_ips = [

Monday, 23 February 2009

EEEBuntu: Restoring the Java development environment

After installing the operating system the second step in building up my EEEBuntu netbook is preparing a Java development environment by installing Java JDK, Netbeans and Apache Tomcat.
Java JDK installation:
EEEbuntu comes with  OpenJDK already installed, but I prefer having also Sun JDK installed. Java developer kit installation is done by terminal using apt-get command:
sudo apt-get install sun-java6-jdk
then Sun jdk is selected as default jdk by typing the command:
sudo update-java-alternatives --set java-6-sun

Wednesday, 11 February 2009

Installed EEEBuntu (Netbook remix)

 I managed, thanks the rainy week-end, to install EEEBuntu (Netbook remix) on my EEEPC.
 My primary target was to have a dual boot system, so I first installed Windows XP (a properly reduced version) on the 4GB internal disk (sda) then I proceeded with EEEBuntu installation on the 16GB internal disc (sdb).
 Usb drive preparation:
 I did choose  the easy way to prepare my USB drive to boot with EEEBuntu. I downloaded and installed Unetbootin, Windows version, and used it to easily prepare the boot drive from the already downloaded ISO file. (this is the fourth boot-from-usb tool I install since I bought the EEEPC)
 EEEBuntu boot and Installation:
 After EEEBuntu boot I launched the installation program. At first I didn't see disk sdb as available for install, after a while I realized that the disk has to be flagged as "bootable" to be visible from install program. I used GParted to set the boot flag on disk sdb then I continued with installation. I did choose default options for installation and everything went fine. After installing I entered in BIOS set-up and selected disk sdb as first boot device in order to boot into EEEBuntu by default.
 First impressions:
  First impression EEBuntu gave me was the feeling of working with a full system, with a graphical interface well suited to the EEEPC small screen. I never felt using a limited interface like the original Xandros "easy mode". I haven't installed any application yet, apart from FBReader, so I haven't appreciated yet EEEBuntu repositories completeness, one the main advantages in passing to Ubuntu.
The main disadvantage of EEEBuntu is loading time: it takes almost two minutes to have the computer ready (Xandros was quite faster in it). One more minute of wait time is not very important if used during a train trip which lasts 30-45 minutes (during lucky days).


Monday, 2 February 2009

Backing-up the EEEPC with Clonezilla

I'm going to install EEEBuntu to but first I decided to back-up my current installation. I decided to use Clonezilla, the 'live' distribution, mainly because it promised to be a clean and fast tool.
I used one 1GB USB pen drive as boot device and an external 250GB USB hard drive as backup device.
I first downloaded Clonezilla, the zip format distribution, (from here) and uncompressed it to my USB pen drive. Then, following instructions from Clonezilla site,  I made my USB drive bootable using Live USB Helper.
I then started my EEEPC from the usb drive, by pressing  ESC key at boot time and choosing the pen drive from the boot menu.
I proceeced with backup operation following Clonezilla site instructions (here). No screenshots, sorry, but there is no real difference between what I did and screenshots published in Clonezilla how to pagesThe only real difference is the disk naming: on the EEEPC internal disks are usually named "sda" and "sdb" while external disk names may change (in this case it was "sdc").
Here are my selections, in the order they appeared:
  • "Clonezilla Live (Default settings, VGA 800x600)" in boot menu options
  • Language: "English" (Italian is also available)
  • Keymap: first 'qwerty' then 'italian' and 'standard'
  • "Start_Clonezilla" option
  • Mode: "device-image" to backup source diskto an image fale in destination disk
  • Mode: "local_dev" to select a local device (the usb external drive) as target device
  • Destination device: "sdc1" this is the name given to my external drive and mounted by Clonezilla as "/home/partimag"
  • Backup directory: "Top_directory_in_the_local_device"
  • Mode: "savedisk" to save the whole EEEPC disk to an image
  • Image name: "2009-02-05-23-img" the default name
  • Source disks: "sda" and "sdb"
  • Clone programs priority: "-q : ntfsclone > partimage > dd
  • Advanced extra parameters: none changed from default
  • Compression: "-z1 Use gzip compression"
  • Split size: "0" EEEPC (disks are small so why to split the image?)
  • Action after cloning: "true do nothing"
In conclusion I think Clonezilla is really a valuable fast and clean tool. It took only 15 minutes to backup my EEEPC disks (not very full indeed) to an image a little bigger than 3GB. Clonezilla interface may seem a little primitive but, while using it, I never felt the need of a more complex one. So I, definitely, have no escuses for not to backup my system at least before any major upgrade.

Friday, 30 January 2009

Names generators with MySQL

There are on the net several names generator. theese programs staring from an input name generate some kind of funny phrase.
Here is an example of a "nickname generator":
The algorithm behind these programs is quite simple: it's just matter of using your name as a key to select phrase components from one or more tables. Here is a simple way to do this using MySQL:
First let's create a couple of tables:
              TERM VARCHAR(30));

              NAME VARCHAR(30));
Then fill the tables with some value

To implement the selection we can use MySQL RAND()  function. Rand function can generate a pseudo-random number sequence based on a seed integer passed as parameter. The same seed number ever generates the same sequence.
Another function HEX() let us easily convert our input string to a number we can use as seed.
The number generated from RAND() function can eventually be used to select a row in the table.
Let's put all together:
(Update) since RAND() ever generates the same number sequence from the same seed number we must use a different seed for every word we need to extract. To do this we neeed to change the source string in order to obtain a different seed number. In my example I used the REVERSE() function to implement it (not the best choice indeed) but even simpler solutions, like adding a different constant to each, should work also well.
Here is the result:

Adjective Animal 
Crazy     Chicken

Does it fit with my blog? Probably no more than "Ultimate Monk"!
What makes the difference, in this kind of programs, is the database of names used. A wider database generates, of course , a less repetitive set of phrases but what really matters is a good choice of the words database.

Thursday, 15 January 2009

Experimenting with Linux: Jinzora

Because of my job I've been too busy to post anything for a while (even at my very slow posting rate) but now here I am again with another experiment on my little Linux server.
 I was interested in experimenting with video and audio streaming, after a little of Google searching I found  this how to about Jinzora installation. Jinzora is a web based media streaming and management system completely written in PHP. It gives you a graphic user interface to search, organize and view your media files simply from your web browser. What triggered me to choose Jinzora was mainly the limited requirements It has. It helped also that i had the computer almost ready with Apache2 and MySQL already installed.
 I started my installation directly from how to's part 2 by installing some missing  component:
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-gd
and then I edited my php configuration to fit Jinzora requirements by typing:
sudo pico /etc/php5/apache2/php.ini
 and adjusting some parameters
 max_execution_time = 300
memory_limit = 128M
post_max_size = 32M
file_uploads = On
upload_max_filesize = 32M 
I then downloaded Jinzora and installed it in Apache
wget http://downloads.sourceforge.net/jinzora/jz275.tar.gz
sudo tar xvzf jz275.tar.gz
sudo mv jinzora2 /var/www/jinzora2
sudo chmod -R 777 /var/www/jinzora2
 And after restarting Apache server as usual ...
sudo /etc/init.d/apache2 restart
I've been able to access to Jinzora using my browser at the server address:
Jinzora asks you to configure some initial configuration parameters like MySQL user and password in order to complete installation. Everthing is done with the help of a simple and well explained web based user interface. After initial configuration Jinzora asks you to delete the installation directory before proceeding with normal use. This was easily done ...
sudo rm -r /var/www/jinzora2/install
After this I finally managed to enter in Jinzora.
As my first impression Jinzora works fine: video streaming is smooth, and this is what really matters, and the user interface is clean and effective (you can choose many GUI layout and skins). I installed VLC media player on my Windows client (Sempron 2400) in order to play streaming while on my Linux laptop (EEEPC with Xandros) everything worked fine using Real player (RAM) streaming mode.
 If I'm going to continue with this media server and transform it to a fully operative one I'll need some better hardware platform with a bigger hard-disk and a quieter fan. But, at the moment, it's still just another Linux experiment.