{"id":8670,"date":"2024-11-28T01:38:00","date_gmt":"2024-11-28T06:38:00","guid":{"rendered":"https:\/\/www.both.org\/?p=8670"},"modified":"2024-11-28T05:50:17","modified_gmt":"2024-11-28T10:50:17","slug":"why-doesnt-my-dict-command-work","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=8670","title":{"rendered":"Why doesn&#8217;t my dict command work?"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"8670\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><\/div>\n<p>I upgraded to Fedora 41 as soon as it became available about a month ago. Most things worked as expected, but the <a href=\"https:\/\/www.both.org\/?p=2727\" data-type=\"link\" data-id=\"https:\/\/www.both.org\/?p=2727\" target=\"_blank\" rel=\"noreferrer noopener\">dict<\/a> command started responding with messages about not finding a server. The dict command allows me to find definitions, synonyms and more from multiple on-line dictionaries. I depend on this in my writing and much prefer the command line than the graphical version. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Problem Determination<\/h2>\n\n\n\n<p>The dict command is installed with the dictd package. I tried reinstalling to no avail. When a program can&#8217;t find something it needs &#8212; such as a server &#8212; I start by looking at the global configuration file. <\/p>\n\n\n\n<p>For dict, that file is specified in the man page as \/etc\/dict.conf. When I tried to look at that file, I discovered that it didn&#8217;t exist. That was strange, because dict obviously worked before I upgraded from Fedora 40 to 41. Some exploration of earlier versions of Fedora indicated that no such file ever existed in any of them. So I concluded that the default configuration was coded into the program, but that presence of \/etc\/dict.conf would override that.<\/p>\n\n\n\n<p>Note that Ubuntu and related distros keep the configuration file as \/etc\/dict\/dict.conf.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Problem resolution<\/h2>\n\n\n\n<p>Before fixing the problem, I needed to know the syntax of the file and the specific content to define the server to be used. I added the dictionary widget to the top panel on my Xfce desktop to see if it worked, and it did. I checked it&#8217;s configuration, Figure 1, and it provided me with the data I needed to configure dict.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><a href=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/11\/dict-gui-settings-01.png\" target=\"_blank\" rel=\" noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"766\" height=\"556\" src=\"https:\/\/www.both.org\/wp-content\/uploads\/2024\/11\/dict-gui-settings-01.png\" alt=\"\" class=\"wp-image-8677\" style=\"width:494px;height:auto\"\/><\/a><figcaption class=\"wp-element-caption\">Figure 1: The GUI Dictionary configuration page provided the correct information.<\/figcaption><\/figure>\n\n\n\n<p>To get the syntax for the configuration file, I did a search and finally came up with the very simple, one-line configuration in Figure 2, that works fine. The commented lines are samples for using authentication on a remote server and to a local server. The dict.org server is the default.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server dict.org  { port 2628 }\n# server penguin.cow { user faith sdlkfj }\n# server localhost { user faith thisismysharedsecret }<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center has-small-font-size\">Figure 2: The simple \/etc\/dict.conf configuration file I created.<\/p>\n\n\n\n<p>This resolution does depend on the availability of the remote server. It is possible to use a local server, but that&#8217;s not how I want to do it.<\/p>\n\n\n\n<p>It&#8217;s not a difficult fix, but it took a good bit of work to suss out the information needed to resolve this problem. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <strong>dict \"suss out\"<\/strong>\n1 definition found\n\nFrom WordNet (r) 3.0 (2006) &#91;wn]:\n\n  suss out\n      v 1: examine so as to determine accuracy, quality, or condition;\n           \"check the brakes\"; \"Check out the engine\" &#91;syn: {check},\n           {check up on}, {look into}, {check out}, {suss out}, {check\n           over}, {go over}, {check into}]<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I upgraded to Fedora 41 as soon as it became available about a month ago. Most things worked<\/p>\n","protected":false},"author":2,"featured_media":3282,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-8670","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"modified_by":"David Both","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8670"}],"version-history":[{"count":13,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8670\/revisions"}],"predecessor-version":[{"id":8761,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/8670\/revisions\/8761"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/3282"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}