Wednesday, February 28, 2007

Kirocker Applet on Kubuntu Feisty

After fixing my little problem with the Amarok charset encodings (see previous post) I was able to rebuild my collection and have all my music titles, albums and artists names nicely displayed on the OSD screen and collection browser.

After that I read about this little Kirocker applet and wanted to try it. Unfortunately there are no packages in the official repositories so we need to install it from sources.

To install it in Kubuntu Feisty Herd 4 (may work too in Edgy and Dapper) you need to satisfy a lot of development dependencies that are difficult to figure out. The configure script will fail a lot as you figure out what packages you need to install to allow the configure script to finish. To avoid you the trouble here are the instructions I used to get Kirocker to compile on my system.

First install all dependencies:

$ sudo aptitude install build-essential
$ sudo aptitude install kdelibs4-dev

Download the source code from here and compile/install it:

$ tar xvfz kirocker-2.0.tar.gz
$ cd kirocker
$ ./configure --prefix=/usr
$ make
$ sudo make install

Once installed you can add it to the kicker as any other applet and enjoy!.

Feisty Herd 4 impressions

Out of boredom I installed the Feisty Herd 4 release of Kubuntu just to kill time. All I can say is that I am somewhat impressed with this release. The installation was incredible fast and the new interface is very polished and professional.

There is this new animation when clicking an icon that looks just great and the logout/halt screen is a lot more aesthetic. Also I can verify a lot more responsiveness in my rather old hardware (Intel Celeron 1.7G with 512MB Ram).

A feature all users of Feisty have celebrated is the KNetworkManager that makes it easier for laptop users to handle several connection settings (i.e. school, home, work) but in my case I use a desktop computer that is always connected to the wall. I haven't tried it yet on my laptop but I can say it does not work well on my setting. Even thought I am browsing the Internet and writing this blog the KNetworkManager tray icon insists that my ethernet cable is disconnected and that I have no Internet.

Also some minus points go to the installer partition manager. The first option it gives you would simply use the whole disk erasing any other partitions you may have. This is no good for novice users. The manual partition option is Ok but for some reason QParted did not fit on my screen resolution forcing me to move the window horizontally several times to be able to see all available partitions.

Another minus points go to the internationalization support. I always select Japanese as the installer language and the installer warns me this will be the default language on the installed system. After I finished installing the system I hoped I would get a fully functional Japanese system but instead I got a fully functional English system. Enabling Japanese is not big deal as this happened to me on Edgy too before but again this is a no-no for novice Japanese users.

Also when selecting the keyboard layout the Japanese (ja) layouts did not work in the testing box. The layout seemed to be a us keyboard. Strange enough after the installation finished the system's keyboard layout did work with my Japanese keyboard.

Apart from the above details Feisty is very stable and fast. The look is very polished and the smooth. I simply love it and as a person that have used almost all other major distributions I recommend it to all.

Update: It seems that if I configure the network on the live CD before starting the installation then the system will be indeed set up with the language you chose during installation. It makes sense since all those localized packages won't fit in a single 700MB CD so the installer seems to download them from the Internet.

Amarok's Only Problem

Amarok is such a great application I have convinced Windows users to switch to Linux simply because they want to use Amarok. Unfortunately for me and a lot of non-english natives, Amarok is having a little problem with the MP3 id3v1 tags since the 1.4.0 release.

In short the problem (bug?) is that Amarok won't handle id3v1 tags with encodings other than ISO-8859-1 because they claim to be following the spec. Other character encodings are supported only with id3v2 tags. You can read the details in this bug report.

First assuming you agree to take on the colossal task of re-tagging all your MP3 collection, that I haven't found an automatic way to do yet, you will find that even changing all the tags to id3v2 does not solve the problem. Read comments #15 and #19 on the bug report.

I personally have found that the only way Amarok would read the tags and display them correctly is if I use the Amarok's own tag editor itself and doing so will render those tags unreadable on any other software/utility. At this point I really don't know who is following the spec, Amarok or the other hundred apps/utils I have used.

My solution was a little drastic: I converted all my MP3 collection to ogg/vorbis using mp32ogg. I found that the ogg/vorbis tags are UTF-8 by default and all applications I have used so far can read and display my tags correctly.

This solution may not work to everyone since some require other encodings for compatibility with some hardware players but for me is good enough. And yes, I took on the colossal task of converting my collection and re-tag them all. Fortunately mp32ogg works on whole directories and not only on individual files.

For all others that reported this problem let's hope Amarok's developers hear your voice and add the encoding option back to the next great Amarok release. For my part I will keep my max of votes on this bug report.

Tuesday, February 27, 2007

A dual screen hack: X2VNC and Win2VNC

These two little gems: X2VNC and Win2VNC from Fredrik Hubinette have become one of my favorite utilities to use at work.

Imagine a dual head system where your left screen has KDE, your right screen has WinXP and your mouse moves freely between the two. Using X2VNC and/or Win2VNC you can do it.

My setting is like that described above: two PC's one with Kubuntu and the other running Windows XP. I have RealVNC server installed on the Windows box and use X2VNC in the Linux box to connect to the Windows one and presto! now I can use a single mouse and keyboard to control both boxes.

It is possible to do the connection the other way around by installing the X11VNC server on the Linux box and then connect to it from the Windows box using Win2VNC. The last time I tried this configuration the mouse in Win2VNC wasn't as smooth as in X2VNC.

You cannot use the RealVNC server in Linux in this case because this VNC server creates a new X11 session for each VNC connection, With x11vnc you get control over the current X11 session.

Windows Setup for dual screen hack:

Download and install the free RealVNC. Start the VNC server in user-mode or as a system service. For testing purposes configure "No Authentication" on the Authentication tab of the server options and make sure the Linux box IP address is configured on the Connections tab of the server configuration.

