Saturday, January 19, 2008

ClamTK 3.07 antivirus in Slovene


As I am slowly becoming a big fan of Linux and Ubuntu, I decided I would also contribute my time and effort to the projects. I recently started using ClamTK as a virus scanner on my Ubuntu machine and found it was not localized to Slovenia. The localization data was not that huge and I managed to localize it in just a few days, including the translation and testing.

ClamTK is a front-end GUI for the ClamAV antivirus machine.
I had a few problems setting the correct locale as I wasn't sure if it should be sl or sl_SI. Any feedback on this problem would be welcome.

The ClamTK application including the Slovene localization was issued today in edition 3.07

Saturday, January 12, 2008

Watch TV Slovenija over Octoshape in Ubuntu Linux

Update 14-Apr-2009

I have heard from RTV Slovenija that the Octoshape now only works in combination with high quality Flash transmission. The Windows Media player (including the transmission type described below) is not supported anymore.

----------------------------------------------

Update 04-Mar-2009

Due to possible changes in the way RTV Slovenija is broadcasting their programs over the internet it is possible that this might not work anymore, it certainly hasn't been working for quite a few weeks now.

----------------------------------------------

TV Slovenija is streaming live TV over the internet using the Octoshape system as a go-between RTV Slo servers and the video player on your PC. To learn more about Octoshape, click here.
The Ubuntu support site has put a lot of the instructions on this site:
https://help.ubuntu.com/community/Octoshape
but I found that you have to do some additional changes for it to work.
There is also help available on the Octoshape site that helped me solve a problem with additional settings: http://www.octoshape.com/plugin/linux.asp
The support page tells you to create the setup.cfg and put in the path to the java library
JavaExec=/path/to/libjvm.so
I had a few problems trying to find the libjvm.so file but don't forget to look in the client folder. Mine was in "/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386/client/libjvm.so".
Instead of using the search facility in Ubuntu, which I thinks sucks as I cannot search squat with it, I suggest using the good ol' Terminal and entering "locate libjvm.so". The output will list all locations where the file is located.

Don't forget to also fill in the path to the libjvm.so in the setup.xml file in the Octoshape folder:
This should now work. All you have to do is open the Terminal and got to the Octoshape folder and call the program with the URL of the stream as a parameter:
./OctoshapeClient -url:XYZ.xyz
The XYZ.xyz part is the URL and you can find different streams and their URLs on this Octoshape page. The actual URL is in the "Play" column.

Calling the stream this way is not very practical so I found a way of creating an icon and putting it on the desktop. Here are the instructions:


Create a link on the desktop to launch the program

Right-click on an empty space on the desktop and select "Create launcher" from the menu that opens:

Type: Application in Terminal
Name: RtvSlo 1
Command: /home/[username]/octoshape/OctoshapeClient -url:RTVSLO.tvslo1
You can give yourself a favour and prevent any typos by selecting the location of the Octoshape program by selecting the "Browse" button on the right.
Comment: RTV Slovenija 1

You can do the same for RTV Slovenija 2:
Type: Application in Terminal
Name: RtvSlo 2
Command: /home/[username]/octoshape/OctoshapeClient -url:RTVSLO.tvslo2
Comment: RTV Slovenija 2

------------------------------------------
UPDATE
If a windows user will accidentally wander on this page he or she can be comforted by the fact the the whole setup is dead easy and can be found here, albeit in Slovene. You basically install Octoshape and Java. When I say Java, I mean the JRE and you might already have it installed. If you are not sure you can check on the Java page here - the test supports different systems including Windows and Linux - well it worked on my machines.

UPDATE for Ubuntu 8.04 (Hardy Heron)
The Octoshape plugin works, but you will have to either re-install Octoshape and Java and correct the path to the libjvm.so file. The Hardy Heron installed 1.6.0.06 and the new path was: /usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/client/libjvm.so
You must also re-edit the setup.cfg file if you re-installed Octoshape. Just check it anyway so you don't have to go through needless de-bugging.

Making Flash work in Firefox on Linux

I saw a few articles about this when I first had the problem of running Flash within my Firefox browser on Linux (Ubuntu). The first time I installed an opensource player that turnes out not to work great. In fact it could NOT run the video content found on news channels and video websites. One source in fact mentioned, that Adobe does not have a Linux Flash player.

In fact IT DOES and you can find the sources and the instructions on how to install it all at this website.

It worked for me first time with no hitches.

Tuesday, January 08, 2008

Trash icon missing from Ubuntu (Gnome)

