Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Friday, June 11, 2010

Dell states: Ubuntu Linux is safer than Windows

The VAR guy spot one very interesting statement on Dell’s website.
By looking at Dell.com/ubuntu there’s a list of ten points why Ubuntu Linux is a great system.
At point 6 Dell shows its guts and write in plain black on white what follows:


I don’t know about you but I see a trend in Linux system adoption and diffusion which is getting more and more steep every year. Security is surely one of the best reasons why users should venture in adopting a Linux distribution as their computer system. While the fact that the vast majority of malware is written for MS Windows this is not at all the only reason why Linux systems are safer than Windows ones. There are strong architecture, environment and philosophy differences that make the security split between the these two systems look more like a rift.

Friday, May 28, 2010

How to set DDclient for OpenDNS in Ubuntu Linux

OpenDNS is one of the public domain name servers available to the users.
When setting the DNS IP address to 208.67.222.222 or 208.67.220.220 your client will lookup the domain name using OpenDNS servers. Apart from the security advantages (that I don’t want to discuss here) one killing feature of OpenDNS is the possibility to effectively set content filters for your client computers.

Imagine you’re a father and don’t really want your 6 years old kid to stumble upon (yes you can involuntarily stumble upon them) adult websites while surfing the web. You should be with your kid when he/she does but we know that this isn’t always possible even at home. OpenDNS gives the user the possibility to filter several categories of websites and even to create personal blacklists and whitelists.



The problem is that OpenDNS recognizes a user through his/her IP address. This works fine in case of static IP but doesn’t work with dynamic IP addresses that are assigned by the ISP to the user at every session.
DDclient is what we need to do the trick. It’s basically a perl client designed to catch the user’s IP address and perform the update of that for certain services.
You can find and install the script directly from the repositories, just look for DDclient in Synaptic.

While performing the installation the script will render a setup form that you must fill in with basic data about the task DDclient has to do.
Anyway I found that also by filling in the form the IP address update for OpenDNS doesn’t work. This is not a big deal because we are gonna modify the configuration script.
Open a terminal and type:

sudo gedit /etc/ddclient.conf

Enter the following information in the text file

/etc/init.d/ddclient status


sudo ddclient


ssl=yes


# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf


pid=/var/run/ddclient.pid
use=web, web=whatismyip.org
protocol=dyndns2
use=if, if=eth0
server=updates.opendns.com
login=XXXXXXXXXXX
password=XXXXXXXXXX
Home

Customize the following data:
login --> your login name in OpenDNS
password --> your password account in OpenDNS
Home --> change this with whatever name you gave to your network in OpenDNS

Save the script and close.
Now type:

sudo /etc/init.d/ddclient status

This will check if DDclient in running. The ouput should be something like this: Status of Dynamic DNS service update utility: ddclient is running

DDclient is configured by default to run as a deamon, therefore you shouldn’t have to do anything. Should you have issue with it running check first the configuration file to spot syntax or command errors. You could also type sudo /etc/init.d/ddclient restart to see an error output.

To check the update of the IP in your machine try to switch off and on the router a few times, obtain a new IP address from your ISP and check the setting page of OpenDNS. You should see the new IP address associated with your network (gives a few minutes to the trick to happen though). You could also monitor changes in /var/log/syslog

Well, you’re now set up to effectively filter what your kids will access on the web.

Monday, May 10, 2010

How to open Magnet Links with Google Chrome and Transmission on Ubuntu

Magnet links represent a way to reference resources available for download via peer-to-peer. This is a relatively new way of access to peer to peer resources that will probably substitute in time the BitTorrent files. The differences with the afore mentioned files are that magnet links identify the files by the content’s hash value and not by name or location. This is an improvement in the effort of a more unique identification and fake content’s isolation. Another huge improvement is the fact that peer-to-peer content providers won’t have to store physical files anymore. Magnet links are just plain text and can therefore be stored effortlessly on any web page and even copied into emails, etc…
 
Magnets can nowadays be found on many peer-to-peer content providers like The Pirate Bay. There are however two main problems with them: they aren’t supported by all BitTorrent clients and, even when they are, by clicking on a magnet link the browser doesn’t usually open the desired application to resolve the request.
For the first problem the solution is quite simple. Clients are getting updates to include the magnet links features. Vuze, µtorrent, and the last version of Transmission are just three of the BitTorrent clients that support magnet links.
For the second problem I found a solution to open a magnet link with Transmission via Google Chrome.
This works for sure with Ubuntu 9.10 and Ubuntu 10.04.

Open the terminal and type
$ gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command "transmission %s"
Enter
$ gconftool-2 -s /desktop/gnome/url-handlers/magnet/needs_terminal false -t bool
Enter
$ gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true
Enter

In this way you should be set up to use magnet links with your Ubuntu distribution and the default BitTorrent client Transmission.

Have fun.

Tuesday, April 20, 2010

Protect your privacy online: Setup of VPN Ipredator service in Ubuntu

These days our privacy online is compromised at best. Every possible piece of information concerning our behavior on the web is collected by the various services we use like Google related services, Facebook, Twitter and so on. These are the information we gladly give to these and other web companies. Other than those there are many more information about ourselves that we're barely or even not aware of giving to third parties of various nature. The most obscure and alarming problem is to be aware of which data government agencies and the various police branches are collecting, how they're doing this and what they plan to do with the collected information. Some say that if you're not doing anything wrong then you have nothing to worry about. However this concept is illocical other than a moral aberration. Is it not a human denigration to live under the constant and pervasive vigilance of an obscure entity? Again, who knows what the collectors are doing, or will do, with the collected data? To whom will they hand the data over? To quote Alan Moore "Who watch the watchmen?".
The concept of privacy itself is a nonsense online. However there are certain "rules" or choices, some more general some others more technical, that if followed can ensure if not a complete privacy protection at least an higher degree of safety online. One of this rule could be chosing a Linux distribution as operating system in order to achieve the best protection (read virtual immunity) against malware. One could also choice open source software against proprietary as the first is generally safer because the code is under the constant vigilance of the community. And so on...
One more technical rule which is the object of this post is connecting to the internet via a VPN server. Wikipedia defines the VPN as A virtual private network (VPN) is a computer network that is layered on top of an underlying computer network. The private nature of a VPN means that the data travelling over the VPN is not generally visible to, or is encapsulated from, the underlying network traffic. Similarly, the traffic within the VPN appears to the underlying network as just another traffic stream to be passed. A VPN connection can be envisioned as a "pipe within a pipe", with the outer pipe being the underlying network connection.