To open the configuration dialog of the VNC server simply select "Options" in the context menu (right click) of the VNC icon on the system tray.

Linux Setup for dual screen hack:

Install the x2vnc package of your distribution. In Kubuntu edgy/feisty is as simple as:

sudo aptitude install x2vnc

Then run the following command to enable the dual screen hack:

x2vnc -east windows_ip_address:0

Now if you move your mouse to the far right of you screen (Linux Screen) it should appear on your Windows screen and now everything you type on your keyboard would appear also on your Windows screen.

If your Windows screen is to the left of the Linux screen then you must replace the "east" option with "west". You can also use "north" and "south" in case you have the Windows screen above or below the Linux one.

Security Setup
To avoid unauthorized access to your system it is better to enable access control to your VNC server. To do this simply enable password authentication on the RealVNC server and restrict the IP addresses that can connect to the server in the connection settings.

On the Linux side we must create a passwd file so that X2VNC can authenticate with the server. For this we need the vnppasswd command utility that comes with the RealVNC server package:

sudo aptitude install vnc4server

After installation is finished we issue the next command to create a password file:


This command will prompt you for a password that must be the same you configured on the Windows RealVNC server. Once you enter the password a passwd file will be created inside the .vnc/passwd directory inside your home directory. To make X2VNC use this file for authentication when connecting issue the command:

x2vnc -east -passwdfile ~/.vnc/passwd windows_ip_address:0

I have created a desktop shortcut where I configure this command to avoid having to type it every time I boot the machine. Now with a simple click I enable the dual screen hack.

Thursday, February 08, 2007

Testing POP over SSL the old way

In the old days it was common to test SMTP/POP servers using a simple telnet connection to the corresponding port (25/110) and interacting directly with the server via text commands. This was simple, clean and easy to do without need of configuring any mail clients just for testing.

These days any basic SMTP/POP server is configured with TLS or SSL to improve security. This is a necessity rather than a luxury these days as more commerce and business are dependent of Internet services like Mail.

For a time I thought that the old school of direct text interaction with these servers was impossible until I found the openssl command utility. From the man page it is easy to see that this openssl utility has several uses and one of them is. taken from the man page itself: SSL/TLS Client and Server Tests!!.

For example to connect to a POP3 server that uses SSL we call the following command:

openssl s_client -connect localhost:995

Make sure you replace localhost for the server address and if you use a different port (995) change it as well. This command will connect to the POP3 server and handle all the SSL stuff for you. You will see a lot of messages about certificates and SSL handshakes etc... if you are not interested in SSL simply ignore them.

After all the SSL stuff has passed you will be greeted by the POP3 server message (+OK Hello There for courier-pop) and then you can start interacting with the server as you would using telnet.

If you don't know how to interact with a POP server using text commands check my previous post about the topic.

Faking POP

As part of a networking class at my lab we teach students protocols by asking them to implement a simple POP3 client in Java. The client must connect to the POP3 server and interact with the server as a normal POP client.

As soon as the class started we realized the university POP server uses SSL to encrypt the connection (for obvious security reasons) and asking the students to implement the SSL part of the client was not an option.

We needed a POP server set up quickly before the students could present their programs or at least something that behaves like a POP server. A quick search resulted in FakePOP and the great Ubuntu has it in their repositories.

I simply issued the following command:

sudo aptitude install xinetd fakepop

Then create a xinetd configuration file "/etc/xinet.d/fakepop" that contains the following:

service pop3
server = /usr/sbin/in.fakepop
disable = no
socket_type = stream
protocol = tcp
user = nobody
wait = no

and restart the xinetd daemon:

sudo /etc/init.d/xinetd restart

and in less than a minute I had a POP3 server (or at least something that behaves like one) on my machine and the class was saved.

Also you can create a custom message to be delivered to anyone connecting to the fakepop server. You can create as many messages as you want by putting them as text files inside the "/etc/fakepop" directory. Some examples can be found in the "/usr/share/doc/fakepop/examples" directory like the one below:

From: System Administrator
Subject: example message - text only
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This is a simple message.
It contains only text.

Wednesday, February 07, 2007

Long Vacations in Panama

I was in a long vacation (over two months) in a tropical paradise known as Panama. Most people (specially in Japan) do not know Panama is actually a country and only know about it because of the Panama Canal.

If you like beaches you would like to go to Isla Grande, Isla Colon and San Blas were you will find beautiful caribbean beaches or travel the Via Panamericana visiting all the resorts at the Pacific Sea. If you like mountain hiking you can go to El Valle, Boquete or Volcan to find a rich tropical fauna and flora only seen in Panama.

City people can simply stay in Panama City and visit the malls (Multicentro, Multiplaza and Albrook Malls) and all the night clubs around the city (The Gallery, Oz, Mistyk) and of course the Coast Way to eat on the finest restaurants in the country.

Panama has it all in a relative small country so make sure you visit it in your next vacation. Here are some links with information about Panama:

Chiriqui Chatter: a blog by James Dean where he talks about his like in Panama. Here you will find a lot about the culture and cousine and also how to retire in Panama if interested.

Blogs Panama The name says it all. You will find here a lot of blogs about Panama and it's people.

Tavel Blogs from Panama Here you can get the view of Panama from foreign people in Panama. People that have traveled to Panama and wanted to share their experiences, photos and even videos with the world. Finally if you want to know about the night life in Panama (Wild on E! style stuff) then check this page.

After this long vacations under the sun I got a little rusty in the technology camp. This is the principal reason I haven't learn anything new or interesting to blog about. I will try to resume my studies/work activities and start blogging soon.