Joseph Zikusooka ~ Zik

A software engineer specializing in open source technologies | Very experienced in building and configuring UNIX/Linux systems and servers. Passionate about developing software applications and hardware for the smart home | Currently serving as the CEO of Jambula Labs and the project leader at JambulaTV, a smart home automation and entertainment platform - https://jambulatv.com | This blog focuses on the following areas: Linux How-Tos and Tutorials ::: IT Security News ::: Free and Libre Open Source Software ::: Smart Home Software ::: Digital Innovations in East Africa https://mastodon.social/@jzik | https://github.com/zikusooka

Year: 2012

Setup an instant messaging server for your office

Email is a great tool for communication and that is why even in the age of social networks, it persists. However, if you work in an office environment that requires constant and real-time communication between users, email may not cut it. Sometimes you just want to send a quick message without clogging your users Inboxes. What you need is an instant messaging system.

There are quite a number of open source based IM messaging servers; however, I like and have used jabberd over the years. Jabberd2 is an open source implementation of the jabber/XMPP protocol used by popular IM clients.

Installation of jabberd2 on Linux is fairly easy, although you need to know your way around the command line interface and how to edit configuration files.

To start with, install jabberd2. On Fedora/CentOs/RedHat systems:

yum install jabberd

After installation, you will find all configuration files located under /etc/jabberd

You will need to edit the files sm.xml s2s.xml c2s.xml, router.xml; and templates/roster.xml to suit your environment. Then setup your user accounts in your preferred driver backend. Detailed configuration instructions can be found here.

Now all you need to do is install an IM client on your users PCs. There are several of these for all platforms. On Linux; favorites include pidgin and empathy

One cool thing with jabberd2, is that it is very extensible and you can add chat rooms functionality; a sort of ‘circles’ – old school style

Git – The open source developer’s favorite version control system

Today, my brother sent me a link to Clay Sirky’s talk on the political ramifications of ‘cooperation without coordination’ on communities – How the internet will one day transform government. Knowing how much an advocate for open source software I am, he couldn’t have picked a good time. I’ve been thinking of recommending an open source tool called git on this blog.
OK, I won’t comment on the politics here, but I encourage you to listen to this talk, even if you’re not a software developer.

Interestingly, Clay Sirky mentions the power of collaborative software development using git, which enables one developer in Edinburgh to collaborate with another developer in Entebbe (Uganda) without them knowing each other.

So what is git? Git is an open source based distributed version control system, that allows software developers to collaborate and share code. Unlike traditional systems that require a central server, with git, anyone can clone a repository and make changes locally, that can be pushed upstream. Git was created by the man who invented Linux i.e. Linus Torvalds, so you know it embodies the open source spirit!

I recently migrated all my software development projects to using git, I am really loving it as it makes keeping track of the projects a lot easier than before.
I won’t delve into how to use git here, but a good How-To can be found at:
Getting Started with Git

If you are an open source developer and you’ve not yet started using git, you are really missing out.

Try it and you’ll not look back.

Open Source and Digital TV Migration Updates in East Africa

Some interesting news stories in our neck of the woods that caught my attention recently:

Kenya is considering moving away from proprietary to open source software solutions for government bodies. As the article suggests, this move is not only a cost saving measure, but opens up opportunities for local software developers. I think other economies should follow this example. Read more

Also in Kenya, the migration to digital TV is moving rapidly, as the authorities increase incentives of importing digital TV ready equipment. Vendors are now able to import either over-the-air channels only set top boxes (STB) or premium channel STBs. This move means the prices of digital TV equipment will go down. Read more

Locally in Uganda, there’s still a whole lot of talk on digital TV migration, as providers still fight over who will distribute the signals. It looks likely that the initial switch date of December 2012, will be missed. A ban on TVs that do not have a DVB-T2 chipset is being implemented starting next year. Read more

How to create an encrypted USB drive in Linux using the command line

Recently, I was tasked to write a backup program for a small office. A key requirement was that the portable backup drive they are using needed to be encrypted since it would have to be ferried off site on a daily basis. The idea was that, if the drive fell in the ‘wrong hands’ during transportation, the client’s data would be secure. With encryption, I was able to meet this need.
I thought I would break the silence with a how-to on encryption using the Linux command line interface – not exciting but quite necessary these days.

Encrypting data in Linux is very simple, and I would highly recommend it for such things as USB flash and portable hard disks. Most Linux distributions come with an encryption tool called cryptsetup.
If you do not have it , install it using yum or apt-get depending on your package manager. For Red hat based distros, use

# yum install cryptsetup

As always, you need to backup your data before you proceed. I will assume you have already created a new partition on your device e.g. /dev/sdX1. If you need to partition, refer to the venerable ‘fdisk’ utility

Create the encrypted volume

