What I miss of gnu/linux while forced to use MS windows XP

I will not compare windows (any version) to kde because that would be unfair, fluxbox is sufficient for this little confrontation.
1.A single desktop means that l waste a lot of time moving windows around.
2. I can‘t press Alt+F2 to launch programs, and windows menu is simply a mess.
3. It seems that there is no way to keep a window above the others when it looses focus, this is a very useful feature when you need to have important information at hand. Every widows manager that I know on linux has a list of options that you can use to customize windows behaviour.
4. No linux shell. Windows shell is no match and I would work much faster with a command line, especially on those tedious tasks that you could automate with some scripts.
5. No mid-button copy paste.
6. It get viruses.

And the most funny thing is that people still say “XP is better than vista/seven“. Well I‘m afraid that most of the arguments I have used are still valid for the new Microsoft OS.

False earthquake. True superstition.

If you don’t live in Italy or you haven’t read news from this country probably you haven’t heard news about the terrible earthquake which was supposed to happen on May 11th.

However I think that this is a story which is worth to be told, because it teaches much about our culture.

A man called Raffaele Bendandi (died in 1979) stated that he could foresee the occurrence of future earthquake, with a pretty high accuracy about place and time. His theory was based on the motion of planets and Moon.  He believed that earthquakes are caused by tidal forces of massive objects in the Solar System. In the end it wasn’t such a bad idea, however it has been proven to be false. Recently someone on the internet stated that Bendandi said that an earthquake was to hit Rome on 11th day of May. False news travel fast, so everyone in Rome knew about the earthquake. One would think that, in 2011, people should know enough about science to understand that it is impossible to foresee earthquakes, not to mention earthquake thirty years from now. Well, it didn’t go that well, in facts a lot of people were scared by the prediction and didn’t even go to work or  slept in their cars or somewhere else. I can’t even imagine what will happen on 2012.

Enabling effects on KDE 4.4.x

KDE on my Debian testing has suddenly lost the ability to activate desktop effects. On systemsettings the message displayed was the following:

compositing is not supported on your system

I’m not a big fan of special effects like exploding windows, but plasma themes are often ugly without effects and I like to have shadows surrounding windows.
So, I have found that this is a known bug and can be solved by simply editing .kde/share/config/kwinrc. You will find this line:
CheckIsSafe=false
which you should change into:
CheckIsSafe=true
This will make you able to enable desktop effects in systemsettings again.

This experience allowed me to switch back to fluxbox again, which has been a most pleasant diversion.

For the sake of completeness, I have the following video card:
VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350]
and I am using proprietary drivers, but I have read about people having the same problems with other gpus too.

Copernican revolution never happened

Some weeks ago I opened my browser (I’m trying rekonq) and I saw an image from APOD.

A strange signal received by the radiotelescope SETI

I read the description without paying much attention and, for a moment, I actually thought that we had caught some alien signal. A few words crossed my mind : “Everything is about to change”.

 

Now I’m thinking, did people ever realized that the sky above is an infinite space of possibilities? Different worlds, different suns, beautiful horizons that we will never able to see are up there, too far from us to reach, but they are there. Maybe even different civilizations, cultures, creatures. Things that our earthly imagination cannot even conceive.
I don’t think that the fact that we will may never be able to reach them makes this less fascinating.

From what I see, people still live on a flat Earth, with a painted sky above them. Stars are nothing but tiny sparks in the sky, and they are barely visible due to light pollution.

I really hope that someday we will be able to read some signal coming from an alien intelligent life form. I know that any answer from us would take hundreds of thousands of years and a dialogue would be impossible, but that would really change the way we look at the sky above us and the Earth below us.

“Live long and prosper”

No audio from headphone on Ubuntu on my Asus laptop

I have an Asus Notebook, A6Q00VM and it mounts this audio card:
00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 04)

I’m using Ubuntu on this notebook, normally I would go with Debian Testing but I want to keep in touch with this famous distro so I keep it in my old notebook, just in case I get nostalgic. However, the problem is that I don’t get any audio from my headphones. Solution is to add the following lines in /etc/modprobe.d/alsa-base.conf
options snd-hda-intel model=z71v position_fix=1
Don’t ask me what they mean. However reboot your system and you should be able to enjoy music without annoying your neighbors, or you may annoy them even more with your new speakers.

The funny thing is that I did the same thing with 7.10 (my first approach to linux!) to solve the same problem.

2011 for the Italian television

2011: On the second day of the new year on italian public television you can see:
Horoscopes, Fortune-tellers, Magicians and a subtle commercial of a creationist book for children.

1011: On the second day of the new year at the court of Hugh Capet of France you could have seen:
Horoscopes, Fortune-tellers, Magicians and a priest explaining the Genesis to the children.

Some things will never change.

Happy new year.

How to write in Japanese on Debian Squeeze and KDE

I think that maybe this is the simplest way to write in Japanese on my Debian box.