Recently I decided to give a try to Ipredator, the Sweden based VPN service created by the guys behind the famous tracker indexing site The Pirate Bay. So far I'm quite satisfied by the service. The speed is quite good for my usage. It collapsed just three or four times so far. The only drawback is that if you're an American user Ipredator will prevent you to watch videos on sites like Hulu because you'll basically surf with a swedish IP number.

Anyway, the VPN website doesn't offer any instruction to connect your Linux operating system to their server but I assure you it works and the procedure to setup the connection is very simple.
First of all you need to obtain a username and a password by buying the 3 months term of service for the price of 5€/month.
Now the technical part. Note that I've done this in Ubuntu 9.10. I suppose the instructions are valid with minor modifications for a lot of distros.

Step 1:
First right click on the Applet NetworkManager and choose "modify connections". Then select the VPN tab and click Add.
Choose Point-to-Point Tunneling Protocol (PPTP)

Note: if you can't select the VPN tab or you have some other issue here you need to install the PPTP plugin for the network manager.
Open a terminal and type sudo apt-get update
Now type sudo apt-get install network-manager-pptp


Step 2:
fill in the gateway, your Ipredator username and password as you see in the picture below

Step 3:
Now click Advanced and select the options shown in the picture below. Mostly it's use Point-to-Point encryption (MPPE) and 128-bit security.

Step 4:
Now you're basically set up. To connect to the VPN server just click without releasing on the connection manager icon (top right in Ubuntu) and when the menu appears just choose VPN Conncetions and then Ipredator (provided that you named it like that during the setup). If all goes well a lock icon should appear on top of the connection icon. 

Step 5:
Now that the connection is established you can check that you're really running with a Swedish IP address. You can either note that the commercials in Facebook turned in Swedish or you can cheek the IP on an IP locator site like ip-address.com

Surf smart and safe folks.




Tuesday, April 13, 2010

The Linux Game Box #6: ASCIIPORTAL

This week we're gonna talking about a game that is totally and unmistakable AWESOME. Asciiportal is a portal game developed by Joe Larson and inspired by Portile, Super Serif Bros and Portal by Valve. 

Title: ASCIIPORTAL
Genre: Puzzle (portal game)
License: MIT
Website: http://cymonsgames.com/asciiportal/


Installation requirements --> 9

There's no need for installation. You just download the Linux version and double click the bin. That's very straightforward and a always nice when you see something so simple with a Linux game.


Gameplay fun --> 10

Asciiportal is a portal game and that mean that's all fun. You're basically stuck in rooms and must evade by casting portals and walking through them to proceed on your way. Portals are like space wormholes but limited in range by the two way-points that the player places in two location of the map. Once placed, the two portals creates a tunnel as if the reality itself is bent, and the player can travel through it. There are several elements like barriers, spikes, ladders and so on that force you to be cunning in order to clear the levels.


Graphical appeal --> 7

As the name suggests, Asciiportal is completely text based thus every graphical element is in ascii. But don't fool yourself, this doesn't mean asciiportal isn't graphically cute, on the contrary the graphics made the game look stilish and enforce the sensation of being trapped inside some computer guts.

Sound delight --> 9

I'm so glad that this time I can say without a doubt that the sound snd music of the game are great. Music is composed by Steve Fenton. I've played a dozen of levels and I've listen only to two tracks: one for the menu and one for the levels. The music does really a great job in making this game even more enjoyable. The track for the levels is especially nice and creates a sci-fi atmosphere. By the way it reminds me a lot of the kind of music used in the game X2 The Threat. The sound is also noticeable, especially the voice effect that accompanies the instructions / advises of the guiding computer at the beginning of every level.

Story enchantment --> 3

As far as I've understood the story has no practical use in asciiportal. Maybe it is revealed further into the game but as far as I played there was scarce glimpse of it. It seem that whoever your character is, you must escape and to do so there's only one way: reach the exit of each level figuring the way out, overcome all sorts of hazards and of course use portals.

Bonus point --> 8

The game is totally open source and this means you're not just permitted but also encouraged to take a peek of the code and exploit it. Joe personally wrote me that "ASCIIpOrtal is released MIT open source. It's the closest to a "do whatever you want" license i could find. I'm of the opinion that the world is a better place when everybody shares. ;)".
If you're willing to hack but you're not capable or not comfortable with messing with the code, then there's a map editor, provided by Mads Lund, you can download here and use to create your own level. The editor is a MS Windows .exe but it works flawlessly (or so it seems to me) under wine.

OVERALL SCORE --> 9.4

Maybe my opinion is biased by the fact that I'm a total nerd but asciiportal and its creators are way cool.
Just try this game and drop me a line about what you think.
Below you can see asciiportal in action.

Thursday, April 1, 2010

The force of Open Source: Hand written translation of Ubuntu manual into Tamil

I recently read that guys from KanchiLug, a LUG from the Indian city of Kanchipuram, just finished to translate the Ubuntu documentation into their native Tamil language.

They've been evangelizing about the operating system through colleges since long, but they realized that it was a hard job for Tamil people to familiarize with the system through the English guides.
When they heard of the Ubuntu handbook produced by the Ubuntu-Manual Project, they team up themselves to translate it in Tamil.
And so they got the work done!



I think this is another of the countless story that shows the force of the open source community which is capable to spur the best from people to convey it into projects that, for several aspects attain excellence.

You can download the Tamil-English Ubuntu manual here.

Pictures of the translation event can be found here.

Tuesday, March 16, 2010

What are cron and crontab and how to use them.

In Unix (POSIX.1-2008) or *nix systems cron is a deamon that, has its name suggests, has to do with time. More precisely it takes care of scheduling operations which must be carried out by the system at certain periods.

crontab is a text file containing a list of tasks to be executed at proper times. Both the commands and the times are specified inside the crontab file.

Each user has its own crontab files and there’s also a system crontab which takes care of scheduling system tasks as, for example, the log rotation we spoke in an previous article.

To use crontab the user name should normally be included in the crontab.allow file or, if such file doesn’t exist, then the user name must not be included in the crontab.deny file. If this file exist and it’s empty then usage of crontab is allowed to everybody without restrictions. cronttab.allow and crontab.deny files contain a list of user name and each name must occupy a line. Such policies and standard implementations can vary depending on the *nix system your using. For what concerns Ubuntu and Debian, these files are located in /etc/ directory.

