Installation

 

As LINKZ relies on Python, Sqlite and Anygui, there is quite a bit of work involved in setting up your Zaurus to run LINKZ. This document describes what is involved, together with links to where you can obtain the files.

 

I have LINKZ running on a SL-5500 with Sharp ROM 2.35. If you are using a different ROM you may need to vary this installation process. I am using a CF card for many of these files. If you are using RAM or a SD card the directories will be different.

 

Please do not proceed if you are not comfortable working at the Zaurus command line, or if you do not have a full backup of your Zaurus.

 

You need Python.

 

This is the programming language used by LINKZ. I am using Python version 2.2 that I downloaded from Riverbank Computing. If you already have version 2.2 installed, then this is fine. If not, the site now has version 2.3. If you do not have Python installed, then download both 'python_2.3-1.1_arm.ipk' from here, as well as 'pyqt_3.8-1.0_arm.ipk' from here.

 

I copied these to a temporary directory on my CF card called 'files', and installed them as follows:

      cd /mnt/cf/files

      ipkg -d /mnt/cf install python_2.3-1.1_arm.ipk

      ipkg -d /mnt/cf install pyqt_3.8-1.0_arm.ipk

 

Amongst the directories created will be '/mnt/cf/usr/lib/python2.3'.

 

I discovered that if you try to use Python 2.3 with LINKZ, then another file is required, and one file needs to be replaced. If you have Python 2.2, then you do not need to do these two bits:

- get the file 'new.py' from here and copy it into the directory '/mnt/cf/usr/lib/python3.3/site-packages'.

 

- replace the file '/mnt/cf/usr/lib/python2.3/lib-dynload/time.so' with the version from here. This is the version of 'time.so' that came with version 2.2 of Python. If this is not changed, the date manipulation in LINKZ does not work correctly. It is probably something I am doing wrong, but I have not had time to work it out.

 

You need Sqlite

 

This is the database used by LINKZ. Download the files described as ‘sqlite-zaurus’ and ‘pysqlite-zaurus’ from here. This will download ‘sqlite_2.7.1_arm.ipk’ and ‘pysqlite_0.3.0_arm.ipk’. I had troubles when I tried to run sqlite after loading to my CF card, so install it to main RAM using either the ‘Add/Remove’ software option on the Setup tab, or from the command line:

      ipkg install sqlite_2.7.1_arm.ipk.

 

The python sqlite package installed OK to the CF card using:

      ipkg –d /mnt/cf install pysqlite_0.3.0_arm.ipk

however it put its files under a directory called ‘python’ not the existing ‘python2.3’ directory. I moved them as follows:

      cd /mnt/cf/usr/lib/python/site-packages

      mv * /mnt/cf/usr/lib/python2.3/site-packages

 

The site www.sqlite.org contains a wealth of information about Sqlite, including how you can use sqlite from the command line. When LINKZ is not running, you can access the LINKZ database directly.

 

You need Anygui

 

This is the graphical user interface used by LINKZ. The site www.anygui.org gives full details about this python application, and you can download ‘anygui-0.1.1.tar.gz’ from here. This is a bit different to install as it is not packaged for the Zaurus. I placed this file in my temporary directory, ‘/mnt/cf/files’ and did the following:

      gunzip anygui-0.1.1.tar.gz

This converts the file to ‘anygui-0.1.1.tar’. Then unpack it using:

      tar xvf anygui-0.1.1.tar

This creates a whole lot of files. We only need some. Do this:

      cd anygui-0.1.1/lib

      mv anygui /mnt/cf/usr/lib/python2.3/site-packages

 

Anygui knows about Qt but it does not know about Qt/Embedded that is used on the Zaurus. In order to make it work for the Zaurus (eg. keep the application open with a taskbar icon; use the four-arrow and centre buttons better) I modified one of the anygui files. You need to replace the file ‘/mnt/cf/usr/lib/python2.3/site-packages/anygui/backends/qtgui/py’ with the version from here.

 

You need LINKZ

 

Your Zaurus should now have all the files and applications needed by LINKZ. You now need LINKZ itself. There are two Python files, one called ‘linkz.py’ which is the LINKZ application itself, and another called ‘linkzsu.py’ which is used to setup and customise the LINKZ application. You can get these file from here and here. In addition, you need the initial sqlite database for LINKZ to use. This is called ‘linkz.db’ and you can get it here.

 

I placed these three files in a new directory ‘/mnt/cf/linkz’. The files need to be executable:

      cd /mnt/cf/linkz

      chmod +x *

 

You can now run LINKZ directly from the command line as follows:

      cd /mnt/cf/linkz

      ./linkz.py

 

Be aware that LINKZ will take almost a minute to start up. This is a long time, but please wait! Once LINKZ is running, the response is immediate. The slow start-up time is due to it being written in Python. I always have LINKZ running so the start-up time is not an issue.

 

Adding LINKZ to the Zaurus desktop

 

To get LINKZ to work from an icon in the Applications tab, you will also need to do the following (first stop LINKZ if it is already running by clicking on the ‘x’ button in the top right hand corner):

      cd /home/QtPalmtop/apps/Applications

Create a file called ‘linkz.desktop’ containing the following:

      [Desktop Entry]

Comment=The LINKZ application.

Exec=linkz

Icon=info

Type=Application

Name=LINKZ

Note that the icon line can refer to any ‘.png’ file in the directory ‘/home/QtPalmtop/pics’.

 

Now create a link from where the application is actually loaded:

      cd /mnt/cf/linkz

      ln –s /mnt/cf/linkz/linkz.py  /home/QtPalmtop/bin/linkz

 

You then need to restart Qtopia. Go to the ‘Setup’ tab and select the ‘Shutdown’ option, then select the ‘Restart Qtopia’ button. When Qtopia restarts you should have an icon on the desktop for the LINKZ application.

 

For some reason that I cannot work out, when LINKZ runs the icon used on the desktop does not get used on the taskbar. Instead, a question-mark icon is used. I would love to know why this is the case!

 

Customising LINKZ for your own use

 

As supplied, LINKZ is setup with item types and fast buttons setup according to my preferences. The fast buttons are set to the types (T)o-do, (W)ork contacts, (A)ppointments and note (S)ubjects. To change these, and access the full LINKZ setup you need to run the setup program (while LINKZ itself is not running). Do this from the command line:

      cd /mnt/cf/linkz

      ./linkzsu.py

Again, this will take a little while to get started. Make the changes you want, then exit this program and restart LINKZ. Note that the help file contains details about the fields in the setup program.

 

Further work

 

LINKZ is still a work in progress. In particular, I would love to have some sort of nifty widget for selecting dates. Also, the Sqlite database has been setup with just the tables themselves. I have been using LINKZ for several months and have not had any database response problems. However, if you put a lot of data (how much?) into LINKZ, you may find the database slows down. If this is the case, I am sure that performance will be able to be improved by adding some indexes directly to the Sqlite database. I have not needed to look at this yet.