There are 2 ways of correcting this apparently default problem with the desktop.

  1. Adding the Trash icon to the desktop

    • You can do it manually by adding ashortcut to the hidden .Trash folder hiding in your home folder. If you are in your home folder and want to make all the hidden files/directories visible, click CTRL+H.

    • The better way of doing this is through Nautilus, the file explorer. First call up the configuration editor interface (GConf editor) by opening Terminal and entering
      gconf-editor /apps/nautilus/desktop

      In the window on the right change the trash_icon_visible check value. You can also give it its own name. You can also add other icons to the desktop.
      Here is was it looks like on the desktop:

      By the way, I changed the name to a Slovene word for Trash: "Smeti".

  2. Adding the Trash icon to the Panel

    First, make sure the icon is not already there as it is not very visible but once you put your mouse pointer over it it reveals it purpose.




    So if it not there or you want to add it to a different panel do the following. Right-click the Panel you whish to add the icon to and select Add to panel. In the Desktop & Windows section select "Deleted items"

    Click the Add button on the bottom right. The Deleted items icon should appear immediately. Close the window you just worked with and that should be it.

Sunday, January 06, 2008

Problems with WPA access in Ubuntu

First of all I would like to stress that this instructions on this problem is not mine but because it was so good I decided to post it on my site in case the original would dissappear.

The problem I had that despite having setup Ubuntu 7.10 (a.k.a. Gutsy Gibbon)to access my wireless ADSL modem router Netgear DG834G the connection would go dead. System re-start did not help. I consider myself a Linux newbie so I will describe this as a begginner would.


About Linux and Ubuntu

First a little bit about Ubuntu. Ubuntu is one of the many Linux distributions like Red Hat, Debian, SuSe and many more. You will find many things made specific for each distribution so there commonly will not be a "linux" solution to your problem.
Then comes the desktop. That is the graphical environment you work in within a Linux distribution. One of the most popular are Gnome and KDE (K-desktop environment), but there are others available on the net. You will usually find desktop environment specific programs like web browsers, text editors and so on.

To complicate things even further there are different releases. I don't know about other distributions but Ubuntu has aliases for each release. The current release has the number 7.10, but its alias is Gutsy Gibbon. Here is a page concerning Ubuntu releases.

And now to complicate things even further there are different "variants" to each Ubuntu release:
  • Kubuntu (Ubuntu with KDE instead of Gnome)
  • Edubuntu (Ubuntu focused on education)
  • Xubuntu (Ubuntu with XFCE instead of Gnome)
  • Gobuntu (Ubuntu-base for other free software platforms)
So there, these are some of the basics. If you want to know more visit Ubuntu.com or Wikipedia. There are probably hundreds of sources to get the novice aquainted with using Linux.

And now to the problem of the wifi connection.

Open the Terminal (menu: Applications - Accessories - Terminal). This is similar to the MS-DOS program in Windows. You get a promps. The location the prompt will be will probably be /home/[username] so if your username is MPorter you will be at the location /home/mporter. Move the prompt to the root by entering "cd /" without the quotes, of course.

To update the source list run the following command, you must have access to the internet so cable your PC- up, meaning, connect it to the internet via a cable (USB modem or LAN cable to a router).

"sudo apt-get" then press enter, then type
"sudo apt-get install wpasupplicant" press enter, then type
"sudo apt-get install network-manager-gnome network-manager" press enter, then type
"sudo gedit /etc/network/interfaces" press enter.

This will open a simple Gnome text editor (like Notepad in Windows).

Comment out everything other than “lo” entries in that file and save the file.

Create a file called "/etc/default/wpasupplicant", add entry ENABLED=0 and save the file. You create the file in Gedit by clicking the New button, entering the text and then saving it. You save it by entering the full path with the filename: "/etc/default/wpasupplicant". Don't forget, the file does not have an extension so wpasupplicant is the file and the rest before it is the path "etc/default/".

Then go back into the Terminal and enter the following:
"sudo touch /etc/default/wpasupplicant" press enter, then reboot your system or use the following command in Terminal

"sudo /etc/init.d/dbus restart"

Once you login back in to your machine you need to left-click the network manager icon in Gnome and select your wireless network It should prompt for password, type, etc and It will ask you to choose a password for your new “keyring”.

So now you have to setup the Network Manager and you can access it by clicking the little ikon next to the clock (it should be on the upper right, unles you fiddled with the default Gnome panel). Select the network you want to connect with, choose the WPA encryption.