Under the /etc/ directory there are commonly subdirectories and, among these, you should see also /etc/cron.hourly/  /etc/cron.daily/ /etc/cron.weekly/ and so on. If you have a script you want to run with a constant defined periodicity you can just copy it inside one of these directories and you will have it run respectively each hour, each day and each week. This is an approach that is related to an implementation of cron called anacron

However crontab allows much more flexibility for what concerns scheduling and to do so it necessary to edit (or even creating from scratch) the crontab file.

To write a crontab file just open it with your favorite text editor or type crontab –e to open it with the default editor (specified in the environment variable “EDITOR” – see the env command in bash).

When you open the file you will face something like this:

















Note: Don't necessarly expect to find a crontab already filled with commands. It could very possibly be (and it's the case with Ubuntu) that your crontab it's blank and infact you'll be creating it from new as soon as you launch the crontab -e command from the terminal.

Each entry consists of a line with six items separated blank spaces. The first five field must be filled by integers that specify the schedule. The sixth field is a string to be executed by the shell.

Here below you can see a diagram of a crontab line

As you can see by selecting the proper values you can compose any type of schedule you need.
There are also special character that can be used instead of or together with the integers.

[*] Asterisk – The asterisk is for every value. Therefore to put an * in the hour field would mean that the command should be scheduled to run every hour.

[,] Comma – The comma character is used to run a command more than one time within a specific range of time. By writing 1, 15 in the hour field it means that the command will run at 1 A.M. and 3 P.M.

[-] Dash – The dash character specifies an inclusive range and it’s used to run a command continuously with a certain period of time. Specify 1-32 in the minute field to run a command continuously for 32 minutes.

Please note that a certain date can be specified either with Day of the Month field and Day of the Week field. Just pay attention to this situation in order to avoid weird behavior to occur. For example if you want to run a command the 5th day of each month, mark the DoW field with an asterisk so that the command can run at the specific day disregarding which day of the week it is.

We said before that every entry correspond to one line. However blank lines and lines that begins with # are ignored.

There are a bunch of environment variables that can affect the behavior of cron. The most common are EDITOR, LANG, LC_ALL, LC_TYPE, LC_MESSAGE, NLSPATH, LC_MESSAGES. These concern mostly advanced configuration so the default values should be ok unless you want to change the default editor with your favorite one.

A particular mention is to the variable DISPLAY which defines the default display. This information can be used to use cron to run graphical applications by specifying which display must show the application. This can be made by writing something like the following:

* 20 * * * env DISPLAY=:0 /usr/bin/evolution

By doing this you will tell cron to run Evolution mail client every day at 8 pm on the default display.

Note: if you’re a Ubuntu user, there’s a workaround to be applied in order to make this working in Karmic Koala. Please refer to the Ubuntu official documentation.

Before finishing the article let’s have a look at the most common errors you can encounter while hacking with crontab. Please note that modifications to crontab and the command excuted from its schedule, are logged in /var/log/syslog. If you spot a malfunctioning in your schedule try to check this log to acquire precious information.

- Every crontab file must end with a newline. If you create add an entry to an existing crontab file (or you create a new one) and you forget the newline, your job will never be run.

- As a corollary of the above, note that the % character in the sixth field will be considered a newline. Any character preceded by a \ will be escaped and therefore treated literelly.

- Lines that begins with # or blank lines are ignored

- If you add a user to your crontab.allow list you must also somehow re-edit the crontab files because otherwise the user will not be allowed to execute jobs.

- In order to avoid weird behaviors or fails to execute jobs for certain users, take the precaution to specify the full path of the command to be executed.

- if you try to run a command that needs super user privileges with your user's crontab you will fail. To run something like chkrootkit, as in the example above, you must add the command to the system crontab. To do so type sudo crontab -e in a terminal and prompt the superuser password when prompted to do so.

Note that it’s not really a good idea to edit the system crontab in /etc/crontab not only because you could create possible damages but also because during the system updates you could find your jobs erased. Unless you have particular needs and you know what you’re doing and why you’re doing it, it’s much safer to edit the user crontab with crontab –e.

This is almost all the basic information about cron and crontab. I invite you to refer to the man pages for information.

Live long and prosper

Monday, March 8, 2010

How to use twitter from the terminal

I consider Twitter a fairly useful and funny way to share and get information. I don’t belong to the horde of people who sanctify Twitter like the Deep Thought of The Hitchhiker's Guide to the Galaxy. I wish them to get their 42 at some point of their savant blabbing about the wonders of this web 2.O icon.

I used to twitter from the web page but I soon got tired of it because it was uncomfortable to switch back and forth to the twitter tab. A better way is using a dedicated widget like twitdeck which is a fancy Adobe Air program that organizes all your twits, contacts and personal messages. Twitdeck does the job but it sometimes makes my fan spin a bit too much for my taste.

I knew that Twitter API were available and thus I googled to find some Linux native Twitter clients. Imagine my surprise when I stumbled upon Twyt.

Twyt is a Python Twitter client, written by Andrew Price and based on classes of the afore mentioned Twitter API. It allows to do almost everything you can do from the web client or some other fancy widgets, but from the terminal.

If you have Ubuntu, like me, you will find the python-twyt package on the repositories. Otherwise you need to download Twyt from here, unpack it with tar -xvf twyt-0.2.2.tar.gz and install with ./setup.py install. Should you have problems running it at first shot try install python and python-simplejson to saftisfy the dependencies.

The most basic command is tweet[options]. Thus after having completed the installation open a terminal like bash and type:



-u is the option needed to specify the username that in my case is followed by wizandchips

You will then prompted to insert your password  and the magic's done. You can specify the password with -p but the author does well to discourage this practice on the command line. You could instead save the password for the session using the command twyt user -u USERNAME -p PASSWORD set. This is at least the method from version 0.9.0. I've got the 0.9.2 installed and for me I had to close bash and open it up again because otherwise I god a bad user/password message at every tweet attempt.



Twyt offers several other commands to delete status messages by ID with delete [options] id, to show the latest public messages (max 20) with publictl [options], show your friends messages (max 20) with friendstl [options] [username], show your messages with usertl [options] [username], and so on.
You can find the detail of all the commands for the client reading the manual through bash by typing man twyt.

Twyt is released under the BSD license

Thursday, March 4, 2010

