2.19.2009

Bye bye Xandros....

Two days ago my Eee PC went crazy. First it has showed that there are a lot of updates including an upgrade from firefox 2 to version 3. I said OK, it should be all right. But then it has shown that the upgrade has failed and started to behave in a strange way. Soon I had to realize that the writable part of the root partition is full.
Eee version of Xandros have an interesting partition scheme. The root partition is on the 4 Gb SSD disk and consist of two parts: an approx. 3.4 Gb read only part and a 600 Mb writable part. Any additional programs go to the writeable part, so there is no too much space. Contrary on the read only part there is some 2.5 Gb free space which is not accessible. I think this is a design error. Anyway, I have used the backup function which copies the files from the read only part therefore restoring everything but the user's data to the factory defaults. Otherwise it is not a bad idea, but I hate that I have just a very limited space for additions.
Anyway, I have restored the default program set. And again, I applied the upgrades without installing any additional software. And again! The writeable part become full, so I cannot use the system. That was the last drop, since it is obviously a design problem.
I was looking for a suitable alternative and finally I ended up with Eeebuntu (Netbook remix). I am really not a fan of Ubuntu, I do not like the hype around it, so I had doubts about it, but I gave it a try. Now I have installed everything, and even more. All the features has worked out of box, webcam, wifi, wired ethernet, hybernation etc. I dedicated the 4Gb disk to the system (never again too small space!) and the 16 Gb disk to home. I am a bit worried about the wearing of the SSD disks, so I will look around the right mount options like noatime, and the migration of logs to a tmpfs filesystem. At the moment I am very satisfied with Eeebuntu, I like some of the features I lacked from Xandros. For example I like that the system does not hybernate when it is on the charger and the lid is closed. This way I can listen for internet radios without keeping the stuff open. Since I do it a lot, now the LCD does not get dirty.
I hope I can use now the system even more efficiently, since I like a lot the hardware, just Xandros what made it slow and not suitable for me. And I can install even gramps for my family history research!

1.01.2009

Civic adventures

My favourite computer games are the ones where you guide a country, build towns, and research advances. So the Civilization and it clones. Up to now I played the different versions of Freeciv and I am really happy with that, except that its AI is quite week, plus I would like to see a bit more animation during playing. There is a single version of the official Sid Meyer's Civilization series which was released to Linux, and it was the chapter “Call to power”. It is and old Loki game, but still you can buy it from tuxgames, the supplier of commercial Linux games, although Loki itself has bankrupted a few years ago. I have decided that it is time to buy this piece of gold, and I have done so.
The box was delivered in a few days, and it contains a fancy handbook and big format charts explaining the game in addition to the installation CD. Since the game was developed almost a decade ago, it is a bit tricky to fire up. I the firs step I have installed it on my Eee PC.
Of course the Eee PC does not have an optical drive, so I had to create an iso file from the CD on my desktop:

dd if=/dev/sr1 of=civctp.iso

where /dev/sr1 is the device file of the cd-reader. After migrating the file to the Eee pc (quick LAN favoured!) I can easily mount the iso as a cd:

sudo -i
mkdir /mnt/cdrom
mount -o loop /path/to/civctp.iso /mnt/cdrom

After that the /mnt/cdrom directory is just like a normal CD-ROM, I can do the installation. The installer itself requires Tk/Tcl and the version from the deion repository refused to work, so I have installed the game manually. It means that I had to follow the instructions of the readme file on the CD, untar two archives, applying the last official patch from Loki (version 1.2a), and that is all. I have also installed the video files so I can enjoy the animations too. Alltogether the full installation requires some 700 Mb disk space. I have put it to the user's home directory, because there is enough space there. Xandros for Eee PC comes with glibc 2.1 (shame on Asus to supply so old buggy system), but luckily this is the version against the game was compiled so it runs without additional tweaks. The only thing which is bad is the sound, It is skipping which is annoying. I think it could be fixed using the old SDL mixer, but I do not care because I play with the sound off not to disturb the rest of the family.
Doing the installation on my desktop PC was a bit more tricky. This time the installer run normally, so I installed he game via the easy way into /usr/local/games as root. Again, I have installed the videos. This way I do not have to insert the CD every time I (or my son) play. After starting the game, we can see the opening film, but after that it crashes with error related to linking. I have found the solution on the old gentoo wiki which has vanished this year, so I summarize shortly to fellow players. The problem caused that the old Loki games are compiled with the old libraries and the new versions installed on the modern systems are not compatible with the games. The main guilty component is glibc which has broken compatibility with version 2.3 several years ago. The solution is to pre-load the old libraries for these games. The bright gurus of the Linux world have collected the compatibility libraries and they are available as a tar package: loki_compat_libs-1.3.tar.bz2. I have opened it and put them into the /usr/local/games/CivCTP/Loki_Compat/ directory. I have created a startup script called /usr/local/bin/civctp with this content:

