Older blog entries for msevior (starting at number 65)

30 Dec 2005 (updated 30 Dec 2005 at 12:25 UTC) »
Server-Side AbiWord

AbiWord's primary purpose is to be easiest way possible to prepare documents. We're very tightly focused on being as easy to use as possible. I'm particularly proud of our Visual Drag and Drop feature which substantially reduces a users need to use the clipboard.

However about 3 years ago I thought about the possibilities of utilizing all the neat features of AbiWord remotely. While AbiWord has an extensive array of command-line options, and many people found these useful, each use of Abiword from the command line required reloading Abiword into memory, which was highly inefficient. So I came up the idea of command line interface to AbiWord.

This is a plugin, ("AbiCommand"), which is invoked with the command-line

abiword --plugin AbiCommand

The "--plugin" means execute following the plugin immediately.

This gives you control of the program without actually having a graphics window open. AbiCommand provides a command line interface into AbiWord which allows all sorts of interesting things. You can load and save documents. You can find and replace text. Insert text, delete text etc.

I thought this was a great idea but nobody seemed to be using it much. It was one of those "secret tips" computer magazines like to tell their readers about. Except nobody seemed to know about it.

Then after the release of Abiword-2.4 we began to get more and more bug reports and Requests For Enhancements for AbiCommand. It appears that some people have realized how useful this is for document conversion. AbiWord-2.4.2 (due Real Soon Now) has very good support for export to odt format (Thanks Nokia!), which joins our great support for export to HTML,RTF and ABW. We also had a report that showed how easy this was to utilize with PHP..

$handle = popen("/usr/local/bin/abiword --plugin AbiCommand 2>&1", "w");
fputs($handle, "server");
fputs($handle, "load /usr/local/apache/sites/Toronto.doc");
fputs($handle, "save /tmp/toronto1.html");

or via the "converttotext" or "converttohtml" commands in AbiCommand

So any of you admins wishing to display Word Processor docs in users webbrowsers, just employ some combination of PHP scripts and AbiWord and you're done!

If you are an administrator who wants to automatically convert legacy documents in MS *.doc formats to a more modern and maintainable format (like *.abw or *.odt) go to it :-)

The complete list of AbiCommand's follows. This list of commands is easy to extend.

AbiWord:> help

Currently implemented commands are...

help - prints this message

quit - exits the program

new - create a new empty document.

load "filename" - load "filename" replacing the current document.

printfile "filename1" "filename2"... - print the current document into the filenames listed.

replaceall "find" "target" - replace every occurance of "find" with "target" in the current document.

replacenext "find" "target" - replace the next occurance of "find" with "target" in the current document.

inserttext "target" - Insert "target" at the current point in the document.

delete "args" - Delete "args" characters at the current point in the document.

replacenext "find" "target" - replace the next occurance of "find" with "target" in the current document.

movept "arg" - Move the current point to another location in the current document. options for arg are: BOD,EOD,BOP,EOP,BOS,EOS,BOL,EOL,BOW,+num,-num,num

selectstart - Start a selection at the current point

selectclear - Clear the current selection.

findnext "target" - Find the next occurance of target and select it.

save "filename" - Save the current document.

If filename is omitted the file is saved to it's original name. Otherwise the extension of the filename is used to determine the format of the file

converttotext "src" "dest" - convert the file given in "src" to the plain text file named "dest"

converttohtml "src" "dest" - convert the file given in "src" to the html file named "dest"

writepid "file" - write the PID of this process to the file "file"

server "error file" - This is being run as remote process. Write an error file on error.

previewpng Document preview.png width height - Create a PNG preview of Document with name preview.png of width pixels wide and height pixels in height.

visualedit - popup a visual window and edit the file or just preview what you've done close the window when finished.

Comments Here

21 Dec 2005 (updated 21 Dec 2005 at 10:08 UTC) »
Everything you want to know about Nuclear Power

