« How vulnerable is your operating system? | Main | Feisty the 19th of April »




There are lots of ways in which Linux applications can be tweaked to your personal taste. Here's one of my favourites...

Yes, Wikipedia's and the Cambridge and Oxford dictionaries are great online resources, but you you need to be on line to use them. If you're on the move or on the end of a dialup connection they're utterly inconvenient. But there's another free online resource called dict.org which fronts a number of equally free databases and dictionaries. The difference with dict is that you can take it with you.

Traditional access to dict is via their website or a dedicated dict client. There are heaps of these, written in a wide variety of languages for a vast array of operating systems. My favourite's Kdict;



Whatever client you use however still ties you to the internet - unless you choose to run your own dict server.

A quick aside here: many users think of servers as specialised high-speed platforms servicing thousands of users a minute. And the can be. But your humble PC can also be a server, serving just you.


Set Up Your Own Server
Download and install the following apps via you usual update method.
  • dict - the dictionary client
  • dictd - the dictionary server
  • dict-wn - the WordNet dictionary. (There are tons of other dictionaries and databases you can download - see below - but this will get you going.)
Open a terminal window and start the server with the command dictd. (You'll need to be root so Ubuntu users should prefix that command with sudo.)

Now test the server's working by issuing the command like dict computer (to look up the word "computer" in the dictionary.) You should get a response like this...



(Press spacebar to scroll or "q" to quit.)

If you now change Kdict to use your local server instead of the net, you have an always-on dictionary! To do so;
  • Choose Settings / Configure Dictionary.
  • Change the Hostname setting from dict.org to localhost and click OK.

You need to make one more change to ensure that dictd starts every time you boot;
  • Open the KDE Control Centre (or just type kcontrol in your terminal window).
  • Select System Administration / System Services and click Administrator Mode.
  • Scroll down and select the dictd service.
  • X the Start During Boot check box then click OK.


Create a Shortcut
While you're in the KDE Control Centre, add a keyboard shortcut to kick off kdict. Then you only need to select a word, hit the shortcut key, and kdict will pop-up with a definition.
  • Select Regional & Accessibility / Input Actions.
  • Click New Group and name it whatever you like.
  • Select your new group and click New Action.
  • Again, give a name then click the Action Type drop-down and choose Keyboard Shortcut -> Command/URL (simple)
  • Click the Keyboard Shortcut tab and assign a key combination by clicking the button below Select keyboard shortcut. A new window will open. Choose whatever key combination you like (I use Win + K).
  • Click the Command/URL Settings tab, enter the command kdict --clipboard then click the Apply button.
Try it. The shortcut (and Kdict) will work in any application at all - even a terminal window!


Add Some More Databases
WordNet (dict-wn) isn't the only database around - or even the only dictionary. In fact dozens are available, including around 60 foreign language dictionaries. (English-Welsh or Africaans-German anyone?) Amongst the more common (and more useful) are;
  • dict-elements - contains physical and chemical data about the elements
  • dict-foldoc - the Free OnLine Dictionary of Computing
  • dict-gcide - a comprehensive English dictionary (more detailed that dict-wn)
  • dict-moby-thesaurus - a huge, comprehensive thesaurus
Just download 'em, restart dictd and you'll have 'em on-hand and instantly available for ever.

<< Previous "Hidden Linux"

>> Next "Hidden Linux"

Comments

Please use these setting under "Configure Dictionary":

Hostname: localhost
Port: 2628

About installing wn on Kubuntu, you can download the RPM, and use kpackage or whatever, as long as you install a few things that make ubuntu able to handle RPMs. One of them is "alien"... but I've searched for "RPM" on adept package manager and installed a few other things just because I thought those might be required as well...

You may need to edit a few files some subdirectory of /etc, but I think that just restarting or running some automatic configuration of dictd will do the job as well. I don't know because I didn't restarted it yet. It should work because there are the equivalent files of wn in the /usr/share/dictd folder (or something like it), and this is 99% of the task, I think.

Just grab the dict-wn tarball from here: http://ubuntu.interlegis.gov.br/archive/pool/universe/d/dict-wn/dict-wn_2.0.orig.tar.gz
Unpack to /usr/share/dictd/ and restart dictd

Another dictionary tool for Linux that can be used without internet connection is JaLingo http://jalingo.sourceforge.net/

Great article! I do the same thing on my Kubuntu Dapper desktop. However, I can't find the dict-wn package for Feisty, which I installed on my laptop. I asked on Ubuntu forums, but if you know how to get it (although from the date of this article you were probably using Edgy?) please please let me know! And if I find the answer, I'll come back and post it. Because I miss dict-wn in Feisty. :-(

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.