LD_LIBRARY_PATH=/usr/local/games/CivCTP/Loki_Compat/ /usr/local/games/CivCTP/Loki_Compat/ld-linux.so.2 /usr/local/games/CivCTP/civctp.dynamic --nocdrom --nosound

I can point the start icons to that script and it will start the game properly, but again, without sounds. So that's all the tricks, and now we can enjoy this evergreen game, one of the bests of the series.

11.26.2008

Parallax Board of Education with Eee PC

I have a Board of Education from Parallax. I use it to program a Basic Stamp 2 microcontroller and perform various experiments in electronics. Today I figured out how to use it with my Eee PC 901. My BoE is has an RS232 port and I have a USB2RS232 adapter, so I can connect the programmer to my Eee PC via a standard USB cable. The adapter is handled by the usbserial kernel module, which is pre-installed to the default system, so I have to just load it as root:

sudo modprobe usbserial


The module creates the /dev/ttyUSB0 device file, but unfortunately the prorammer program looks for the /dev/bstamp device. So I have tweaked with udev to make it properly. I have created a custom udev rule file for this device. For that I have created the file /etc/udev/rules.d/10-custom.rules with this content:
# 10-custom.rules
# My own rules

# for the basic stamp programmer with rs232 - usb converter
KERNEL=="ttyUSB0", SYMLINK+="bstamp", GROUP="users", OPTIONS+="last_rule"

After that I have reloaded the udev rules like this:

udevcontrol reload_rules

And now, when I connect the programmer with thee USB cable, there is the /dev/bstamp device with the proper read/write rigths.
The next step is to install the programmer software. I use the BASIC Stamp Tools for Linux. I have downloaded from their site, and opened the archive. I have compiled the source with make, and installed with sudo make install
To install the proprietary tokenizer library from Parallax properly, I have done this as root:

echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig

The previous installation put the tokenizer called libbstamptokenizer.so into the /usr/local/lib directory. These steps make it available for dynamic linking. So now I have two executables installed: bstamp_tokenize compile PBASIC language sourcecode, and bstamp_run download the compiled code to the microcontroller. An example session with compiling and code execution:

> bstamp_tokenize hello.bs2 hello.tok
PBASIC Tokenizer Library version 1.23
> bstamp_run hello.tok
Basic Stamp detected!Model: Basic Stamp 2
Firmware version in BCD = 16
18 characters transmitted
18 characters echoed
18 characters transmitted
18 characters echoed
18 characters transmitted
18 characters echoed
DEBUG OUTPUT: (Press [Control]-[C] to complete sequence)
_____________________________________________________________________
Hello world
Hello world
Hello world
___________________________________________________________________
Received [Control]-[C]!
Shutting down communication!

Success! So now I can use the Board of Education too continue my experiments!

11.22.2008

Flashcard program for Eee PC

I am learning Finnish language, and for that I need a flashcard program. Finnish words are hard to memorize, even though I am Hungarian, and since Hungarian and Finnish are somewhat related, I should learn easier than others, but it is not so. I hope that a flashcard program would help a bit. Earlier I have used kvoctrain on my other computes. I was looking for that program, but I have found, that if I install it from the debian repositories, it will update half of my system, and I do not want that.
Instead I have found that there is a program called mnemosyne. I have fallen in love immediately with its name. (You know, it is a Greek word after the name of an ancient goddess, but it also name of a beautiful butterfly.) It turned out, that it is easy to install this program I had to preinstall these packages from the debian repo: python-pygame, python-qt3, python-xml, memaid-pyqt, and python-setuptools. After that I have downloaded the linux source from the site of the project. I have decompressed, and after that I have installed ad root with the command:
python setup.py install
in the directory of the archive. It had installed without problems and now I can use it. The program works as expected, and I am fighting with words. Hopefully I will learn at least in some extent.

11.14.2008

Online storage services on Eee PC