For last 6 months I've been leading a team of Physicists here at the University of Melbourne in the development of a wiki website that explains all the issues of nuclear power. Today we sent a media release announcing the website.



We did this because we felt we had something to offer to a debate about Nuclear Energy in Australia. We have no vested interest in Nuclear Power other than ensure everyone fully understands the risks and benefits of either employing it or not employing it. No one funded our research. We donated our time to the work much like what happens in Open Source software project. Because of this we could be free of accusations of bias. (But I'm sure we'll get some accusations anyway.)

Much of the anti-nuclear argument centers on an incorrect model of the energy costs in mining Uranium and Nuclear Power plants by Jan Willem Storm van Leeuwen and Philip Smith . The implication of their work is that once the current crop of Uranium mines are exhausted, the energy cost of mining the less abundant Uranium will be so great that it will not be repaid in operating the power plant. We show that van Leeuwen and Smith both over-estimate the cost energy cost of mining the Uranium by at least a factor 10 and also over-estimate the cost of building and operating a Nuclear Plant by over a factor of 10.

The upshot is that Uranium at far lower concentrations that what are currently mined can be efficiently extracted. The implication is that there is hundreds of times more minable Uranium in the world than predicted by van Leeuwen and Smith. Enough to provide the entire energy needs of everyone on the planet for hundreds of years.

But that is just one of our findings. We look at everything to do with Nuclear power. We cover Waste Disposal, Advanced Reactors, Accelerator Driven reactors, Other energy sources, Radiation Safety, What happened at Chernobyl and Three Mile Island, Greenhouse Gas emission, Costs of Nuclear Power and alternative energy sources, electricity prices in different Countries plus more.

Have a look. If you find it useful give us a link and tell your friends!

Comments Here.

5 Dec 2005 (updated 5 Dec 2005 at 23:55 UTC) »

After a slow start, hacking on AbiWord-2.6 is picking up. We've all got pretty excited about the One Laptop Per Child program and are focusing on things that would enhance AbiWord for that activity.

Firstly Tomas Frydrych has been hacking away on our basic Unix graphics class to enable us to use the pango library for the various complex scripts employed in places where the OLPC program might be employed. Today he made his work the new default in CVS HEAD and it appears to work extremely well. A great side-effect of this work is that we may be able to make use of the Gtk-Cairo backend to do sub-pixel positioning of text. I would love this as it would finally remove the off-by-one pixel errors of positioning letters within fully-justified text. Using AbiWord would be like having print-preview quality all the time.

I've been hacking on AbiCollab recently. The idea of this feature is allow real-time collaboration on document creation. Claus Schwarm and I wrote about this feature in Gnome-Journal. I've made good progress. We can now serialize document editing and record the editing information to a file. I have also written code to translate the recorded information back into AbiWord commands so that the file reproduces the editing session. With this in place the next task is to connect two AbiWord's together so that the editing information of one session is communicated to the other. My first thought is that the xmpp protocol used by jabber would be employed. There are a number of good reasons for doing this.

1. Jabber works so the protocol must be good.

2. People will want to use an IM client for offline discussions as they work on the document. Might as well be Jabber.

3. There is good reference code in Inkscape 0.43 which I may be able to steal :-) BTW I wonder when the release announcement of 0.43 will be made? It really is an outstanding release which takes inkscape into territory not covered by commercial vector apps.

4. People will need to find a way through firewalls to use this application. If they've already worked out how to do it with Jabber it's one less issue they have to worry about.

Another thing we might do is make our compressed *.zabw file file format the default and work out how we can prevent superfluous properties being exported. The idea of course is to minimize the "disk" space taken up by documents. The *.zabw format really rocks in this department. This blog post occupies 2466 bytes in *.zabw. By comparison the same document in *.odt occupies 9316 bytes, *.doc 24064 bytes and *.rtf takes 5286 bytes.

Comments Here.


For some very strange reason I missed the inkscape-0.43 release prominently displayed at:



Three things.

Firstly I've got my IBM T43 working pretty nicely now. My only complaint is that I can't suspend to RAM and use the proprietry 3D drivers. I'm currently using gnome-powermanager to handle power issues and NetworkManager to handle wireless. These two are cool applications but they don't quite work together correctly. For some reason if I let gnome-powermanager handle lid events I can't return from suspend on lid closings with NetworkManager running. For those events I full back to the scripts I showed in my previous post. It's nice to able to use my laptop in Linux all time now.

Second I'm currently doing research at the KEK National Laboratory in Japan. Last night I watched Australia beat Uraquay to earn a spot in the soccer World Cup final. We watched over an internet stream hijacked through port forward in Australia. The TV station with the broadcast rights blocked direct connections from overseas. Mplayer and totem both performed very well and I thoroughly enjoyed the match and the result :-)

Finally for some reason I have not been able to work out, I've not been able to directly connect to #abiword either at CERN or here in Japan. I've checked my firewall settings and they all seem fine. Oh well I might ssh back to Melbourne and use a text-based IRC client.

Comments here

Shiny new IBM T43 laptop and Fedora core 4.

I have a cool new IBM T43 laptop. It's, thin, light, fast and runs for 3.5 hours on batteries. My sys-admin guys configured it to have a dual-boot win XP and "blank" where they left it to me install "blank".

I decided to install Fedore Core 4 because I had found it to be a btter distro for development although it was a close run with ubuntu. (I also love Marc's fantastic AbiWord support for Fedore Core.)

OK after some mucking around I finally have it configured to be pretty much perfect.

Firstly, most things "Just worked" out of the box on Fedora Core 4.

What didn't work were:

1. All the cool patent/proprietry protected stuff. (mp3, java, flash, videos)

2. Wireless (needs the ipw2200 firmware for the Intel centrino)

3. ATI proprietry drivers.

4. ntfs filesystem support.

5. Suspend to RAM.

6. External Display

Firstly after installing FC4 from a DVD drive do yum update

Come back next day...

Next install the goodies Redhat leaves out of Fedora because of patent rubbish.



Follow the directions to get mp3's, mplayer, java and flash working nicely.

To get wireless working goto:


and install version 2.2 in /lib/firware

To get the ati and ntfs working follow the directions given in http://www.fedorafaq.org

Which brings me to how to get suspend-to-ram going. This was a real pain. The T43 has this cool SATA disk-drive which I believe is means of employing scsi disks in a laptop. This works really nicely as a development system. Recompiling AbiWord is very fast on this nice little laptop.

Unfortunately Linux does not yet support power-management for SATA systems. There is a kernel patch to support it. You can find pointers to it here.


To make suspend-to-RAM work you have to apply a patch to the kernel. I followed the instructions on how to do this woth fedora here:


And used the patch for 2.6.13-rc5. This worked with a few offsets.

I then copied the ntfs and the ati kernel module to the new /lib/modules/kernel directory and ran depmod.

Next my grub.conf needed an extra kernel line to enable suspend-to-RAM

kernel /vmlinuz-2.6.13-martin1 ro root=LABEL=/ rhgb quiet acpi_sleep=s3_bios

OK finally put together the following sleep.sh


#!/bin/sh # if launched through a lid event and lid is open, do nothing

echo "$1" | grep "button/lid" && grep -q open

/proc/acpi/button/lid/LID/state && exit 0

# remove USB 1.1 driver

rmmod uhci_hcd # sync filesystem and clock


/sbin/hwclock --systohc

# switch to console


chvt 6

/usr/sbin/radeontool light off

/usr/bin/dbus-send --system --dest=org.freedesktop.NetworkManager --type=method_call /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.sleep

/sbin/hwclock --systohc

# go to sleep

echo -n 3 > /proc/acpi/sleep

# readjust the clock (it might be off a bit after suspend)

/sbin/hwclock --adjust

/sbin/hwclock --hctosys

# reload USB 1.1 driver

modprobe uhci_hcd

# turn on the backlight and switch back to X

radeontool light on


/usr/bin/dbus-send --system --dest=org.freedesktop.NetworkManager --type=method_call /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.wake


and call it in /etc/acpi/events/lid.conf and











The final thing was to make sure the external display worked. For this my xorg.conf is as is shown below:

Notice that the driver used is the "radeon" rather than the proprietry "fglrx". This was because I couldn't get the "fglrx" driver to recover after a suspend to RAM. There are rumours on the net about how to do this but I haven't had the time or patience to track them down yet.

So all in all it has taken a LOT of tweaking to get this laptop to work up to the level of winXP in Fedora Core.

I hope all this info is useful to the Fedora Core community. I no longer have the time to keep up with the email on the FC-devel or FC-user mailing lists. I hope that the FC community is interested in making Fedora "Just work" on laptops. It's clear that we still have a long way to go.

Comments Here

------------------------------------------------------------------------ # Xorg configuration created by system-config-display

Section "ServerLayout"

Identifier "Multihead layout"

Screen 0 "Screen0" LeftOf "Screen1"

Screen 1 "Screen1" 0 0

InputDevice "Mouse0" "CorePointer"

InputDevice "Keyboard0" "CoreKeyboard"

InputDevice "Synaptics" "AlwaysCore"

Option "Xinerama" "off"

Option "Clone" "on"


Section "Files"

# RgbPath is the location of the RGB database. Note, this is the name of the

# file minus the extension (like ".txt" or ".db"). There is normally

# no need to change the default.

# Multiple FontPath entries are allowed (they are concatenated together)

# By default, Red Hat 6.0 and later now use a font server independent of

# the X server to render fonts.

RgbPath "/usr/X11R6/lib/X11/rgb"

FontPath "unix/:7100"


Section "Module"

Load "dbe"

Load "extmod"

Load "fbdevhw"

Load "glx"

Load "record"

Load "freetype"

Load "type1"

Load "synaptics"

# Load "dri"


Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))