aptitude install ibus-anthy
You can install other input methods for other languages too.

Add the following lines toyour .bashrc
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus

Launch ibus-setup from a shell, then configure the input methods and the other options. Logout from your graphical session and login again. You should be able to change the input method in your applications now.

Back to the fluxbox

At lest once per year there’s a moment when I start my fluxbox session instead of the usual kde one, and I begin to imagine how it would be cool to use fluxbox with a black and green theme, using only command-line-interface (cli) applications and just be a hopeless nerd.

The question is: can one use just a command line to do most the things he usually do? The answer obviously depends on what one wants to do.
This is the list of programs I usually use from a command line:
-Browser : w3m, lynx
-Instant Messaging : freetalk (xmpp), finch (everything else)
-Editor, programming : vim
-Players: mplayer
-Pdf: pdftohtml and w3m, or pdftotext.
-Downloading, torrent: aria2
-RSS feeds: canto
Notice that w3m can display images in a xterm terminal. I remember that I could even access gmail with w3m, but it seems that I can’t do it. The drawback is: no javascript, no flash (well, this might not be considered a drawback at all)
This will cover 90% of my common activities. I still need an email client, but I am working on it.

Fortran and binary files: sequential access

When you write a binary (FORM=’UNFORMATTED’) file using Fortran 90, you have two choices:
1. Sequential access
2. Random access (or direct)

I will talk about the first method because the second one is easier to understand and is better documented in the web.
In the first method your program will open a file to write a 4-byte integer which contains the length of the record (i.e. the length in byte of the pieces of memory that you are writing on the disk), then it will write the block of memory (i.e. the variable) that you put in the “write” statement and then it will write the same 4-byte header that it wrote at the beginning of the file. The block of data between the integers is called record.  In the following example we will write two arrays in the same file using just one record (each time you call the write statement you write a new record on the file)

implicit none
integer, parameter :: N=8
real*8,dimension(N) :: U,V
integer :: i

do i=1,N
U(i)=i
V(i)=i
enddo

open(unit=2,FILE=’data.bin’,status=’replace’, &
FORM=’UNFORMATTED’)
write(2) U,V
close(2)

Now by using a hexadecimal editor like bvi or hexedit one can see what has really been written:


80 00 00 00 00 00 00 00 00 00 F0 3F 00 00 00 00 00 00 00 40
00 00 00 00 00 00 08 40 00 00 00 00 00 00 10 40 00 00 00 00
00 00 14 40 00 00 00 00 00 00 18 40 00 00 00 00 00 00 1C 40
00 00 00 00 00 00 20 40 00 00 00 00 00 00 F0 3F 00 00 00 00
00 00 00 40 00 00 00 00 00 00 08 40 00 00 00 00 00 00 10 40
00 00 00 00 00 00 14 40 00 00 00 00 00 00 18 40 00 00 00 00
00 00 1C 40 00 00 00 00 00 00 20 40 80 00 00 00

Each couple of numbers is a hexadecimal conversion of one byte (8 bit) in the file.
First look at this block “80 00 00 00” which is written both at the bottom and at the top of the file. That is the 4-byte integer that contains the length of the record. We have used 2 arrays made of 8 elements 8 byte long. So we expect to read a decimal 2*8*8=128, that is a hexadecimal 80 (8*16^1 + 0*16^0), which is exactly what we read.
But it is not over yet.
Let us use longer arrays, N=42. In this case we would expect that the header contains the following characters: 02 A0, that is 2*8*42=672. But on your hex-editor you might find: A0 02 00 00.
That is because your system is using little-endian ordering (that is the least significant bit first). On other systems you might find a big-endian ordering (most significant bit first).

Chaucer be my guide.

With that old binoculars I managed to see two Jupiter’s moons Ganymede and Callisto. However I couldn’t see them very well because Jupiter was too low above the horizon (20°) at that time. Nevertheless I saw Uranus, next to Jupiter, a really faint object. After that experience I used the binoculars to watch at the sky and at the Moon. I really enjoy being out in the night, the fresh air, the darkness around me and the starlit sky above me.

I tried to search for information about telescopes, mainly their prices. I even searched for bigger binoculars. But I think that before spending a big amount of money I should be sure that this is what I really want and, above all, whether I can go out in the night to some dark places on regular basis.

In the meantime I am studying a little of astronomy, mainly positional astronomy, in fact I am building an astrolabe, a simple one made of paper or maybe sheets of wood. It is really a good exercise of geometry and astronomy and has a very interesting historical background which involves many different cultures. A bright example is “A Treatise on the Astrolabe” by G. Chaucer, dedicated to his son it is probably the main source if you want to understand how to build and how it works an astrolabe. And, to my surprise, even if English is not my native language, it is not too difficult to read.

“Lyte Lowys my sone, I aperceyve wel by certeyne evydences thyn abilite to lerne sciences touching nombres and proporciouns; and as wel considre I thy besy praier in special to lerne the tretys of the Astrelabie”