Copyright © 2001 Christian Gebauer
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
KDict is a graphical client for the DICT protocol. It enables you to search through dictionary databases for a word or phrase, then displays suitable definitions.
Table of Contents
KDict is a graphical client for the DICT Protocol. It enables you to search through dictionary databases for a word or phrase, then displays suitable definitions. KDict trys to ease basic as well as advanced queries. A separate list offers a convenient way to deal with the enormous number of matching words that a advanced query can return.
The remainder of KDict's user interface resembles a web browser. For instance, you can jump to the definition of a synonym by simply clicking on the highlighted word. The back/forward functionality is also implemented, enabling you to quickly go back to the result of previous queries.
KDict is able to process the content of the clipboard, so it's easy to combine KDict with your web browser or text editor.
If your machine is behind a firewall, has no permanent internet connection or the server of dict.org is too slow for you, you can set up your own local server, all you need is available at www.dict.org. The advantages of a local server are optimal performance and the ability to install additional databases of your choice. This handbook contains a small tutorial for installation and links to databases.
After you have started KDict (using the panel menu, or by typing kdict at the command prompt) the KDict main window shows up:
The KDict main window.
There are two different methods to lookup a word or phrase with KDict. You can use a define query. KDict will look for exact matches in the databases and displays all matching definitions in the lower left view. Or you can use a match query, in this case all matching database entries will be displayed in the list view on the right side. You can then decide what definitions you want to look at. This method has the advantage that you can use more sophisticated search strategies like prefix, suffix or regular expressions.
Before you can make your first query, you have to check if the preset server settings work with your setup. You can modify the settings in the preferences dialog. The preset server is dict.org, which is a public server, so you don't have to change anything if you have a working internet connection.
You can test your configuration by selecting Server Information from the Server menu, this displays some status information about the server.
Now you should use Server->Get Capabilities, this will fetch a list of all available databases and strategies from the server. KDict is now able to show you all features of the server in its menus. (You should always call Get Capabilities after switching to a new server)
A define query will search for words/phrases in the selected database(s) that match the given text exactly. The definitions belonging to these words are displayed in the main view. If the server finds nothing suitable, KDict will use a search strategy optimized for spell checking to display a list of of similar words.
In most databases some words (especially synonyms) are marked with brackets “{}”. These words are highlighted and by clicking on them with the left mouse button you start an new define-query with this word.
You can select a part of the text with the left mouse button mouse button. The selection is automatically copied into the clipboard. This is very convient, because you can use the middle mouse button mouse button anywhere in the main view to define the content of the clipboard. So, if you want to get a definition for a word/phrase that is not tagged as synonym, you just mark it with the left mouse button mouse button and get the definition when you press the middle mouse button mouse button.
The right mouse button mouse button shows a popup menu, where you can choose to start queries with the selected text, the clipboard or the tagged synonym under the mouse pointer. The menu has also two entries Back and Forward. You can use them to browse through the results of previous queries.
A match query uses the currently selected search strategy (the strategy selector is is located above the match list) to search in the selected database(s) for words similar to the given text. The result is a list of similar words that appears in the match list on the right. The entrys are grouped according to the database they belong to. Now you have multiple options:
You can use the Get All button (located below the match list) to fetch all definitions. Please note that the number of listed words and fetched definitions may differ, because in some cases two or more words share one definition and KDict removes the duplicated definitions.
You can use the mouse or the keyboard to select the most interesting words in the list and then press the Get Selected button (located below the match list) to fetch only them. If you want to get all definitions from one database just select the list item which contains the database name.
When you press Enter (keyboard) or double click (mouse) on a list item, KDict will ignore the selection and fetch the definition for this item. When you do this with a “root” item (an item that contains the database name), you will get all definitions belonging to this database.
You can use one of the words as a starting point for a new query, this is done via the popup menu (right mouse button mouse button).
A click with the middle mouse button mouse button anywhere in the list will start a new match query with the content of the clipboard (similar to the main view).
The right mouse button mouse button calls the popup menu for a list item, which has the following entries:
Shows the definition for the current item.
Starts a match/define query with the current item.
Starts a match/define query with the current content of the clipboard.
Same functions as the buttons below the list.
(Un)folds all databases.
Sometimes it's useful to restrict a query to a subset of the available databases, for example all english-german dictionaries. This is achieved by defining “database sets”. These sets appear in the database selector as virtual databases.
You can access the configuration dialog via Server->Edit Database Sets or the toolbar icon.
The database set editor.
The dialog has the following elements:
You must use this selector to select the set you want to modify. You can also rename a set here by entering a new name and pressing the Save button.
Saves changes you made in the current set. You must use this button before you select another set or leave the dialog, because otherwise all changes will be lost.
This button creates a new database set.
Deletes the currently selected set.
Closes the dialog without saving your changes.
The two lists (Selected Databases and Available Databases) show which databases are currently in the database set. You can use the arrow buttons between the lists to transfer items from one list to another.
By the way, you can leave this configuration dialog open and continue your work with KDict. This is a nice way to test your changes immediately.
You can modify many aspects of KDict's behavior in the preferences dialog. The dialog can be opened via Settings->Configure Kdict or the the toolbar icon.
The preferences dialog.
The dialog is divided into serveral pages. The Default button restores the default values for the current page. The Apply button will apply your changes on all pages. The OK button will apply the changes and close the dialog. The Cancel button does this without saving the changes. By the way, you can leave the preferences dialog open and continue your work with KDict. This is a nice way to test your changes.
The internet hostname or the ip address of the DICT server.
This is the port number the server listens on. 2628 is the default port and is used by the most servers.
KDict is able to keep the connection open in short periods of inactivity. This feature avoids the lengthy login procedure before every query. A value of 0 seconds disables this feature. Very large values aren't useful, because in most cases the DICT server will close the connection after a couple of minutes.
This value determines how long KDict will wait for a answer from the server.
The DICT protocol allows the client to send multiple commands in one network packet. The size of the internal command buffer determines how many commands are send in parallel by KDict. You can try to tune this value for your network connection, but in most cases it is not worth the effort.
With this selector the text encoding method of the databases can be specified. The default value is "utf8", this setting should work on most servers. If an encoding is selected that doesn't match the encoding used by the databases, you will see broken characters.
Activate this if you want to provide a authentication with username and password. (a server may require this for access to all databases) You have to enter a valid Username and Password combination below.
On this page you can customize the colors and fonts of the definition view. A proportional font for the normal text will increase readability, but will also destroy the hardcoded layout of tables and similar things in the definitions of some databases.
The layout of the result isn't really configurable yet. But you can decide how many headings (a heading states which database the definition belongs to) KDict should place in the result. The choices should be selfexplaining. Note that changes on this page won't have any effect until you start a new query.
On this page you can modify various limits that prevent KDict from eating up insane amounts of memory.
This limits the number of definitions you can fetch at once by selecting them in the match list.
This number determines how many previous results are held in a internal cache for fast access. You can set this to 0, but this will disable your ability to browse back to old results.
This is the number of past entries the input line remembers. Large values will cause a slower start and shutdown of KDict.
If this is selected, KDict will remember your history between sessions.
If this is selected, KDict will immediately try to define the contents of the clipboard when it is started.
If you use KDict frequently you may find it useful to use the included panel applet. You can get the applet via K-Menu->Configure Panel->Add->Applet->Dictionary.
The Panel Applet
The input field behaves like the input field of the KDict main window. When you press Enter KDict opens and the query starts. Instead of typing you can also select a phrase you entered before from the drop down list.
Additionally the applet features three push buttons:
Define the current content of the clipboard.
Define the current content of the input field.
Start a match query with the current content of the input field.
Saves the current result as an html document.
Prints the current result..
Defines the content of the input field..
Aborts the current query..
Quits KDict.
Copies the currently selected text into the clipboard.
Selects the complete text.
Defines the current content of the clipboard.
Find database entries which match the current content of the clipboard.
Finds a string in the displayed definitions.
Determines which databases and strategies are available on the DICT server. You must call this once to be able to specify search strategy and database for a query.
Opens the database set editor.
Submenu which offers a summary of the databases available, and detailed information for every database.
Displays a list with short descriptions of the search strategies available on the current server.
Displays some status information (uptime, etc.) about the current DICT server.
This menu provides options for configuring KDict, changing its appearance, shortcuts and standard behavior.
Toggles the toolbar on/off.
Toggles the statusbar on/off.
Hides (or shows) the match list.
This (un-)swallows the match list into the main window.
Opens a dialog for changing the key bindings. Using this option you can change the standard key shortcut for KDict's commands or create new ones.
Opens a dialog for configuring the toolbar. You can add and remove toolbuttons for KDict's commands with this option.
Opens the preferences dialog.
Invokes the KDE Help system starting at the KDict help pages. (this document).
Changes the mouse cursor to a combination arrow and question mark. Clicking on items within KDict will open a help window (if one exists for the particular item) explaining the item's function.
Opens the Bug report dialog where you can report a bug or request a ‘wishlist’ feature.
This will display version and author information.
This displays the KDE version and other basic information.
KDict can be started directly from a terminal like Konsole or xterm. Several command line options are available.
lookup the given text. You will have to put the phrase into double quotes, if the phrase contains more than one word. For example: kdict "double quote"
define the current content of the clipboard.
Displays the version number of KDict (and that of Qt™/KDE).
Shows under which licenses KDict is being published.
KDict also supports all other command line options common to KDE and Qt™ programs. You can get a list of these options with --help, --help-kde and --help-qt
KDict - The KDE Dictionary Client
Copyright (c) 1999-2001, Christian Gebauer
Copyright (c) 1998, Matthias Hölzer-Klüpfel
KDict was originally written in 1998 by Matthias Hölzer-Klüpfel <hoelzer@kde.org>. Currently it is maintained by Christian Gebauer <gebauer@kde.org>.
This documentation is licensed under the terms of the GNU Free Documentation License.
This program is licensed under the terms of the Artistic License.
KDict is part of the KDE project http://www.kde.org/.
KDict can be found in the kdenetwork package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.
In order to compile and install KDict on your system, type the following in the base directory of the KDict distribution:
% ./configure % make % make install
Since KDict uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.
At first the dictd daemon has to be installed. The easiest way to install dictd is using a precompiled package. Such a package is included both in Debian and SuSE Linux®. You can find packages that should work on all RPM based Linux® distributions on rpmfind.net.
If you want to compile dictd yourself, download ftp://ftp.dict.org/pub/dict/dictd-1.5.5.tar.gz. Compilation is easy, just unpack the archive and run ./configure, make and make install in the dictd directory. You might want to use the --prefix option of the configure script to install dictd in a different directory. By default dictd will be installed in /usr/local.
Now you need to download some databases. The standard set (webster, wordnet, jargon file, foldoc, ...) that is present on the DICT server of dict.org, is available from ftp://ftp.dict.org/pub/dict/pre/. These are also available as Debian and rpm packages.
Translating dictionaries for Africaans, Czech, Danish, English, French, German, Greek, Hungarian, Irish, Italian, Japanese, Latin, Nederlands (Dutch), Portuguese, Russian, Serbo-Croatian, Swedish, Slovak, Spanish, Swahili, Swedish, Turkish and Welsh
Translating dictionaries for English, French, German, Italian, Latin, Portugue and Spanish.
Esperanto dictionary
OBI's Online Biographical Dictionary
The Inaugural Addresses of all the US presidents
You can find more databases on the link page of www.dict.org, but the majority of them are not formatted for dictd.
Each database consists of two files: The *.index file contains the index and the *.dict.dz file the actual data. Unpack all packages into a directory of your choice, for example /usr/share/dict/.
You have to create/modify two configuration files. Both are stored in /etc (or in any other directory if you used the --prefix flag).
dict.conf belongs to the basic dict client. It contains only one line: server localhost. This tells dict to use the local server.
dictd.conf configures the server. First you must add the access statement: access {allow localhost deny *}.
This example grants only local access and blocks all external connections. You can use more than one allow and deny rule, for example:
access {allow localhost allow *.workgroup deny *}The database statement configures the location of the index and the data file for a database:
database web1913 { data "/usr/share/dict/web1913.dict.dz" index "/usr/share/dict/web1913.index" }
You must add a statement for each database you want to use.
Now you should be able to start dictd and to use it with dict and KDict.
Please consult the man page of dictd for a complete description of dictd.conf.
If you want to use the dict server frequently, you might want to start it automatically during the startup process of your system. Some of the precomplied packages install a suitable script, but you can also adapt the generic SYSV style script included in the source distribution: ftp://ftp.dict.org/pub/dict/INITSCRIPT.