# Option "Xleds" "1 2 3"

# To disable the XKEYBOARD extension, uncomment XkbDisable.

# Option "XkbDisable"

# To customise the XKB settings to suit your keyboard, modify the

# lines below (which are the defaults). For example, for a non-U.S.

# keyboard, you will probably want to use:

# Option "XkbModel" "pc102"

# If you have a US Microsoft Natural keyboard, you can use:

# Option "XkbModel" "microsoft"


# Then to change the language, change the Layout setting.

# For example, a german layout can be obtained with:

# Option "XkbLayout" "de"

# or:

# Option "XkbLayout" "de"

# Option "XkbVariant" "nodeadkeys"


# If you'd like to switch the positions of your capslock and

# control keys, use:

# Option "XkbOptions" "ctrl:swapcaps"

# Or if you just want both to be control, use:

# Option "XkbOptions" "ctrl:nocaps"

# Identifier "Keyboard0"

Driver "kbd"

Option "XkbModel" "pc105"

Option "XkbLayout" "us"


Section "InputDevice"

Identifier "Mouse0"

Driver "mouse"

Option "Protocol" "IMPS/2"

Option "Device" "/dev/input/mice"

Option "ZAxisMapping" "4 5"

Option "Emulate3Buttons" "yes"


Section "InputDevice"

Identifier "Synaptics"

Driver "synaptics"

Option "Device" "/dev/input/mice"

Option "Protocol" "auto-dev"

Option "Emulate3Buttons" "yes"


Section "Monitor"

Identifier "Monitor0"

VendorName "Monitor Vendor"

ModelName "IBM 9514-B TFT Panel"

HorizSync 48.0 - 65.0

VertRefresh 60.0 - 75.0

Option "dpms"


Section "Monitor"

Identifier "Monitor1"

VendorName "Monitor Vendor"