The new Ubuntu Theme on 10.04 Lucid Lynx

I don’t hide the fact that I’m really excited today.
I read on Phoronix that Canonical’s revealed the new theme that will be part of the forthcoming 10.04 release of Ubuntu.
Since the day I read that Mark Shuttleworth left the CEO job to dedicate himself to the feel and look of the product, I knew something was going to happen. However I didn’t expect a radical push so soon. It was clear since long that the brown Human theme got the nerves of mass of users, and Mark knew this. Here though we’re speaking of a big change in all the Ubuntu brand. The changes are presented in two wiki pages, here and here, and they concern:

- New logos for the various Ubuntu related projects
- A new Ubuntu theme called “Light”
- A new minimalistic splash screen
- New layouts for the various website of the ecosphere
- Promotional materials

The team reviewed the logo to “reflect the precision and engineering that sits at the heart of the product”. I appreciate the effort of rejuvenating the image of Ubuntu by I don’t really feel the new logo worth to represent the final product. I know this is harsh but to me it seems too unbalanced, graphically, and the lettering too exotic. I’d have preferred something more consistent with the concept of stability and technical supremacy, but this is just my idea and largely based on personal preferences.

The theme is simply great. They presented a dark and a light version. I like the dark one much more but this is also based on personal preference because they’re both great. The design theme just followed the way already taken with the Karmic Koala release. The brown color has given place to a nice tone of violet. The icons are monochromatic and are implemented following the kde specification. As a result the top bar feels really solid. The gtk widgets got a refreshed appeal and even though there are certainly some rough edges in the design, the intent of increasing the sensation of a carefully designed operating system interface is real.

The effort is clear and the quality is there. Not everything is perfect but, from an end user’s point of view, Ubuntu’s life cycle of releases is bringing fantastic improvements on a six months schedule. I can’t do anything but feel excited to be somehow part of this incredible project that, I’m sure, is contributing to bring new Linux users with every release.

Monday, February 22, 2010

Log system in Linux

The Linux operating system is said to be highly manegeable, customizable and safe. One of the reason behind this concept is the logging system.
The scope of logging is to record all what happen to the various part of the running operating system into plain text files that can be then read by humans or parsed by machines.
Understanding and referring to the various logs is an invaluable resource for trouble shooting and, more important, keeping the reins of your computer.

Linux logs are located in the /var/log directory and are plain ASCII files that can be handled virtually by any text reader out there. The majority of logs are created by syslogd and klogd daemons while installed programs (like SAMBA) can create their specific logs.
syslogd deamon deals with system messages and other messages like those coming from applications. However Kernel messages can’t use the syslog API. klogd manages messages coming from the kernel itself. Both of them can have their behavior configured by the parameters contained respectively in the files /etc/syslog.conf and /etc/sysconfig/syslog and, for klogd through a series of switches and commands in the console. The configuration of these can be tricky and it’s a subject which needs a full long article to be covered. However, in general, by configuring /etc/syslog.conf  one can control the messages flow and specify custom reception points for various class of messages. For a example a powerful security procedure could be to relay critical messages from the kernel to an external host which will in turn manage those messages according to its syslogd policy. This way would prevent a possible attacker from covering its tracks by deleting parts in the logs. A further improvement could also be to write a script to parse the two versions of the same logs (locally and remote) to check for discrepancies (sign of possible breaks). If you’re eager to delve a bit more into syslogd and its configuration you can have a look to the manual pages in bash (man syslogd and man syslogd.conf).
As I said above there are mainly two groups of logs: system logs and application logs.
As the name suggests, system logs concern themselves with the operating system functioning. Let’s see the most important ones.



Messages Log (/var/log/messages)
This log is a crucial one because it records status messages from the running system. General system errors like those related to I/O and networking are written to the messages log, as well as other interesting messages like users becoming root, running services, etc. In case of trouble shooting this could be the first place to get information before delving into more specific logs.



Authorization Log (/var/log/auth.log) This log keep track of all the systems which deal with authorizing users to restricted access to files or functions. By reading this log you can see things like the user login and usage of sudo to gain super user authorizations, and remote logins via ssh.


Daemon Log (/var/log/daemon.log)This log records information regarding daemons running on the system. A daemon, or service, is a program which is not under direct control of a user but instead runs in background to perform certain tasks.


Debug Log (/var/log/debug)
Read this log to check debug messages from the operating system and applications



Kernel Log (/var/log/kern.log)
This log contains messages concerning the Linux kernel which are routed via klogd daemon. These messages are very interesting for example because they’re helpful for trouble shooting but also to analyze them for kernel tuning or customization.



Applications logs
Some installed applications can provide their specific logs. These are usually stored at /var/log followed by the application sub directory. An example is the X11 server log which contains the messages coming from the X11 Windowing Server. If you experience crashes or problems with X, have a look to this log to see error messages.

As I mentioned before, certain logs are not normally meant for humans to read them but machines. For example, and always located under var/log/, wtmp log shows the information regarding the user(s) logged into the system, failog log displays login failures and lastlog records the logins in a list.
Sometimes you will notice log files, within the /log/ folder, ending with something like ‘.0,.1, .2, and so on’ and ‘.gz’. This has to do with the concept of rotation. The logrotate command is in charge of renaming on log file at a certain point in time, and start a new log. This is of course to rationalize the log process and avoid having logs which are heavy and difficult to interpret. After all the log concept is like that of a diary and so it’s perfectly sensible to split it on a time basis. So, logrotate will first put numbers to the end of the log file according to its age (lower numbers mean older logs) and then, after more time, bundle a number of files and compress them for example with gzip. The logrotate.conf file configures the logrotate behavior. If you want to do so you can read more information on the manual with man logrotate.
Now that we have said some things about the logging system and the logs, let’s spend some words about the tools which helps viewing the content of the log.
As we said at the beginning, logs are files containing standard ASCII information, thus any program capable of displaying text is good. You can use any word processor program, your favorite internet browser or a programming language IDE.
Anyway, it’s sometimes quicker to read the logs within the console. Here below a list of some useful commands to perform this task. For a complete overview and an explanation of the various switches and options for each program please refer to the manual typing man followed by the program name in the console.



More
Use the program more to display the content of one log one page at a time – more /var/log/messages



Less
less is a console pager program similar to more but with the additional capability of navigate the pages forward and backward. It’s also faster because it doesn’t load all the file at one time.
- less /var/log/daemon.log



