WORD PROCESSING WITH OPENZAURUS - MINI HOWTO
Version: 1.0
Date: 11 Sept. 2004
Author: Michael Davis <slithy@yahoo.com>
Copying: Copy this document and use freely without restriction
CONTENTS
0. Introduction
1. Word Processors
2. Hancom Mobile Word
3. Printing
0. INTRODUCTION
This mini-HOWTO rose out of my frustrations with getting word processing
working on my Sharp Zaurus SL-5000D running OpenZaurus. The stock Word
Processor seems to be broken and I spent many hours searching the Internet
and playing with configurations late into the night before I finally
managed to produce and print a document using my Zaurus.
Most of the information in this HOWTO is available on the Internet in
one form or another, but as far as I could see, it is not all together
in one place. I have written this document in the hope that it will save
time and frustration for OpenZaurus users who wish to do simple word
processing on their handheld.
My Zaurus is a SL-5000D with a 256 Mb SD card, running OpenZaurus
3.3.6-pre1 (Hentges ROM) and Opie 1.1.3. My desktop system is Debian
GNU/Linux 3.0 (woody). Most of the comments below should apply to a
wider range of OpenZaurus ROMs and desktop OSes however.
1. WORD PROCESSORS
It has to be said that there is very little choice of Word Processors for
the Zaurus. Here are the options that I found out about:
- Opie-Write: this app comes as part of OpenZaurus/Opie, but it seems to be
broken. As soon as you write more than one page of text, Opie-Write freezes.
According to the bug tracker, this bug was fixed in CVS, but it is still
present in Opie 1.1.3 (which I am using).
See
http://opie-bugs.oszine.de/bug_view_page.php?bug_id=0001167- Hancom Mobile Word: from the stock Sharp ROM. It is possible to get this
working under OpenZaurus/Opie, but there are some issues (see below).
- TextMaker: A commercial word processor available for a variety of desktop
and PDA environments, apparently being beta tested for the Zaurus. At the
time of writing this software is not yet available. When it is released,
one advantage will be the possibility of using the same word processor on
the desktop and on your Zaurus.
See
http://www.softmaker.de/index_en.htm- Some people have reported using Abiword under PDAXROM, but as I am not
using this ROM it was not an option for me and I have no further
information.
- LaTeX is available but is a work in progress (no .ipk available). There
has been murmuring for some time about porting Lyx but no results yet.
See
http://users.ox.ac.uk/~univ0103/z-tex/I have not been able to find a reference to any other word processing
software other than the above. As most of the above software is either
broken, incomplete or not yet available, the only viable option for me
was to install Hancom Mobile Word, so the next section describes how to
do that.
2. INSTALLING HANCOM MOBILE WORD
It is possible to install Hancom Mobile Word (from the Sharp stock ROM) onto
OpenZaurus, but there are quite a few caveats. Here is a simple step-by-step
guide:
- First, you need to get a copy of the .ipk. There are tools available to
extract this from your Sharp ROM (before you reflash) or from the
installation CD, but it is easier just to download it from the Hancom
website. Go to:
http://mobile.hancom.com/download/product_num_reg.html and enter the serial no. from the back of your Zaurus. (I believe that this
only works with Zaurus SL-5000D / 5500 / 5600). This will take you to a page
where you can download the Hancom Mobile Word .ipk. The current version at
the time of writing is hancommobileword_1.4.4_arm.ipk.
- Note that there are later versions of Hancom Mobile Word available (1.5.0)
but these DO NOT WORK in OpenZaurus, so use the above .ipk instead.
- This .ipk is broken, so we have to fix it before installing:
# tar zxvf hancommobileword_1.4.4_arm.ipk
# tar zxvf control.tar.gz
# vi control (or use your favourite text editor)
There is a blank line between "Depends:" and "Priority:" in the control
file. You should delete this line. Your control file should now look
like this:
Package: hancommobileword
Installed-Size: 538444
Filename: ./hancommobileword_1.4.4_arm.ipk
Version: 1.4.4
Depends: qpe-base (1.5.0)
Priority: optional
Section: qpe
Maintainer:
www.hancom.com Architecture: arm
Description: HancomMobileWord
Save this file, then:
# tar zcvf control.tar.gz ./control
# tar zcvf hancommobileword_1.4.4_arm.ipk ./data.tar.gz \
./control.tar.gz ./debian-binary
- If all went well, it should now be possible to install the .ipk. I
installed it on my SD card:
# ipkg -d sd hancommobileword_1.4.4_arm.ipk
# ipkg-link add hancommobileword
- If you are using OpenZaurus 3.3.6-pre1 or later, this is compiled with ggc3.
As Hancom Mobile Word is complied with gcc2, you need to install the
compatibility libraries. See the oz-compat HOWTO:
http://opie.handhelds.org/cgi-bin/moin.cgi...dcompat_20HowTo I had to restart Opie before setting up oz-compat.
Hopefully you should now have a working Hancom Mobile Word!
3. PRINTING
Hancom Mobile Word provides a basic text editing and formatting capability, but
has no facility to print. Of course, it is possible to copy .rtf files created
in Hancom Mobile Word to your desktop, then open in your usual word processor
and print from there. But wouldn't it be more convenient if you could print
directly from your PDA? Well, you can ... at least if your desktop OS is Linux.
Here's how I did it:
- On the desktop box, install lprng and Ted (a RTF editor/converter)
See
http://www.lprng.com http://www.nllgg.nl/Ted- Set up lprng to print to your local printer. If you don't know how to do
this, check out the tutorials and FAQs at
http://www.linuxprinting.org.
There is a graphical tool, lprngtool, which simplifies this process.
- Now you need to add a print queue to take rtf files as input. I added the
following section to /etc/printcap:
# Print RTF files
rtf
:lp=/dev/lp0
:sd=/var/spool/lpd/rtf
:af=/var/spool/lpd/rtf/acct
:if=/usr/local/bin/psrtffilter
:mx#0
:sh
- Create the file /usr/local/bin/psrtffilter as follows:
#!/bin/sh
TMPFILE1=/tmp/ps2rtf$$
TMPFILE2=/tmp/ps2rtf_ps$$
cat - >$TMPFILE1
ted --printToFilePaper $TMPFILE1 $TMPFILE2 a4
# Here you need to send the contents of $TMPFILE2 to your printer.
# This should work for a PostScript printer:
# cat $TMPFILE2
# Or for a non-PostScript printer, use Ghostscript, e.g.:
/usr/bin/gs -q -dBATCH -dSAFER -dNOPAUSE -sDEVICE=ljet4 -sPAPERSIZE=a4 \
-sModel=unspec -sMediaType=plain \
-sPrintQuality=presentation -sOutputFile=- $TMPFILE2
# clean up
rm -f $TMPFILE1 $TMPFILE2
- Don't forget to make the above file executable!
# chmod 755 /usr/local/bin/psrtffilter
- Make sure that lprng is set up to accept remote jobs. The default
configuration on my distribution is to reject remote jobs. You may
need to edit /etc/lprng/lpd.perms. I had to comment out REJECT NOT
SERVER and REJECT SERVICE=R FORWARD.
- Start (or restart) lprng and test by sending a local rtf file to the
printer:
# /etc/init.d/lprng start
# lpr -Prtf test.rtf
- If that worked, you can now set up your Zaurus to print to this queue.
First, get lprng for the Zaurus from
http://www.wayga.org/ipkg/. I
installed version 3.8.15-6.
- If installing on your root, this should install with no problems. But
installation on the SD card is slightly broken. Follow these steps:
# ipkg -d sd install lprng_3.8.15-6_arm.ipk
# ipkg-link add lprng
# cd /usr/lib
# ln -s liblpr.so.0.0.0 liblpr.so.0
There is also a directory of links created under /home/root/usr which
are not required; I deleted this directory.
- It is not necessary to configure lprng on the Zaurus itself, as you can
just print to lprng on your desktop:
# lpr -Prtf@mydesktop myfile.rtf
- For the above to work, make sure that your desktop's IP address is
added to /etc/hosts.
This doesn't allow printing from within Hancom Mobile Word; you do need to
open a terminal to print. However, it is no longer necessary to transfer files
to your desktop or open a desktop word processor.
I hope that this mini-HOWTO is of use to some who, like me, want to use their
Zaurus for word processing and printing.