How to make Ubuntu/Debian .deb packages from source tar.gz

This is my abbrevitated version of : Hands On

Step 1: Make the source files

Un-tar your source files. This should result in a directory ./the_app

cd into the_app directory: cd the_app

Make the application according to the instructions in the README file, usually just means running the make command in the the_app directory: ./make

Step 2: Prepare the “control” file

Then create a directory DEBIAN: mkdir DEBIAN

cd into DEBIAN: cd DEBIAN

Create a file called “control” based on the following example:

Package: your_package_name_without_ext

Version: 1.0

Section: base

Priority: optional

Architecture: all

Depends: prog1 (>= 2.05a-11), prog2 (>= 2.0-12), prog3, prog4 (>= 1:2.0.7-8), prog5 (>= 3.02-8), prog6 (>= 2.4.2-3), prog7 (>= 5.0-5)

Maintainer: Yusuf

Description: A little sumthing sumthing on your program

Step 3: Put all the files in their places

Now you’ve got to create a directory structure with the files needed as they will be installed on your system.

So if you need the bin files in your /usr/local/bin directory then copy the bin files into the_app/usr/local/bin : cp usr/local/bin

Step 4: Create the Package

Decend into the directory containing the_app and run: dpkg-deb –build the_app

Thats it! You should now have a the_app.deb package

Extract a gzip compressed tar archive in Linux

To extract the archive filename.tar.gz into the current directory:

tar xzf filename.tar.gz

If this fails, the version of tar may not support gzip compression. In this case, you can use the traditional two-stage command:

gzip -dc filename.tar.gz | tar xf –

APT syncing a home machine

Thanks to Hellkom, its not worth it for me (or any South African for that matter) to get an ADSL line at home. I won’t even mention dialup (ok I have, but I regret it). So this creates difficulties. One of them is the fact that it is a pain to keep my home maching up to date with the latest ubuntu packages.

I sought advice and I found it (courtesy Thomas Fogwill):

There are at least 3 other ways to do what you want:
1) Repository on notebook
2) Manually generate fetch lists
3) Use automated tools

(1) Repository on notebook (I do this)
I keep my downloaded packages on my notebook
(in /var/cache/apt/archives/). Things I want to install at home, but not
on my notebook, are downloaded with apt-get -d install …
I have a www directory linked to /var/cache/apt/archives/,
and generate a Packages.gz file here like this:
apt-ftparchive packages . | gzip -c > Packages.gz

Then, I add this www directory to my wife’s sources.list (at home). If
any packages are ever missing from this dir, I rebuild them with

The following is a useful little script to rebuild ALL installed
dpkg –get-selections | grep [^De]install | cut -f1 | sh -c “while read STRIN; do dpkg-repack $STRIN ;done”

Note: dpkg-repack uses the files on the filesystem to rebuild the
package. Thus, any config/customisation you’ve done will be included in
the deb.

2) Manually generate fetch lists
This should also work (untested). Apt stores its downloaded package
files here: /var/lib/apt/lists/
You should be able to copy your updated files over from your notebook,
then do an apt-get –print-uris install|upgrade|dist-upgrade on the home
machine. This will print out the uri’s of the files that need to be
downloaded. You then take these uri’s, download them (at work) with
wget, copy them to the home machine and dpkg -i *.deb to install them.

This will dump the apt-get output into a file that wget can use to
download in batch mode:
apt-get –print-uris -y install … | grep http | cut -f1 -d’ ‘ | cut -f2 -d’ > debs.toget
To batch fetch the debs:
wget -i debs.toget

This should work fairly well, except when packages on the mirror change overnight.

3) Use automated tools
e.g. apt-zip. apt-zip basically automates (2) above.

Ubuntu – Linux for Human Beings

My 1st experience with a pc was with a ZX Spectrum way back in 1990’ish. I later progressed to a Commodore 128 and then finally in 1992 I mananged to get my paws on on my dads 286, which he intended to use for bussiness. DOS was a dream, it was complex enough (at the time) to keep me challenged for hours on end, especially when I had recover (on more than one occasion) from the odd virus, DIR II, Michaelangelo, Stoned, the good old days. When I discovered Windows in 1995, it really was not my forte, it hid the complexity of the pc too much and made things too easy. But, I had to stick with the times and the Games, which soon required Windows and Windows soon lost DOS.