# cryptsetup -v -y luksFormat /dev/sdX1
Confirm that you want to proceed by typing “YES”
Enter your passphrase when prompted. You will be asked to verify it
Once you have created the encrypted volume, you can proceed to format it

# cryptsetup luksOpen /dev/sdX1 mydata
# mkfs.ext3 /dev/mapper/mydata

Here you can choose other file formats such as FAT32, EXT4 etc

Create a mount point

# mkdir /mnt/mydata

Mount the new volume

# mount /dev/mapper/mydata /mnt/mydata
You can then write your data to the mounted and encrypted volume at /mnt/mydata

To close the volume

# umount /dev/mapper/mydata
# cryptsetup luksClose mydata

Note: if you are using a desktop such as GNOME, you will be prompted for a passphrase every time you insert the disk, so you do not have to mount the disk manually, but then again, we are talking about the command line here!

That’s it for now

Uganda’s transition to Digital TV. Where are we now? (II)

As reported in one of the local dailies, the Uganda Communications Commission (UCC) has directed TV broadcasters to plan for digital TV using DVBT-2 capable equipment. DVBT-2 is the second generation of of Digital Video Broadcasting and ensures spectrum usage efficiency of up to 50% while providing for better quality HDTV. Uganda joins countries such as South Africa and the UK that have joined this standard. Read more at Daily Monitor

Considering that Uganda is already way behind in meeting the December 2012 migration date, I think this is a good move. The UCC directive may not be warmly welcomed by the existing providers who are using the older DVB-T standard, but I believe, this will open up the market to cheaper alternatives.

Throughout this process, I have been bothered, by the perception among our people that getting digital TV means signing up with one of the pay TV providers like DSTV, Star, Go or Zuku TV. May be the UCC needs to better inform Ugandans that the switch, will only cost one a conversion box or Zero if you already own a TV with a digital TV built-in tuner! By the way, those boxes, now that DVB-T2 is the preferred standard should be cheaper and even affordable when subsidized.

What do you think?

Mobile SMS gateway server using Linux

Like many parts of Africa, SMS messages in Uganda continue to play a big role in the way people communicate. For the majority, the mobile phone is the first tech device and as such the use of SMS messages to send information in bulk and real time makes it ideal in fields such as health. As a Linux administrator, this is something you can do at little or no cost.

I thought, I would share these GSM SMS/WAP gateways available for Linux

1.Kannel: By far the most widely used open source software. It can be used to serve the established user base with SMS capable handsets as well as the early adopters with their WAP terminals. Learn more at:
Kannel
2.SMS Server Tools: SmsTools
3.PointSMS: an easy-to-use program that enables you build your own SMS gateway. Learn more at PontSMS

Setting up an SMS gateway using Linux is fairly easy, and if you use kannel for example, you will be able to send and receive bulk SMS messages in no time. I have tested Kannel with our local mobile operators like Uganda Telecom, and it works pretty well using your typical 3G modem dongles, like Huawei E220, and E173s.

If you are interested in instructions on how to install and configure the server… drop me a comment.

UTL 3G – A painful experience

I’ve recently been testing 3G-based Internet access provided by Uganda Telecom. The test locations were in the Northern suburbs of Kampala. My experience with this connection type was not a good one. Here is why.

Depending on your location, the 3G signal is very weak. Typical strengths range anywhere form 0 to 19%.
The 3G signal seems to degrade through out the day and by 1 pm, the signal goes off. I was able to get the assistance of an engineer, when ever that was the case, however, after 7pm the connection would fail completely.

The Internet connection when successful is painfully slow. So much slow that it feels like your are using a GPRS/2G connection.

I’ve been told that this service by UTL will improve in the future, but for now, I would discourage anyone who wants to use a mobile 3G connection from this ISP.

While the UTL service is unlimited per month and at a competitive rate of 80,000/= (Uganda shillings), it is not worth the trouble.

Save your self the trouble and look at alternatives like Orange Uganda. Next I will see how the service from Orange and the other providers is like.

If yoou have any experience with UTL, and other ISPs, please share your experience in the comments below.

Remind: A Cool CLI based UNIX program

I have started a category on this blog featuring cool open source programs. These are mainly command line based, since that is where I spend most of my time. I will also pick those programs that have real life and practical applications.

Remind: As its name suggests is a reminder application. I use it to remind me of birthdays, anniversaries, holidays, etc

To install it: Use your favorites package manager such as apt or yum:
Using Yum: yum -v install yum
Typical Usage: remind [options] [filename]
e.g. remind ../mybirthdays
Typical contents of the file: mybirthdays:
REM 1 Feb MSG Peter’s birthday

This tells the app to remind you that it is Peter’s Birthday on Feb 1.
You can now script this command and do all sorts of cool things, like sending an email or SMS to your phone, when there’s a reminder.

For Help: Type ‘man remind’ to get a detailed how to

Scroll to top