I have just noticed, that Asus have provided me with my Eee PC 901 also a service called Eee Storage. It means 20 Gb storage on somewhere on a web based file server where I can keep my files and access from anywhere when I have internet connection. The idea is not new nor unknown for me. I have accounts for Box.net and also Dropbox services. I like both of them, since they have their own unique value. I like Box.net because they integrate seamlessly with other web 2.0 programs like Zoho or Facebook. And the best is that they provide accessibility also via webdav, so I can access my files directly from konqueror or any other file manager with webdav support.
I also like Dropbox. They give a client program available for Windows, Mac a Linux. The client connects to the internet storage and syncronizes a directory on the local hard disk and the file server. It means that I can work also offline, and the changes in the directory content is synced whenever next time I have a connection to the net. I enjoy most their directory sharing feature. We have created a shared folder with my father, so when I want to send him files, e.g. our latest family pictures or videos, I just copy them to this local folder, and after a while he can use them also.
So this is my experiences with online storage when Eee Storage came into the picture. I have realized this service just a few days ago, and I have tried yesterday. The size of the storage (20 Gb) is impressive compared to the free Box.net or DropBox capabilities. There is a built in client feature in the default file manager of my Eee PC which is produced by Xandros. Unfortunately I prefer to use Konqueror, but since the access method to the storage is not public (or I haven't found yet), I cannot setup it. The access with the default file manager is intolerably slow. During the first connection it sets up the account for me in the Eee Storage server without further notification. Unfortunately if I want to use the web interface, I have to make further steps to get the user name and password for it. The help in the FAQ of the service is misleading, I do not have the required 16 digits code on the manual of my gear nor the specified directories where I am supposed to do the setups automatically. Instead I have found a shell script in the Eee Storage/Web Storage directory called Account Setup.sh. Clicking on it I was able to provide the user name, password and email address what I wanted to use with my account. So this is not very mature, I have expected more from Asus. Not to speak that after the registration the service have sent me an email in which my user name and password is stated in plain text. I hate this kind of insecure solutions. Finally I was really disappointed with the speed of this service, so I have decided to go back to the other two solutions.
I quickly decided that Dropbox is not an option this time, because I do not want to give local hard drive space for the offline working. Instead I will use my Box.net storage mounted locally with webdav filesystem.
For this I have installed wdfs (and the dependent libneon26 package) as explained here. After that I was able to mount and umount manually the Box.net storage place. To make life easy, I have created two scripts for the task:
mountbox
wdfs http://www.box.net/dav '/home/user/My Documents/Boxnet' -u 'my.email@for.box.net' -p secret_passwd

umountbox
fusermount -u '/home/user/My Documents/Boxnet'

I have created the target dir:
mkdir '/home/user/My Documents/Boxnet'

And I have put the two scripts into the /home/user/bin directory. After chmod u+x *mountbox in that dir the scripts are working like a dream. The service is not particularly quick, but not bad. I can mount, umount the directory, move or copy files from any file manager, or even better, from command line. And that is it. Maybe when I will be out of storage, I will also use Eee Storage.

10.28.2008

PDF readers on Eee PC

Today I have fixed some smaller annoyances on my Eee PC 901 related to the installed Acrobat Reader. First of all, I am not very happy with this reader, on my other computers I use evince wherever it is possible. I like that this stores where I was in the text, so it will open my books where I have left last time. The second thing I like in evince that it can work better in full screen mode. Acrobat Reader show always the full page in full screen mode (correct me if I am wrong), however I prefer page with fit view. On the other hand it seems that Acrobat Reader overperforms evince in case of complex documents with a lot of pictures, just like my favourite Linux Magazine, what I intend to read also on my minilaptop. So finally I have decided to keep both reader program. I will mostly use evince, but Acrobat is kept for the shake of Linux Mag. (Linux diversity rulez!)
The first thing I have done was to get rid of the Finnish internationalization package for acrobat reader: apt-get remove acroread-fi
Then I have installed evince from the debian repository. I have udes this article from EeeUser as a guide. I have added the debian etch repo as explained earlier, evince was installed with apt-get install evince
Of course after that I have disabled again the debian repo to avoid unnecessary complications with the updates.
Finally I have set up in konqeror that evince will be the default programs fo PDF documents and acroread just an option when I cannot avoid it. And that's it! An even more confortable desktop on my Eee PC 901!

10.22.2008

Some more tricks on the desktop of my Eee PC

So I had recognised already in the first days of using my Eee PC 901, that the desktop is composed from KDE programs. Using the Ctrl+Alt+T and the xterm I can start a lot of preinstalled KDE 3 programs. Because of that I thought that it is a real KDE desktop customized by Asus. I am somewhat familiar with KDE since I use it on all my other computers. I started to streamlined the desktop of my Eee PC to make it more familiar. First I have started kconrol, the KDE Control Center. In that I was able to setup the necessary keyboard layouts (Finnish and Hungarian, since I use both in my work) and also some keyboard shortcuts. I was satisfied with this, but when I logged in next time, I have noticed that my settings were disappeared. Today I was hunting for the solution. It turned out, the the desktop is in reality IceWM, so I have created the /home/use/.icewm directory to contain my personalized config files. I have just copied the system wide configs, because mostly I am happy with them:

mkdir /home/use/.icewm
cp /etc/X11/icewm/* /home/use/.icewm

I wanted to start the keyboard layout handler program and the shortcut handler program when starting the desktop, so I have created the custom startup script for icewm: /home/use/.icewm/startup. The content of the file:

#!/bin/sh
/usr/bin/kxkb # KDE keyboard layou handler
/usr/bin/khotkeys # KDE hotkeys handler

Of course, I have made it executble with chmod +x /home/use/.icewm/startup
I turned out, that it does not work as such. The icewm config files are used there, for example I can make the start menu visible by setting the value 1 for TaskBarShowStartMenu in the file /home/use/.icewm/preferences. But the startup script was not executed. I have googled around and have found out, that this is because in the initialisation script: /usr/bin/startsimple.sh icewm is started an inproper way. edited the file as root (sudo -i) and replaced the line
exec icewm
to
exec icewm-session
as recommended in the documentation of icewm, and voilas, everything works like a dream!