Tail
This console program is quite interesting because by displaying the last 10 lines of a document it enables the user to keep track of the new records in real time. For example with the command tail /var/log/messages you will see a static list of the last ten entries in the log, but by adding the –f switch, thus tail –f /var/log/messages the list will update in real time each time a new entry is recorded into the log.



Grep
The grep command is designed to search a log file, which is very useful if you must quickly locate certain entries in a large log. For example you can search the “kern” word in a log by typing grep “kern” syslog.conf. If the entries are a lot, you can use | to pipe them through less thus having them paged. To to this type grep “kern” syslog.conf | less

I think that by now you have a simple (a by any means not exhaustive) overview of the logging system on Linux. I personally think that given the importance the information technology have in our lives nowadays, it’s really a valuable effort to delve a bit into the functioning of the machines we use to carry on our job activities and, with more and more frequency and permeation, various aspect of our social life. Linux operating system, throughout all its ecosystem of distributions, gives a hand to the users providing them with all the instruments to use their computer on an informed basis.
Live long and prosper.


Image by zak_greant licensed with this license

Saturday, January 23, 2010

Discovering the wonders of fstab

I’ve recently had to format my Ubuntu partition because of a Kernel Panic. This happened when I hit the “suspend” button in Boxee. The OS freezed still (it didn’t suspend) and there was no way to resurrect it than resetting the system. When I rebooted the there came the Kernel Panic. During the brief unsuccessful efforts to fix the problem I checked the fstab file to see if Boxee did somehow mess with it. I did not know much about fstab so, now that my system is fresh again, I want to discuss the wonders of fstab, this tiny yet superimportant text file.
fstab stands for file system table and it’s basically a configuration file which gives the kernel all the necessary information to mount partitions (usually only the internal ones; external partitions like usb flash drives and similar are mounted via volume managers). Being a configuration file fstab is located under the /etc directory; to read it you can just locate and open it by the graphical interface, however only root can write to it so if you need to modify it you must access with su (super user) privileges.
Disclaimer: Critical system files in Linux can only be modified by ROOT and not by the user(s). The rationale behind this is to make the system more safe against security attacks and mishandling by users. Having said that, use super user privileges to access system files only if you fall into one of the following categories:
- You know exactly what you’re doing
- You’re in an experiment environment
- Your system is completely and –by your point of view- irrevocably compromised so you judge you have nothing to lose
To read-only your fstab gile in console type:
~$ cat /etc/fstab
To open the fstab file in write mode open a console and type:
~$ sudo gedit /etc/fstab
As I said before the information contained in fstab is plain text, organized in rows and columns and laid out as follows
[device] [mount point] [file system type] [options] [dump] [pass]


[device] > indicates the device or partition that contains the file system
Note for Ubuntu: Canonical’s distro now uses UUID (Universally Unique Identifier) by default to identify partitions. In order to listyour devices by UUID you can use ~$ sudo blkid