I really suggest using at least the WPA encryption as WEP has been cracked on many occasions (link #1, link #2, link #3).

If you get the following error: The NetworkManager applet could not find some required resources. It cannot continue." just enter the following line in the terminal:
"sudo gtk-update-icon-cache -f /usr/share/icons/hicolor/"

I, myself, did not get this error so I cannot say how useful it is for me.

The above example will be in case you want a dyniamically generate IP address through the DHCP system. If you want to configure static ip address in Ubuntu you need to follow this procedure:

In Terminal enter the following line "sudo /etc/network/interfaces".

Here is an example of the file. Once you edit the above file you need to enter the details in the following way

auto eth0
iface eth0 inet static
address 192.168.3.90
gateway 192.168.3.1
netmask 255.255.255.0
network 192.168.3.0

In the above details you can replace address as your ip address, gateway, netmask and network address and save your file.

Now you need to restart your networking services using the following command in Terminal

"sudo /etc/init.d/networking restart"

Just to be on the safe side, check your new IP address by using the following command in Terminal: "ifconfig". It does similar things like "ipconfig" in Windows CMD but the output is a bit different.

Laptop with Ubuntu Linux

As I had to replace the hard disk on my laptop (IBM Thinkpad T43 1871-4AG) with a new 80GB Hitachi I also decided to have (another) go at installing Linux. I have tried it before on an older PC I had and had quite a few problems with getting the drivers. Also the Linux environment is pretty daunting and quite demanding, esp for someone used to Windows. Then I think I tried it again in 2006 using the Parallels virtual desktop app on my Windows XP. There were many issues with installing and I kept on getting some error messages that might have something to do with the CD-rom burning process. I was successful with Red Hat and Ubuntu but it expectedly all worked quite slow.

This time I had a fresh hard disk on a not-so-old computer and tried to install the ever more popular Ubuntu distribution of Linux. The version I used was 7.10 (latest at the time). I burn the ISO image from ubuntu.com with the tools they specified (InfraRecorder). I do suggest you test the MD5SUM values as the first download had a problem and I didn't check it. The ISO image burnt nicely, but there was an error message during install.
I tried a different mirror (Canonical UK) and the MD5SUM check was fine. The program I used for that was winMd5Sum.
I wish I could give you some pointers on some install problems but I can't - that is because there weren't any. Really. The whole think installed without a hitch.
The only problem I had was with setting-up the internet connection. As I didn't have a spare UTP cable as it was being used on the PC I got from home, I tried to setup the wireless access first. Now I am not sure whether the driver was incorrect or it had to be set-up manually. I installed the WiFi driver from MadWiFi, then entered the IP address, subnet mask... manually and it worked.
After that the update service installed 150 updates and after that the network didn't work again and the new drivers went missing, or so I presume. This time I didn't bother installing the drivers again but just re-entered the network data. The little Thinkpad WiFi light came on and the internet was back and running.

For those who will have a try at this with the similar computer can find a somewhat usefull but very advanced (for my taste) website at http://foosel.org/linux/t43. As a novice I was surprised to see how little standard programs are made for Linux. The only luck I had was with Kaspersky antivirus, but even that seems to be mainly for servers and after installing it it doesn't seem to work. There are probably think I missed during installation but I will probably try out a native Linux antivirus ClamTK. As the Firewall I installed the Firestarter via the Applications - Add/Remove utility.

There was an added complication with the wireless setup and the WPA connection with my Netgear router kept on dropping. I found some good instructions on how to fix the problem and I am posing them in this post.

How to replace the hard disk on IBM Thinkpad T43 (1871-4AG)

I think this might work on all T43 Thinkpads but I do stress that this worked on mine (1871-4AG). Photo gallery.
  1. Shut down the laptop and disconnect from any power supply or docking station. You will need to manipulate the laptop quite a bit later on :-)

  2. Turn the laptop on its front and remove the battery by releasing the two locking mechanisms. The one on the left has to be pushed and then stays there, the one on the right has to be pushed and held there while you pull out the battery.






  3. Unscrew the fixing screw that secures the hard disk in place


  4. Lift the laptop's screen and rest it on the keyboard on a soft surface


  5. Gently pull out the hard disk


  6. Remove hard disk from the holder and re-attach the holder to the new disk


  7. Gently, but firmly insert the new hard disk in the HDD slot. At this point you might experiance a little resistance, like the whole think has stuck. Just gently manipulate it in. It should go in the end.

  8. Screw back the fixing screw and re-attach the battery.

  9. You should be ready to start-up the system.

That should be it.