To cut a long story short, for now, until I get to update this, I discovered Ubuntu Linux, much better than my previous encounters with Linux (Mandrake, Red-Hat), works like a charm and its FREE! Check out: Ubuntu – Linux for Human Beings

George Dubya vs Einstein

RmEinstein was a genius….

“He who joyfully marches to music in rank and file has already earned my contempt. He has been given a large brain by mistake, since for him the spinal cord would fully suffice. This disgrace to civilization should be done away with at once. Heroism at command, senseless brutality, deplorable love-of-country stance, how violently I hate all this, how despiceable an ignoreable war is; I would rather be torn to shreds than be a part of so base an action! It is my conviction that killing under the cloak of war is nothing but an act of murder.” — Albert Einstein

“You cannot simultaneously prevent and prepare for war.” –Albert Einstein (1879-1955)

Dubya is not….

“The reason we start a war is to fight a war, win a war, thereby causing no more war!”
–The first Presidential debate

“The war on terror involves Saddam Hussein because of the nature of Saddam Hussein, the history of Saddam Hussein, and his willingness to terrorize himself.”-Grand Rapids, Mich., Jan. 29, 2003

Online entry form for the Young Science Writer’s Competition

Yep, I considered entering the competition Online entry form for the Young Science Writer’s Competition ,couldnt decide on a topic so I though I’d explain EVERYTHING, that is Life the Universe and everything..

Heres my 1st paragraph:

Its the question that we’ve all asked ourselves at some point, what is Life? But how many have started answering the question by first asking, what is a point? A point is a position in time and an instance in time, two of the three defining axis of our Universe. Energy, the third axis is what everything is made of. You, your peanut butter sandwich and the 3rd left udder of a mountain goat on Table Mountain are energy in its slowest form, matter. On the other hand, Egoli on its way to your TV, the orange warmth of sunrise on its way from the sun and the flux that heats your microwave noodles are energy in its fastest form, electro-magnetic waves.

Cellphone Tricks and codes

