Howto : Make your package updates faster in Ubuntu

Experiencing slow software updates from Ubuntu servers? Why don’t you try the nearest server to your location?

Although Ubuntu default installation already chooses the closest server to you, it is still a good idea to find a mirror located in your country to speed up software installation and updates.

The fastest way to do that is by using the Source-O-Matic tool fromUbuntu-NL website. The service is provided free-of-charge for the benefit of Ubuntu users around the world.

Beside the ‘official’ Ubuntu repository (main, universe, multiverse), Source-O-Matic also lists several popular ‘unofficial’ software repositories for you to put in your /etc/apt/sources.lst file.

Be aware that the ‘unofficial’ repositories isn’t regularly updated with the latest security patch and might break your operating system.

After you’ve done ticking the checkbox, you will be presented with a plaintext display of source.lst file content like this :

# Automatically generated sources.list
# http://www.ubuntu-nl.org/source-o-matic/
#
# If you get GPG errors with this sources.list, locate the GPG key in this file
# and run these commands (where KEY is replaced with that key)
#
# gpg --keyserver hkp://subkeys.pgp.net --recv-keys KEY
# gpg --export --armor KEY | sudo apt-key add -

# Ubuntu supported packages
# GPG key: 437D05B5
deb http://tw.archive.ubuntu.com/ubuntu edgy main restricted 
deb http://tw.archive.ubuntu.com/ubuntu edgy-updates main restricted
deb http://security.ubuntu.com/ubuntu edgy-security main restricted

# Ubuntu community supported packages
# GPG key: 437D05B5
deb http://tw.archive.ubuntu.com/ubuntu edgy universe multiverse 
deb http://tw.archive.ubuntu.com/ubuntu edgy-updates universe multiverse
deb http://security.ubuntu.com/ubuntu edgy-security universe multiverse

All you need to do is save the page and overwrite your current /etc/apt/sources.lst file with the one generated with this tool.

A word of warning
My initial checking reveals that not all servers listed in Ubuntu-NL is hosted in the same country as indicated in the list.

For example, a ‘dig’ to my.archive.ubuntu.com reveals this ip, 91.189.89.8 which is clearly is not a Malaysian ip address (a dig to us.archive.ubuntu.com also reveals the exact ip address).

So its better to double check the location of ip addresses produced by the mirror domain to confirms that the mirror is indeed located near your location before you start using it.

You can confirm this by visiting ShowIP fakap or HostIP services.

[tags]ubuntu, dapper,feisty fawn, breezy, apt-get,sources.lst[/tags]

Install Mozilla Firefox Ubuntu theme

Did you know Ubuntu provides Mozilla Firefox theme to make it look better integrated with default Ubuntu themes (Human, Tango, Industrial).

In order to take advantage of the integration, you need to install firefox-themes-ubuntu package.

sudo aptitude install firefox-themes-ubuntu

After you are done, you can start customising Firefox theme to make it look better integrated with the corresponding Ubuntu themes that you use, whether its Human, Tango or Industrial theme.

I know first hand that some people do not prefer the default brownish Human theme, and prefered Industrial theme instead.

So why not install these Firefox theme to get rid all those traces of brownish look on your desktop?

[tags]ubuntu,firefox,mozilla,themes,debian,linux[/tags]

Generate Ubuntu apt-get Source.lst automatically

Sources.lst is a file located in /etc/apt/ directory. It is used in Debian-based (which includes Ubuntu) Linux operating system as a configuration file for software management.

Sometimes it is necessary to alter your sources.lst to include the nearest apt-get mirrors from your location, this is to ensure faster downloads during software upgrades and installations.

Fortunately, the good people from Ubuntu-NL has made this task easier by creating an online tool (source-o-matic) which helps you generate sources.lst file based on the list of available mirrors

source-o-matic supports Ubuntu releases on all architectures from 4.10(Warty) to 7.04 (Feisty). It is an easy tool to use, you only need to choose which country you’re in, put on your Ubuntu release and architecture, tick few radio boxes and your sources.lst file will be generated automatically.


Source-o-matic
also includes a list of unofficial apt-get mirrors for installing softwares that isnt included in the normal Ubuntu distributions.

[tags]ubuntu, linux, sources.lst,apt-get[/tags]

ClamAV – Linux Anti Virus Solution

ClamAV is a GNU/GPL Antivirus application made for Unix-like operating system. It is primarily use to detect viruses and remove infected files from email attachements.

The default installation of ClamAV also includes a command line scanner to files for possible virus infection. The scanner has built in support to scan files inside :

  • Common Archives (zip,rar,tar,gzip,bzip2,arj)
  • Windows Compressed files (CHM,CAB,OLE2)
  • Mail format (mbox, uuencode, base64)
  • Common document files (html,pdf,rtf,sxw,odt)

Linux is safe and Secure, Why do you need anti virus on Linux ?
Although viruses in Unix-like operating system is uncommon, ClamAV is still handy if you want to weed out those viruses from spreading through your mail system and using your computer server as a vector.

Using ClamAV
Using ClamAV is easy, to scan for viruses you only need to use the ‘clamscan’ command

$ clamscan

/home/mypapit/mypapit.js: OK
/home/mypapit/ubuntu_service.png: OK
/home/mypapit/style.css: OK
/home/mypapit/repo1.png: OK
/home/mypapit/bg_button2.jpg: OK
/home/mypapit/repo1tn.png: OK
/home/mypapit/ChiSquareDistribution.zip: OK
/home/mypapit/javapackage.png: OK
/home/mypapit/jdk14.png: OK

The scanner will detect any known viruses and alert you and a summary will be displayed at the end of the command.

add ‘–remove’ switch to remove the files that has been detected by virus.

$ clamscan --remove

Note that ClamAV has a policy of ‘sanitizing’ any files infected by viruses, that means it will delete the files permanently (it has no ‘heal’ or ‘repair’ option).

Updating Virus Database
Keeping up to date with ClamAV is easy, you just need to run freshclam to download the latest virus database from ClamAV servers.

$ sudo freshclam

The official website for ClamAV is on http://clamav.net, hopefully with this post, you can explore more option about fighting viruses on Linux based operating system.

[tags]clamav,linux,debian,ubuntu,anti-virus,antivirus[/tags]

LBRC – Control Linux PC with Bluetooth Device

I’ve got this link (LBRC) from TuxMobil. LBRC is a set of application which enables a Linux computer to be controlled from a mobile device using Bluetooth technology.

LBRC consists of two part, client and server. The server part uses dbus and python and the client part uses JavaME application on JSR-82 (Bluetooth) capable mobile devices.

My Thoughts about it ?
bluetooth-logo.jpg
I’ve a bluetooth receiver I bought for RM15 from lelong.com.my, I’ve a bluetooth capable phone, I can cook out a mobile phone application that can utilize bluetooth transceiver either in JavaME or Python.

A tempting thought, may be i’ll try out this stunt once I’ve *much* more time

[tags]phone,linux,j2me,bluetooth,j2me,dbus,javame,pys60,python[/tags]