ModelName "External- generic"

HorizSync 31.5 - 57.0

VertRefresh 50.0 - 70.0

Option "dpms"


Section "Device"

Identifier "Videocard0"

Driver "radeon"

VendorName "Videocard vendor"

BoardName "ATI Radeon Mobility M300"

# Option "VideoOverlay" "on"

Option "DynamicClocks" "on"

Screen 0


Section "Device"

Identifier "Videocard1"

Driver "radeon"

VendorName "Videocard Vendor"

BoardName "ATI Radeon Mobility M300"

# Option "VideoOverlay" "on"

Option "DynamicClocks" "on"

Screen 1


Section "Screen"

Identifier "Screen0"

Device "Videocard0"

Monitor "Monitor0"

DefaultDepth 24

SubSection "Display"

Viewport 0 0

Depth 16

Modes "1280x1024" "1024x768" "800x600" "640x480"


SubSection "Display"

Viewport 0 0

Depth 24

Modes "1400x1050" "1280x960" "1280x800" "1280x1024" "1152x864" "1024x768" "800x600"



Section "Screen"

Identifier "Screen1"

Device "Videocard1"

Monitor "Monitor1"

DefaultDepth 24

SubSection "Display"

Viewport 0 0

Depth 24

Modes "1024x768"



Section "DRI"

Group 0

Mode 0666



My first big run

Just last week I completed my first ever half marathon (21 km) as part of the Melbourne Marathon event.

See here http://www.melbournemarathon.com.au/

I completed in 2 hours and 8 minutes which was almost twice the time of the elite runners who finished near the top.

It was a great experience and I certainly plan to do it again, although next year, if I can find the time to train properly, I'll do the full Marathon.

The route was beautiful. We ran almost the whole way next to the beach except for the final 4 km which was up the beautiful tree-lined boulevard of St.Kilda Road. I had trained up to 15 Km and found that rather easy. However the last 6 km of half-marathon was really hard. I had to walk for a few minutes with about 2 km to go. I think my body needed to pull a bit more energy out it's fat reserves. After walking I felt a lot better and even managed a little sprint over the line. Right after I finished I realised how much my feet hurt. I could barely walk! I guess that shows what effective pain killers endorphins are.

The race was a great excise in humility too. I was constantly passed by other runners. I don't have my official place yet, the organisers will post the full results for the half-marathon today and tomorrow. I expect I finished about 3,000th out of about 4,000.

I wrote the following text last year. I thought I would repost it now. Since then another old friend from my undergrad days has died of a heart attack.


In my youth I used to play a lot of team sports. Especially Australian Football and Basketball. I loved playing football but I hated training for it. We used to have to do sprints. Go into deep anaerobic debt, recover, start again. It was all very painful.

Consequently I never liked exercise for the sake of exercise. When I heard that there were people who used to run for no purpose other to run I couldn't understand it all. Why would someone put themselves though all that pain and not even have the fun of playing team sport?

When my father died a few years ago I started thinking about mortality and health seriously. At my church there are many older people. Many of whom I came to know and care about. Very sadly many of these great people have also passed away. Many of these people had heart trouble.

I had a friend who I used to go drinking with in my early twenties. He was a bit portly back then but as time went on he kept on putting more weight. He kept on drinking to. He was a great person to drink with. A couple of years ago he died of a heart attack.

I had not done any serious exercise for about 10 years. I was putting on weight. I want to live for a lot longer than I have already. So I started to go for runs. I did it even though I thought I didn't have time. I just decided that it has to be done. It was more important to do this than all the other things I felt I should do.

It was total hell for the first 1.5 months. My personality is such that I found it very hard to run slowly at first. But my body was in such bad condition I couldn't run for more than 300 meters in a row anyway. But I stuck at it. Forced myself to jog slowly. To at least walk when I could not jog. Then to keep jogging when I wanted to walk. Then to maintain the jog up a hill. Then to complete 1 circuit of some parks near my house (about 1.5 km). Then complete two circuits. Then to increase my tempo and go for longer runs.