· How to copy & paste text in your Nokia 3650:
Press and hold the pencil key and select your text using the scroll key.
Left function key will change to 'Copy'. Press it to copy the selected text to clipboard.
You can paste the clipboard contents the same way:
press and hold the pencil key and press 'Paste'. Or, press pencil key once and select 'Paste'.
· Press and hold the Menu key to open the application switching window, where you can *duh* switch between applications.
If a program hangs and you can't shut it down, select the application in the
application switching window and press 'C' to kill it. It's also a faster way to exit programs.
· Turn on/off the "click" sound made by the camera by selecting the 'Silent' profile or by turning warning tones on/off:
Menu > Profiles > "select your activated profile" > Personalise > Warning tones > On/Off.
(This also effects the sound of Java games and apps).
· To change background image go to:
Menu > Tools > Settings > Phone > Standby mode > Background image > Yes > "choose an image".
The best size for background images is 174×132 pixels.
· Only got blue, green and purple in your 3650 colour palette?
This free app adds 3 more colours: Palette Extender.
· Display an image when someone's calling:
Menu > Contacts > "select a contact card" > Options > Edit > Options > Add thumbnail > "choose an image".
· Add a personal ringing tone to a contact:
Menu > Contacts > "select a contact card" > Options > Open > Options > Ringing tone > "choose a ringing tone".
· Delete all messages from your Inbox at once:
Menu > Messaging > Inbox > Options > Mark/Unmark > Mark all > Options > Delete.
· Send or hide your caller ID: Go to: Menu > Tools > Settings > Call > Send My
Caller ID > 'Yes', 'No' or 'Set By Network' to follow the default settings of your home network.
· If you often copy large files to your MultiMedia Card, I recommend a card reader.
E.g. With a card reader it takes only 12 seconds to copy a 10 MB file!
· Record the sound of a phone call using the (sound) Recorder.
Menu > Extra's > Recorder > Options > Record sound clip.
Note: short beeps are audible during call registration.
But there is a 60 second limitation so if you want unlimited sound recording get this app: Extended Recorder.
· While writing text, press "#" to switch between upper and lower case and Dictonary on/off (predictive text input).
Press and hold "#" to switch between Alpha mode and Number mode.
· Keyboard shortcuts for zooming and rotating images in Images:
1 = zoom in, 0 = zoom out, press and hold to return to the normal view.
2 = rotate anticlockwise, 9 = rotate clockwise, * = full screen.
· In standby mode, press and hold the right soft key to activate voice dialling.
To add a voice tag to a phone number, open a contact card and scroll to the phone number and select:
Options > Add voice tag.
· You can customize both soft keys located below the screen (in standby mode):
Menu > Tools > Settings > Phone > Standby mode > Left/Right selection key > "select an application".
· In standby mode. press scroll key center (joystick) to go directly to Contacts.
· In standby mode, press and hold 0 to launch your wap home page.
· In Menu or any subfolder, press numbers 1 – 9 to start the application at that location.
· In standby mode,
45# + dials the number on your sim in memory slot 45.
50# + dials slot 50 and so on.
· If you have your keylock activated just press the on/off button to turn on your backlight
to look at the time when it's dark without having to unlock the keypad.
· Never, ever, in your whole life, install WildSkinz on your Nokia 3650!!! WildSkinz screws up
the whole 3650 system. It was never intended to work on the 3650, only on the 7650.
· Why assigning Video Recorder in the right or left soft key does not work?
(Sound Recorder is launched instead of Video Recorder)
It's a bug with firmware version 2.50.
· How to check your firmware version:
A "Firmware" is the phone's operating system stored in internal Flash memory of the device (disk Z.
Manufacturers release new firmware versions containing bug fixes, improvements and – sometimes – offering new functions.
Firmware upgrade can only be made in authorized Nokia service centre (point).
To check your current firmware version simply type *#0000# on main Phone screen.
· How to check your IMEI (International Mobile Equipment Identity)?
Type *#06# on main Phone screen.
· Start up in Safe Mode so no 'auto start' apps will be running:
To make sure that no memory-resident programs start when you reboot your phone,
hold down the pencil key when you turn on the phone and hold it on untill you have to enter your PIN code.
(When you have trouble booting up the phone with the MMC in it because it got corrupted for some reason, this trick will
almost always let you boot up the phone so you can remove the latest installed app which might have caused the
problem or if your phone is "unrepairable" you can still back up your important data before you do a format.)
· Q: How to totally format your Nokia 3650 and remove all installed applications, user files and restore all
settings to default like it's new out of the box? (OEM apps won't be deleted like Camera and RealOne Player).
A: First Format your MMC: Menu > Extras > Memory > Options > Format mem. card > Yes.
Note: It is very important to format your MMC before you format your phone!
Then format your phone by typing *#7370# on main Phone screen.
Phone will ask: "Restore all original phone settings? Phone will restart." Press 'Yes' and enter your Lock code (default is 12345).
Tip: Formatting takes several minutes so you'd better connect your Nokia 3650
to a charger to ensure that your battery doesn't get empty in the middle of formatting.
Note: All your created acces points and mailboxes will be lost so take a note of them. And all application settings will be reset.
E.g. In Camera, image quality is set back to normal and memory in use is set back to phone memory. And also in Messages,
memory in use is set back to phone memory, etc. Also backup your contacts with PC Suite or a program like Contacts Manage
To reset your wallet, should you forget your code,
Type in:
this will reset the wallet code, the wallet contents will be deleted.
>>> Method 1: Flight mode:
Put your phone in "Flight mode" with Psiloc System Tools. Install System Tools, open it and select "Flight mode". This way you can restart the phone without your SIM card so there will be no running phone tasks in the background. Now you can have up to 3,5 MB of free RAM!
Note: ironically enough, Flight mode doesn't work when Smart Launcher is installed, at least in my case.
But i've also heard several reports of people who have both apps running without any problems.
>>> Method 2: Smart Launcher trick:
Install Smart Launcher and open it. Go to Options, Settings and put Launcher ON.
Now plug in your charger and switch off your phone. Wait untill the battery meter appears and short press the Menu button (don't hold).
The menu should appear and now you can have 3,5 to 4,5 MB free RAM! (Hold Menu button to check RAM).
The trick is that with the charger plugged in, the phone must get a minimum software support for charging, even when
the phone is switched off. And somehow Smart Launcher has still got it's shortcut running and that's the Menu button. So when
you press the Menu button, you go directly to the Menu without any other phone tasks running in the background so
you trick the phone and you have more free RAM!
Note: when you unplug the charger, the phone will switch off.
From me: this method I found it by myself, it frees a little about 100~200 KB but I guess it's useful sometime
Close your menu not by selecting the right selection key "exit", or pressing the menu key another time, they only hide the menu app but do not close it, to close it select the left selection key "option" and scroll down and select "exit"
So when you open an app needs more ram reopen menu and close it, it's useful when play low bit rate video in realplayer

Webservices on a J2ME mobile device

My latest experimenting with J2ME has led me to webservices. I’ve
managed to communicate with several online webservice providers
including and . I
managed to do this using the small footprint SOAP package kSOAP or .Here is a copy of
the template java midlet that I use to communicate to web-services


import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.ImageItem;
import javax.microedition.lcdui.StringItem;
import javax.microedition.lcdui.TextBox;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import org.ksoap.SoapObject;
import org.ksoap.transport.HttpTransport;

* @author Yusuf
public class Template extends MIDlet implements CommandListener {
private Display display;

private String url = “”;

private String nameSpace = “”;

private String name = “”;

private String key = “”;

private Command sendCommand;

private Command exitCommand;

private Command backCommand;

private StringItem stringItem;

private Form form1;

private TextField textField1, textField2;

private String choice;

private ImageItem background;

public Template() {
display = Display.getDisplay(this);
stringItem = new StringItem(“”, “”);
textField1 = new TextField(“Input 1:”, choice, 30,
textField2 = new TextField(“Input 2:”, choice, 30,
exitCommand = new Command(“Exit”, Command.EXIT, 1);
sendCommand = new Command(“Invoke”, Command.SCREEN, 1);
backCommand = new Command(“Back”, Command.BACK, 1);
background = new ImageItem(“”, null,
ImageItem.LAYOUT_CENTER, “no pic”);

// TODO Auto-generated constructor stub

* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
protected void startApp() throws MIDletStateChangeException {
form1 = new Form(“Webservices”);
try {
url = getAppProperty(“URL”);
nameSpace = getAppProperty(“NAMESPACE”);
name = getAppProperty(“NAME”);
key = getAppProperty(“KEY”);

// TODO Auto-generated method stub

} catch (Exception e) {
// TODO Auto-generated catch block


* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
protected void pauseApp() {
// TODO Auto-generated method stub


* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
protected void destroyApp(boolean arg0) throws
MIDletStateChangeException {
// TODO Auto-generated method stub


public void doInvoke(String in1, String in2) throws Exception {
StringBuffer stringBuffer = new StringBuffer();
TextBox textBox = null;
SoapObject client = new SoapObject(nameSpace, name);
//client.addProperty(“LKEY”, “0”);
//client.addProperty(“FromName”, “Yusuf”);
[email protected]”);
//client.addProperty(“Message”, “Watse”);
//client.addProperty(“CityName”, “Pretoria”);
//client.addProperty(“CountryName”, “South Africa”);
//client.addProperty(“myString”, “hello”);
client.addProperty(“FromCurrency”, in1);
client.addProperty(“ToCurrency”, in2);
HttpTransport ht = new HttpTransport(url, nameSpace);
try {

} catch (IOException e) {
// TODO Auto-generated catch block


* (non-Javadoc)
* @see
* javax.microedition.lcdui.Displayable)
public void commandAction(Command command, Displayable arg1) {
if (command == sendCommand) {

Thread t = new Thread() {
String input1 = textField1.getString();

String input2 = textField2.getString();

public void run() {
try {
} catch (Exception e) {

} else if (command == backCommand) {



else if (command == exitCommand) {
try {
} catch (Exception e) {




This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.