OOodi




OOodi

Dictionary Installer for Unix

Jonathan Hudson

http://ooodi.sourceforge.net



Overview

OOodi provides a dictionary installer for OpenOffice.org on Unix platforms. The program is written and tested on Linux but should be portable to other Unix platforms.

OOOdi will download a file describing available dictionaries (available.lst) from the OOo Dictionary Site (or your choice of alternate site) and allow the user to select dictionaries to be installed. For OpenOffice.org v1.0, dictionaries are installed in the user's private directory. OpenOffice.org v1.0.1 and later allow a privileged user (root) to install shared dictionaries in the system wide OpenOffice.org directory.

For OpenOffice.org v1.0.1 and later, hyphenation dictionaries are also supported by Ooodi.

Installation

Ooodi is provided (by the author) in two forms, either as a source archive or a Linux binary archive.

Source Archive

The source archive has numerous dependencies, including:


To build and install the source distribution, unpack the archive to a suitable location, then:

./configure
make
make install (as root)

Binary Installation

In the unlikely event that a pre-compiled binary was available, it would be provided as an epm (Easy Package Manager) package. It would have the binary dependencies, which may be summarised as XFree 4.4.0 / X.org 6.7 and GTK2+ (similar to those below). Your mileage may vary:

libgthread-2.0.so.0 => /usr/local/lib/libgthread-2.0.so.0 (0x40036000)libglade-2.0.so.0 => /usr/local/lib/libglade-2.0.so.0 (0x4003b000)
libgtk-x11-2.0.so.0 => /usr/local/lib/libgtk-x11-2.0.so.0 (0x4004d000)libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x40302000)
libpthread.so.0 => /lib/libpthread.so.0 (0x403fa000)
libz.so.1 => /usr/local/lib/libz.so.1 (0x4044a000)
libgdk-x11-2.0.so.0 => /usr/local/lib/libgdk-x11-2.0.so.0 (0x4045b000)
libatk-1.0.so.0 => /usr/local/lib/libatk-1.0.so.0 (0x404d9000)
libgdk_pixbuf-2.0.so.0 => /usr/local/lib/libgdk_pixbuf-2.0.so.0 (0x404f3000)libm.so.6 => /lib/libm.so.6 (0x40509000)
libpangoxft-1.0.so.0 => /usr/local/lib/libpangoxft-1.0.so.0 (0x4052c000)libpangox-1.0.so.0 => /usr/local/lib/libpangox-1.0.so.0 (0x4054d000)
libpango-1.0.so.0 => /usr/local/lib/libpango-1.0.so.0 (0x4055a000)
libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 (0x4058e000)
libgmodule-2.0.so.0 => /usr/local/lib/libgmodule-2.0.so.0 (0x405b9000)libdl.so.2 => /lib/libdl.so.2 (0x405bc000)
libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x405bf000)
libcurl.so.2 => /usr/local/lib/libcurl.so.2 (0x4061a000)
libssl.so.0.9.7 => /usr/local/lib/libssl.so.0.9.7 (0x4064a000)
libcrypto.so.0.9.7 => /usr/local/lib/libcrypto.so.0.9.7 (0x40679000)
libpopt.so.0 => /usr/local/lib/libpopt.so.0 (0x4076b000)
libc.so.6 => /lib/libc.so.6 (0x40773000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x408a5000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x4096e000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40973000)
libXft.so.2 => /usr/local/lib/libXft.so.2 (0x40981000)
libXrender.so.1 => /usr/local/lib/libXrender.so.1 (0x40993000)
libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x4099b000)
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x409bd000)
libexpat.so.0 => /usr/local/lib/libexpat.so.0 (0x40a0e000)

Note that from v0.68, libglade is required for the user interface.

Pre-compiled binaries are only guaranteed to work on my machines. The Intel build is prefixed on /usr/local while the PPC build is prefixed on /usr.

Performing an installation

epm (Easy Package Manager) is used to create all binary distribution formats. To install the portable distribution:

From time to time, some kind person will provide a .deb or .rpm distribution. I do not make these formats as I usually get it wrong and upset users.

To install the .deb or .rpm distributions, use the standard tools on your system.

Program dependencies

OOodi uses the InfoZip unzip program to unpack dictionary archives. unzip is usually supplied as part of a Linux distribution and is available for most commercial UNIXs. InfoZip may be downloaded, if required, from the InfoZip web site.

Configuration

The first time it runs, OOodi creates a directory ~/.ooodi. It writes a (hidden) gtkrc file (.gtkrc) in this directory, which defines the fonts and sizes used for some labels for Western European fonts. OOodi is internationalised; translations are available for French, German, Greek, Italian and Japanese. Contributions of language files for other languages are welcome.

A file ~/.ooodi/ooodi.rc is also used. This file is maintained by the Preferences page. It allows, inter-alia the use of an HTTP proxy, if required (and a proxy user name).

The Preferences page is available from a right mouse popup menu, the Settings-> Preferences menu or at startup if the available.lst file is not found.

From version 0.51, a menu bar is implemented. The menu options are essentially those available from the popup menu, with the addition of the Repair, Update Dictionary List, Copy old version, and Help entries.

Usage

Getting Started

OOodi is invoked by the command OOodi (note capitalisation is significant, but a symbolic link to ooodi is installed). When invoked by a unprivileged user , it can install and remove dictionaries from that user's private directory. If the user has write access to the system-wide shared dictionary area (for OpenOffice.org v1.0.1), then the user may install or remove system wide shared dictionaries. The root user may invoke OOodi with an additional option to allow installation and removal of shared dictionaries even if the root user does not have a personal OpenOffice.org installation (see here for further details). If the root invokes the program without the option, the a file selector is displayed to locate the installation directory.

$ OOodi [--base=directory]

The --base=dir option is only available to the root user and defines where OpenOffice.org installation directory for (see shared dictionaries).

Normally, OOodi is invoked as:

$ OOodi