Now I find I look forward to my runs. I run at night because I'm not a morning person and because I want to spend time with daughter before she goes to bed. Running at night around the parks near my house is really special. At the top the hill is a playing field open to the night sky. There are no street lights. On nights like tonight the scene was bathed in moonlight. I could see the city of Melbourne stretched out around me, glowing and shimmering in the distance. I could see all the way to distant hills at King Lake and Mount Dandenong.

As I run past the Eucalypts on the way down from the hill I often disturb fruit bats who silently fly away from their night-time feasts on the flowering gum trees. The air tonight was just pleasantly cool. In the summer and later in the spring the air develops a warmth that surrounds and caresses as I run. I feel enveloped by nature even as I listen to Heavy Rock raging through my mp3 player. Distracting me from the pain of pushing myself.

As I run my mind wanders between enjoying the song, feeling the air, enjoying night-time vistas and thinking of interesting problems. I feel empowered that my body has spare capacity to burn as a run. I can easily run 4 km and finish with a fast sprint now. This thought has struck me many times recently. My mother has recently had open heart surgery. No matter what doctors might say about this being a routine operation, the person getting the surgery is just a blown fuse away from death. Recovering from the operation is a long process. The heart has to learn how to beat by itself. The body has to repair the ribs split open. The mind has to recover from the confrontation with its mortality.

So as I run I feel keenly alive. I savor the moments. Feel the feelings. Think the thoughts. Solve the interesting problems. I look forward to the fun times and interesting challenges ahead but at the back of my mind is the knowledge that one day there won't be a new day for me.

Comments Here

10 Oct 2005 (updated 10 Oct 2005 at 03:17 UTC) »
AbiWord-2.4 in the Real World

With AbiWord-2.4 I can finally use AbiWord for my day to day teaching activities.

The Maths support is awesome! All the power and convience of Latex with none of the hassle.

See the screenshot of my Electrodynamics Assignment.


Comments Here

AbiWord-2.4 released!

AbiWord-2.4 has been released!

A world first in free software. Now with an integrated Grammar Checker!

Read all about it http://www.abisource.com/release-notes/2.4.0.phtml

Download it for Linux, Windows and Mac's http://www.abisource.com/download/

Enjoy our latest gift to Humanity :-)

Comments here

1 Oct 2005 (updated 1 Oct 2005 at 03:47 UTC) »
"A real alternative to MS Word"

A lovely quote from a review of AbiWord from tomshardware.com

See "Pepping up Windows" Tomshardware.com

There's a nice review of the GIMP too :-)

20 Sep 2005 (updated 20 Sep 2005 at 00:54 UTC) »
I love stuff like this.

A few days ago I got an email of the blue from Daniel Naber ( http://www.danielnaber.de ) who will be giving a talk at a OO.o convention about OO's linguistic capabilities. He asked if the grammar checking facility we have in AbiWord can give suggestions for incorrect grammar as well as marking incorrect regions.

Unfortunately link-grammar, which we use for our grammar checker, does not have this capability and told him that. He then told me about his project, LanguageTool. LanguageTool is written in java, can currently grammar check in English and German and provides natural language descriptions of suspected grammatical mistakes.

I asked him if he'd tried gjc and if he knew how provide a C/C++ interface to his code. If we can work this out, the AbiWord side of things is very straight forward. We only have to subclass one existing piece of code in a plugin and wrap his code with a two method API. It's all in a plugin so it won't disturb the rest of our codebase.

If we can work out how to use gcj and do the C/C++ interface we'll can test out his grammar checker in AbiWord in less than one week of real time.

Unfortunately neither he nor I know how to make a gcj <-> C/C++ bridge. So if you do, let us know and we'll Rock On with Free Software<sup>TM</sup> :-)

Comments Here

56 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!