[file system types] > indicates the type of file system. On Ubuntu you will likely see ext3 or ext4 for the main partition where root resides. Depending on the type of partitions or devices in your computer you could encounter any of the following file system types:
  • ext2, ext3, ext4, reiserfs (don’t miss the macabre gossip related to this one http://en.wikipedia.org/wiki/Hans_Reiser), etc.
  • auto (commonly used for removable devices in order to try to detect the specific file system of the device)
  • vfat (identify FAT partitions)
  • ntfs (identify NTFS partitions)
  • udf,iso9660 (identify optical media -aka CD/DVD-)
  • swap (a hard disk partition where a page of memory is copied to free up that page of memory)
  • procfs (stands for process file system and it’s a pseudo file system (dynamically generated at boot) used to access process information from the kernel. The file system is often mounted at the /proc directory and occupies no storage space
[options] > there are several options which specify how the partition is handled and what can or cannot do. I’ll try to cover them briefly here and let you google for them if you need an in depth description.
  • auto / noauto specify if the partition has to be automatically mounted or not at boot or when mount –a command is executed. auto itself it’s almost useless because it’s the default behavior. noauto is more interesting as it blocks a partition to be mounted unless you manually mount it.
  • sync / async are for I/O to the file system and indicate whether it has to be done synchronously (at the same time a I/O operation is issued) or asyinchronously. The meaning of this gets more clear if you imagine to issue a command to execute data transfer to a floppy disk or rw optical media.
  • exec / noexec is meant either to allow or prevent execution of binaries within the partition. If you set you’re the partition where root dwells as noexec your system is screwed
  • dev / nodev interpret or not interpret character or block special devices on the file system
  • ro / rw is used to specify if the partition is read-only or read-write mounted
  • suid / nosuid allow or block operations of suid or sgid bits. Suid and sgid stand for set user id and set group id. When a suid or sgid file is executed, the process which runs it is granted access to system resources based on the user who owns the file and not the user who created the process.
  • user / nouser are used to specify the user related permissions to mount the file system. user means that all the users can mount the file system and by consequence of this the noexec, nosuid,nodev options are automatically implied. nouser means instead that only root can mount the file system and this is the default setting.
  • defaults uses the default settings which are rw, suid, dev, exec, auto, nouser, async.
  • _netdev is for a network device which has to be mounted after bringing up the network and it’s only valid for nfs (Network File System)
Note for Ubuntu: from the 8.04 release Ubuntu uses relatime as default for linux native file systems. This options replaces atime and it’s used to know when a file was last used. Read more about atime and relatime here.
[dump] > this field specifies if the backup utility dump is enabled -1- or not -0-. Dump is a application which backs up and restores file systems as a whole. This field is usually set to 0.
[pass] > this field is related to the fsck system utility. fsck, which stands for “file system check”, is a program which check the state of the file system. In case of a system crash or a forced shutdown fsck
should detect it and then proceed automatically or user guided to fix the damaged parts. The options are the following:
  • 0 -> don’t check
  • 1 -> check this partition first
  • 2 -> check this partition next

fsck checks the file system every 30 mount operations as default. It’s possible to modify this interval (mostly by using tune2fs)
Here belows my fstab file commented by the system. Try to read it and retrieve the various specifications and options described before. You will surely encounter elements not covered in my description of fstab – i.e. ‘sw’, ‘utf8’ ‘errors=remount-ro’, ecc..- as you possibly will by reading your own fstab. This is common because technologies are for their nature prone to rapid changes and, like systems, tends to accumulates details in times. We have caught a couple of them like relatime and UUID while for the few remaining others you can google them to find more information or issue the command ~$ man fstab in a terminal
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
proc /proc proc defaults 0 0
# / was on /dev/sda5 during installation
UUID=197ac49c-16f9-41a6-9c18-40e87231f4ba / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=84365e80-cbc7-495f-9e46-46a852bef3c2 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

Tuesday, September 1, 2009

The Ubuntu Software Store revealed

Phoronix has recently published an article previewing The Ubuntu Software Store: a rather dull name for a project which is really triggering my hype.
If you read some of my past articles on Ubuntu and Linux in general, you probably know that I consider application distribution and handling (installation/remove) one of the major drawback and “keep out sign” of the desktop oriented Linux distributions.
It’s not that the Ubuntu installation environment isn’t good, on the contrary both synaptic and gdebi are fantastic and full of potentiality. The fact is that as it happens with most community driven things sometimes the spur of productivity has a counterproductive side effect. Diversification isn’t a drawback per se but there are times when concentration can serve better when the target is an important application or system part. This is surely the case of the software installation on Ubuntu. As far as it is right now I’ve no problem to say that the user experience is awful. Installing an application on Ubuntu (and I doesn’t consider the whole Linux based distros on purpose) means dealing with multiple processes plus other random perceived factors. And that’s frustrating at the least.
Just to make some examples each time I install a Ubuntu release I always and immediately install five applications which require five different installation processes:
  • Miro player --> add repository to Synaptic packet manager then browse for Miro and install it via Synaptic
  • Truecrypt cryptography software --> download the bin, open and execute, follow the instruction of the graphic installation application
  • GoogleEarth geography app --> download the bin, open a terminal and mess with bash then follow the instructions provided by the graphic installation interface
  • Ubuntuzilla Updater for Mozilla apps --> download the .deb file, install it with gdebi, open a terminal and mess with bash then follow the instructions provided by the graphic installation interface
  • Flash player --> download the .deb file and install it with gdebi (painless double click -Windows reminder- operation)
These are just a sample because there are  several other cases where for example you must compile the software following obscure tutorials,  retrieving and install a bunch of other applications (each having its own peculiar process) to satisfy dependencies, etc…
In my opinion this is completely unacceptable.
You can imagine the smile on my face when I read that Canonical is working on a project to unify various graphical install applications in a single graphical interface.
The Ubuntu Software Store is being built on the basics of the Add/Remove Applications (which is another way, not mentioned before, to install and remove software). Surprisingly we will see the first “installment” of TUSS with limited functions shipped with the Karmic Koala October release. According to the TUSS wiki page the 1.0 version of TUSS will hit four goals:
  • a graphically pleasing interface
  • an improved use of apt: links to replace bash commands and standalone packages
  • fine-tune the interface presented when software updates are available.
  • involve Launchpad with the goal of acquiring better and up to date information about the applications
With the Ubuntu 10.04 release the TUSS team hope for their app to substitute Synaptic, gdebi, add/remove softwares, Software Sources and hopefully even the Update Manager,conveying all these systems in a common interface. Another very exciting feature which could be included in the early 2010 release is the possibility to manage non-graphical software (programming utilities, fonts, database software, etc) within the Store.
The roadmap goes until 2011 when, according to the plans, TUSS will be mature enough to include rich functions like "sharing and tracking of software, overviews of installed software by license, cost, or maintenance timetable, discovering software by what your friends have installed, visible history of past installations/removals/purchases, including the ability to undo specific changes, specialized interfaces for browsing and installing particular classes of package like fonts, screensavers, Windows applications, etc".
By reading the dedicated wiki page it’s clear that Canonical is fully aware that the way applications are handled right now it’s one of their greatest Achill’s talons. The way they are facing it it’s something that make me proud of running Ubuntu as my first and main operating system.
Despite all the smaller and bigger problems user constantly face (nearly all of them are caused by the scandalous and evil lack of support from hardware manufacturers) Ubuntu (as many other Linux distros) is capable of beam the user with a sense of pleasure in using it which is generated by the stability and safety you clearly perceive in everyday usage. More than that, the continuous improvements are introduced in each six month release and make you feel on the edge of technology and part of project that, because of its scope and vision, is good and brings welfare to the people who use it and mankind as a whole.
Having said that I'm really impatient to see the first release of The Ubuntu Software Store and review it. So stay tuned.

Images are from The Ubuntu Software Store wiki. One is an interface sketch and the other is one of the proposed logos. This one is by SebastianPorta

Tuesday, August 4, 2009

KDE 4.3.0 Caizen Released

Today the KDE community announced the released of their 4.3.0 desktop environment, codenamed Caizen.
If you don't know KDE you should give it a peek because, either you like the philosophy behind or not, the project is important and daring.
As I mentioned before KDE is a desktop environment. It's commonly related to the Kubuntu official derivation of Ubuntu Linux and other Linux distributions in general, but the environment can be installed also on Windows and Mac.

The main purpose of the KDE community is that of providing a strongly integrated, easy to use and stunningly stylish desktop. This is pursued not just by a pure aesthetic work but by a strong effort to propose and follow a their own concept of human-machine interface. The stress is always on the integration of the applications with the desktop composed of a stylish layout and sleek objects seen as track leading to simplicity and tidiness. The desktop is completely composed by widgets which float over the surface like objects on a table. Unlike a table however you can't just drop a file onto the surface, the way you would with any other desktop environment, but you must place them inside a dedicated desktop widget. This can be frustrating at the beginning but after a while you will likely find the desktop widget easy to use, intuitive and helpful in driving you to keep your monitor free from the mess.
A strong asset of KDE is that it's built on Qt libraries which is an extremely powerful and modern UI and application framework (probably the best). For this reason all a series of features, like graphics, graphical effects, etc.. are comparable to those found on Mac OSX and far better than those implemented in Vista, with the surplus of working smoothly even on my 4 years old average end laptop.
Unfortunately but physiological given the youth and ambition of the project, KDE suffered of many bugs during its life. However the community behind KDE is strong and the bug solving process did not lag behind. With the 4.3.0 version they claim the "community fixed over 10,000 bugs and implemented almost 2,000 feature requests in the last 6 months".
Check all the freshly implemented features of KDE 4.3.0 Caizen here.

Monday, April 27, 2009

Jono Bacon @ Floss Weekly

Last week's Floss Weekly was really very interesting and funny. This show is part of Leo Laporte's Twit network and features on weekly schedule, various projects belonging to open source world.
With episode 65 Randal Schwartz and Leo Laporte interviewed Jono Bacon the outstanding community manager of Canonical's Ubuntu Linux distribution.

Notwithstanding the imminent (at the show time) release of Ubuntu Jaunty Jackalope, the purpose of the show was different. After a brief presentation of Jono's work and career at Canonical, the show focused on discussing the importance of communities for open source and free software projects and even commercial software in general.
Even though the discussion wasn't a geeky one, I mean they did not discuss of Ubuntu's new release or the trends in Ubuntu's development and marketing, I think they hit an interesting field too often overlooked by the open source and free software world. To support the economics behind free software it's not sufficient to create a consistent and refined product. Like an object belonging to an ecosystem, it's necessary to engineer how to deploy the product in the social environment. A product (and by this word I mean not just the software but all it's surroundings -website, documentation, brochures, etc..) must fulfill several requirements in this sense; it must be appealing, well documented, easy going and have a community to hold people together and attract new stakeholders. In this last aspect communities literally do the difference. Say that you're interested in learning 3D graphics it. There are a few open source choices and among those one project in particular (Blender) has a strong community representing an expanding sea of resources which metaphorically embraces the newcomer and reassure her/him with tutorials, free models a forum and even commercially available books and video guides.
Going back to the Floss episode, Jono Bacon also presented "The Art of Community" a book, published by O'Reilly, about to create and maintain a community which is going to be released either for free under a Creative Common License or for Purchase. The book is currently being written by Jono so it's scheduled for release during the next summer.
For more information read here below the very announcement of the book made by Jono on his blog

Today I am proud as punch to announce the Art Of Community.
A while back I was approached by Andy Oram, a senior editor at O'Reilly to write a definitive book about how to grow, build and energise a community. This book will be called the Art Of Community.
The book covers a wide range of topics designed to build strong community. This includes the structure and social economy behind community, building effective and easy to use infrastructure, setting up community processes, creating buzz and excitement, governance, conflict resolution, scalability and more.
This book is much more than merely a textbook on building a compelling community. I believe that we learn how to build strong community through the exchange of stories and experiences. We all have great insight into community. These stories are illustrative vessels for important lessons and subtleties in how great communities work. The Art Of Community is a compendium of stories, anecdotes and experiences inside and outside the Open Source world. These stories illustrate the many concepts scattered throughout the book, and many of these stories will include some of you reading this and your projects.
I am currently part-way through the writing process, and we have an expected release date this summer.
The release of Art Of Community is actually rather exciting. The book will be available in two forms.
  • Firstly, there will be a normal printed copy available to buy. This will be available from the usual places you can buy O'Reilly books.
  • Secondly, The book will also be available under a Creative Commons Attribution-Noncommercial-Share Alike license. This provides everyone with the opportunity to share, modify and re-use the content.
O'Reilly has my utmost respect for embracing the Creative Commons. This is a great opportunity for O'Reilly, Creative Commons content and community building.
In addition to the announcement, I am also pleased to announce a website devoted to the book over at www.artofcommunityonline.org.
The website will feature updates, sneak peeks of the content, profiles of the topics and stories in the book, profiles of the editors and proof readers and more. I am really keen to hear your stories and experiences, and there will be plenty of opportunities to get involved in the discussion. Also, when we release the book, the top ten posters with the most number of comments on the articles there will get a free signed printed copy of the book.
So, exciting times. Lots of work, but exciting times nonetheless. Lets get rolling...
For those that after having listened to the show think it's a pity it wasn't that into Ubuntu's behind the scenes, just know that Randal Schwartz announced a so called "FLOSSing with Bacon" project so we will hopefully hear from Jono very soon.
Finally, kudos to Leo and Randal for the great job they do in presenting open source and free software projects. With respect to what I've written above, they play an important role for the cause.

Sunday, March 22, 2009

How to upgrade ALSA - The Easy Way

I got recently pissed off by a major defect occurred to my system. All of a sudden the headphones just stopped working. Actually their behaviour is quite weird: once I plug the headphones the sound is fed for about one sec and then it just die. This is one of those bugs which make you willing to swear as they affect one basic feature you may or may not want to part from.
I already tried to follow some advices dug out from some forums and went rotten (lame of me I admit it). I basically tried to remove all ALSA packages to reinstall them from scratch, and this caused a system crash and, God knows why, the X user settings to be wiped off.
After reinstalling Ubuntu Intrepid I tried another approach to simply upgradeALSA in the hope of solving my problem. Well, this hasn't but maybe you can find anyway interesting this simple method to upgrade ALSA to the latest version.
This Soundcheck guy made a script to easily retrive and install the latest ALSAdriver. The script and discussion are located in this thread on Ununtu forumsbut I will report the instructions here for convenience.
First, let's introduce ALSA by reading a brief description directly from the website of the project.
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system. ALSA has the following significant features:
* Efficient support for all types of audio interfaces, from consumer sound cards to professional multichannel audio interfaces.
* Fully modularized sound drivers.
* SMP and thread-safe design.
* User space library (alsa-lib) to simplify application programming and provide higher level functionality.
* Support for the older Open Sound System (OSS) API, providing binary compatibility for most OSS programs.
Now let's go on with the instruction to upgrade the driver to the latest version.
Important Note: please before updating ALSA consider the reason you're doing it it's important, make a beckup of your files (you never know) and read carefully the thread I mentioned above. The script author says that he wrote it to be as fail safe as possible but given that it will affect low level packages please be sure you know you're doing it at your own risk.
  1. First you must download the script which can be found somewhere at the bottom of the thread or here. Note that you must register to Ubuntu forums to download the script.
  2. Save the script in your /home or wherever you like and untar it either with File Roller or Ark, or with tar xvf AlsaUpgrade-1.0.x-rev-1.16.tarfrom a terminal
  3. If you haven't done yet, open a terminal and move to the script location with cd [download directory]
  4. Type sudo ./AlsaUpgrade-1.0.x-rev-1.16.sh
  5. On the first run the script will present all the options you can select when running it for actually doing its job.
  6. To download, compile and install the packages on a single pass typesudo ./AlsaUpgrade-1.0.x-rev-1.16.sh -di Note: -di is the option to do so but there are many more to suit your needs
  7. Wait for a fifteen minutes and then reboot
  8. Have fun with your freshly updated ALSA driver

Wednesday, March 18, 2009

How I messed up my laptop with Kubuntu 8.10 KDE 4.2

I took the decision to migrate my XP laptop to Linux mostly because I wanted to sail new waters after being a MS user since MS-DOS 5.0.

Until now I must say that my experience was pretty positive. I had no major problems switching to a new system. I found substitutes for most of the software I was used to and for those few I didn't find an alternative, I relied on VirtualBox OSE and my old XP home edition. I was quite impressed by the stability and safety of the system. My laptop and me experienced a new speed we weren't accustomed to. The only thing made me a bit crazy was the impossibility to run the composite manager with application based on OpenGL or which worked with video rendering (basically Google Earth and VLC for watching videos). I understood that this was because of my ATI video card yet I was disappointed by the fact that the situation remained always the same either with Hardy and lately with Intrepid.

With the advent of the 8.10 "Intrepid Ibex" release I decided to try again something new and switched to the Kubuntu fork. At the beginning I felt both dizzy and bewildered by the KDE4 environment. It took me some times to get somewhat accustomed to the new desktop manager which sets a complete new concept of user interface. The learning curve wasn't so flat but I judged the worth the effort. On the other face of the coin the stability of the system was terrible. Panels got messed up once in a while causing me to swear first and sweat after to get everything in place. Contextual menu were sometimes weird (I couldn't open a pdf from the web on the fly but was forced to download and open it after), the ark tool won't compress -it didn't see them- some kind of files (like pdf) and folders, trying to erase a file caused the system to drain an insane amount of resources without apparent reason (but pressing shift+canc didn't), etc... With KDE4.2 version things im proved quite much and this was a great relief. However something dark was coming...

Out of the blue the headphones just stopped working. The weird was that by inserting the jack I got the feed for about one sec and then all went silent. After searching forums I did understand that the problem was probably related to ALSA and they advised to uninstall it and recompile. You know how it is when you happen to have an uncommon problem; the resources are few and often contrasting. As I said I'm a freshman and what is worse, a freshman without the time and will to learn bash and compiling and stuff the way I used to enjoy with MS-DOS when I was a teen. So I did what I usually do when I don't know where to slam my head against what in Linux. I opened Adept and looked for ALSA related package. And I had the great idea to uninstall one package (probably libasound-2, or alsa-base). The computer crashed and I was forced to restart. Guess what it happened when I tried to access to my user session again? See below...

Then I got scared. The computer was full of documents, all expendable except the fact I had a big bunch of new pictures of my son I didn't backuped. I was cold sweating and already thinking of my wife chasing me down like Sauron with the Fellowship of the Ring, except I wasn't likely to make it... I accessed my user from console to try to backup the pictures directory by cp-ing it to the external drive. But I could find the external drive in the /media directory and all my attempts to mount it were a failure. At this point I booted from the live cd and managed to have access to the folder and copy it to a safe location. At least I managed to sleep that night...

The day after (which is two days ago) I wiped the hard disk and installed Ubuntu 8.10 which is now running onto my laptop. I enjoy a immediate feel of improved stability and boosted speed. However the headphones problem keeps on haunting me!

I've grown loving Linux but there are things that really piss me off. I worship over all the concept of ergonomics and elegance in all human manufactured products, so also for what concerns software. In their way the distros I used are ergonomic and elegant but there are a few things I can't stand. Installing new software is a completely insane process. Left behind the add/remove tool, all what remains is chaos. Sometimes you just download a software from a website, double click and it installs and goes into the right place of the menu (Truecryp on Ubuntu). Sometimes you download it and then you must go and search for instructions to install it, copy&paste those on the terminal and that's it (Google Earth) but then how you uninstall it?? Sometimes you must add the repositories and, if you're lucky, the software get installed without issues and goes in the right menu place. Some other times you must mess with bash to copy files to some root place with sudo etc... As far as I'm concerned this is something crazy and one of the things which keeps new user at bay from say Ubuntu. Nowadays many people are willing and able to search the internet for open source alternative software, but how many of them can or want to the same to learn how to install it? Again, let's be frank, apart from the add/remove and, in a shorter range, synaptic, tool it needs a super user to install software on Ubuntu.

Anyway I could stand all this installation matter and bound to let's time be my teacher. The headphones trouble is though something completely unacceptable. We're speaking of a pretty basic function and a priority one. I will probably take my time and try some solution in a protected environment like VirtualBox but again this takes time and to me it's really a pain in the rear to waste a lot of time trying to solve this headphones related issue!

I won't surely go back to Windows, but I'm looking forward an iMac as my next computer.

Saturday, November 8, 2008

Verical Scrolling on (K)Ubuntu touchpads updated to 8.10

Not so many days ago my good friend Carlo posted a column on his blog court of misanthropy with the instructions to enable the Mac flavored vertical finger scrolling on Ubuntu and Kubuntu laptops. You can find my plug of his article here.
Anyway since the updated Xorg 7.4 running onto the freshly delivered 8.10 Intrepid Ibex version of the Ubuntu and Kubuntu distros those "old" instructions aren't valid anymore.
But Carlo's a smart guy and has already provided a new procedure which he tested and should therefore run smoothly on your laptops.
As far as Carlo's concerned it seems that the problem is the enabling of SHMConfing within an untrusted environment which is share among different users. It follows that the safest way to enable the two-fingers scrolling is use an XML file for the Hardware Abstraction Layer with the setting for this function.
The file must contain the following code:


And it must be saved as:
/etc/hal/fdi/policy/11-synaptics-options.fdi
If you're no Linux overlord just follow these plug 'n'play instructions:
1- Download this file already cooked by Carlo and save it in your home folder (i.e. /home/TheOneElectronic)
2- Open up the console, check you're in your /home and type:
sudo cp 11-synaptics-options.fdi /etc/hal/fdi/policy/
3- Restart the computer (it's not enough to restart X)
The two-finger scrolling should now be working
Further option: how to enable (Q)GSynaptics e SHMConfig
If you happen to be the only user of your pc you could anyway enabling GSynaptics (QSynaptics for KDE) you must create the file /etc/hal/fdi/policy/shmconfig.fdi containing the following code:

 
And here's the simplified version:
1- download this file already prepared for you and put it in your /home
2- Open up the console, check you're in your /home and type:
sudo cp shmconfig.fdi /etc/hal/fdi/policy/
3- Restart the computer
4- search and install (Q)GSynaptics with Synaptic or Adept
That's all folks!