If a file defining the available dictionaries is available in the source directory defined by your preferences (or the current directory if you haven't defined a source directory), then the opening window is displayed, listing the available dictionaries and the user (U) and shared (S) dictionaries installed (indicated by a green tick). The final column in the list annotates the type of dictionary, either Dict for a spelling dictionary, or Hyph for a hyphenation dictionary. Hyphenation dictionaries are only included if the Include hyphenation dictionaries preference is set. An asterisk after the type indicates that a more recent dictionary is available for download. The check is accessed from the Tools->Update Dictionary List menu option.






If a local available.lst file is not found, then the user is presented with a number of options:






Edit Settings
Before you attempt to download a list of available dictionaries from the Internet, you may wish to edit your network options. Selecting this item will invoke the Preferences dialogue.
Download list of dictionaries
This option will attempt to download the list of available dictionaries from OOo Dictionary Site (or the URI entry in your preferences).
Search for a local copy of the dictionary list
This option will display the GTK+ file selection window. You can select an existing available.lst in a different directory. The program enforces a restriction that the file must be named available.lst and must be readable by you.
Exit the program
Just in case it all gets too much!

If the Include hyphenation dictionaries preference is set, but the hyphavail.lst file is not found, then a similar dialogue is displayed. In this case it is possible to continue without using hyphenation dictionaries. The file selector will require hyphavail.lst.




Preferences

Preferences are accessed either from the startup options, the Settings-> Preferences menu or from a right mouse button popup menu.






URI
The address of the site holding the dictionary list and available dictionaries. The default is set to http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries/.
You should only change this if the dictionary site changes or you know better. You may also find dictionary files at one or more of http://dict.progbits.com and ftp://dicts.stardiv.de.
Browser
OOodi uses a browser to display its help pages. The browser will also be invoked for the link from the About box to the OOodi home page. If you don't define a browser, OOodi attempts to locate and use one of firebird, galeon, mozilla or netscape, in that order.
Proxy
If there is a proxy between you and the Internet, then you should enter the proxy details here.
Proxy User
If you are behind a proxy and you have to supply a user name (and password) to access the proxy, then you should enter the user name here. You will be prompted for the password when you attempt to download information. OOodi does not store your password.
Keep zip files
If this option is checked, then the downloaded zip files containing dictionary data files are retained in the Directory. This enables the installer to reinstall such dictionaries without having to download them again if Prefer local files is checked.
Prefer local files
If this option is checked, then OOodi will attempt to use local zip files containing dictionary data before downloading such files from the Internet. OOodi expects to find such files in the Directory (or current directory if the Directory is undefined).
Directory
The directory in which OOodi stores the list of available dictionaries and downloaded zip files containing dictionary data. Note that the zip files are only retained if the checkbox Keep zip files is checked. If zip files are retained, they can be reinstalled again if the Prefer local files entry is checked. The first time the program is run, this directory is set to $HOME/.ooodi.
The Directory can be changed by clicking on the ellipsis (...). A file selector will be displayed allowing the user to choose an alternate directory.


After the initial list of dictionaries has been downloaded, OOodi will attempt to use this local dictionary list. If you want a new dictionary list, just delete the available.lst (and/or) hyphavail.lstfile(s). The next time you run OOodi it will download new lists. Alternatively, you can use the Update Dictionary List menu option to check that your local files are current.

Include hyphenation dictionaries
If this option is checked, OOodi will also maintain OpenOffice.org v1.0.1 hyphenation dictionaries and will expect to find or download a list of available hyphenation dictionaries (hyphavail.lst).
Remove also unlinks
If this option is checked, then when you remove dictionary entries, the data files *.dic and *.aff are also deleted. This will prevent the Repair menu option from being able to rebuild your installed dictionary list from the data files.

Installing and Removing Dictionaries

Once the list of available dictionaries is displayed, dictionaries may be selected for installation or removal. Once items have been selected, the Install and Remove buttons are available if you have a local OOodi installation. If you are running OpenOffice.org v1.01 or later and have write access to the shared dictionary directory, then the Install Shared and Remove Shared buttons are also available.






Dictionaries may be installed or deleted by pressing the appropriate button. If necessary, the dictionary file will be downloaded from the Internet. In this case, the file name and progress will be shown in the status bar, and the Cancel D/L button is enabled. The screen-shot illustrates the a user installing a 'user' dictionary.

If you cancel a download or errors occur, a dialogue will be displayed.




Shared Dictionaries

Shared dictionaries may be installed either by:

Menu Options

A number of options are available only from the menus.

Tools->Repair.
If you have not checked the Remove also unlinks preferences item, then selecting the Repair option will rebuild your list of installed dictionaries from any dictionary data files it finds in the user dictionary area.
Tools->Copy old version.
This option will merge the user dictionary entries from compatible (i.e. OpenOffice.org v641 and later) versions into your current user dictionaries.
The list of old versions is displayed in a combo box. Choose the version required and press OK. If no compatible versions are found, then this item is not available.




Tools->Update Dictionary List.
This option will cause OOodi to perform the following checks:
Help->Help.
This option will invoke your browser to display this document.

Diagnostics

When Install is clicked, the program (attempts to) download the selected dictionaries from OOo Dictionary Site. The download is checked for a ZIP signature. If the file is a zip file, then the .dic and .aff files are installed under user/wordbook and dictionary.lst is updated. If the file is not a valid zip file, then the file is preserved as xx_XX.zip.failed. This may contain a HTTP or proxy error message. Likewise, if the program repeated fails to download a valid list of available dictionaries, then the available.lst file may contain a HTTP or proxy error message.

Selecting Dictionaries in OpenOffice.org

This is the quick explanation of how to use your newly installed dictionaries in OpenOffice.org. If you want a better explanation, then you should read Lee Corbin's document from the Windows DictInstaller project.

  1. Download all required dictionaries using OOodi

  2. If you're using the QuickStarter, then disable it

  3. Select Tools / Options / Language Settings / Writing Aids

  4. Select Edit

  5. Select from the Language pulldown list. The downloaded dictionaries have an 'ABC' logo next to them. Check the 'OpenOffice MySpell Spellchecker' box.

  6. Select Close

  7. Select Languages. Ensure the correct 'Default Language for Documents' is shown.

  8. Select OK

  9. Restart OpenOffice.org (or re-enable the QuickStarter). Enjoy spell checking.

Bugs and Omissions

The program cannot distinguish between two different dictionaries where the locale code is the same (el_GR and el_GR_enhanced and it_IT and it_IT_latin). Fixing this in OOodi would be quite ugly. As OpenOffice.org v1.01 will allow multiple dictionaries for a given locale, then hopefully the names in the dictionary distributions will be modified to make this problem go away.

Author, Licence and Thanks

OOodi is (c) Jonathan Hudson 2002-2004. This software is released under the LGPL (please see the file COPYING included with the source archive for further information).

Mark Finlay improved the user interface.

Bug reports, translations and change requests are welcomed. I am grateful to Marco Huggenberger (de_DE), Takeshi Aihana (ja_JP), Michalis Kabrianis (el_GR), Andrea Sanavia (it_IT), Andre Mazouer (fr_FR), Tamas Gervai (hu_HU), Pedro A. Gracia Fajardo (es_ES) and Вячеслав Диконов (aka Vyacheslav Dikonov) (ru_RU) for their translations. Any omissions are entirely mine as OOodi has been something of a moving target.

Johannes Jördens has made Debian packages for 0.55.

The template for this document is derived from one produced by Daniel Carrera for the OpenOffice.org Starter's Guide.

8. Links to other OpenOffice.org stuff

http://ooodi.sourceforge.net. OOodi home page.

http://www.openoffice.org. The main OfficeOffice.org site.

http://evolvedoo.dyndns.org. Evolved OpenOffice.org aims to bring together as much third party work as possible into one easy to use pre-compiled package for Linux Desktops. Includes RPMs for GNOME and KDE providing QuickStart applications, OOodi, icons, integration into GNOME and KDE control centres.

http://www.ooodocs.org. OOoDocs provides news, HOWTOs and the Windows Dictionary Installer.

http://ooextras.sourceforge.net. OOExtras provides a community repository for third party templates, macros, and a clip art image library.

http://ooqstart.sourceforge.net. Quickstart applet for GNOME (ooqstart).

http://segfaultskde.berlios.de/index.php?content=oooqs . Quickstart applet for KDE (ooqs).

OOo Dictionary Site. Dictionary files and documentation, maintained by Richard Holt and Kevin Hendricks.

http://www.ooodocs.org/dictinstall. Dictionary Installer for Microsoft Windows.

OpenOffice.org Starter's Guide. This project provides high quality starter guide documentation for OpenOffice.org.

FAQ

If there are frequently (asked|answered) questions, they may be found here.

Where are the Debian or RedHat packages?

I don't know. I use neither Debian nor Redhat, excellent as they are. If I make files using the EPM tools. I get chastised by Debian/Redhat fanatics because the results don't comply precisely with the vendors' standards. So, alas, I can't offer such packages. Please ask you local, friendly distribution maintainer.

How do I select more than one spelling dictionary or hyphenation dictionary?

CONTROL+click and/or SHIFT+click.

When I download the (insert your example here) file, I get a '.failed' file. Why is the download offered by OOodi if the file doesn't exist?

Probably because your available.lst or hyphavail.lst files are out of sync with the files on the remote server. Use the Tools->Update Dictionary List option to update these files (and see what's changed). Note also that the detection of changed files is somewhat rudimentary, so it might be best to delete the $HOME/.ooodi/available.lst and $HOME/.ooodi/hyphavail.lst files first to ensure you have the latest versions.


12