Saturday, September 23, 2023

Installing the Ted word processor in modern Linux

So one day, I'd installed Debian 11 in Windows 11 using Windows Subsystem for Linux (WSL). This one is a separate ordeal, and today I discovered, that the install even included LibreOffice, which I didn't think I needed to download and install, as I have the same package on Windows already.

Installing a small word processor program ontop of an installation of Debian running atop WSL in Windows 11 is perhaps a form of overkill in terms of memory and storage requirements, since WordPad itself is still present, and Windows-native small-footprint open source word processors exist, too; one of them being the fabled AbiWord. But Linux in Windows is very much another story.

WSL did make it possible for me to investigate how to install Ted in modern Debian, as a proof of concept. — without having to use a LiveCD/LiveUSB variant of Linux, and without the opportunity to use either. One of the reasons was, that the hardware is a modern notebook computer able to run Windows 11; this laptop does not have an internal optical drive, and I don't have any form of external storage that I could use to run a LiveUSB variant of Linux.

Contents

About Ted

Ted is a simple Linux-based word processor for RTF documents, and its history goes back to November 1998 or even earlier; version 2.0 of the program was released on 9 November 1998.

Ted is more advanced than any plain text editor, such as Notepad or Nano, very roughly equivalent to — and often more advanced than WordPad, and more basic than AbiWord.

Compared to WordPad, Ted includes more formatting capabilities, spell-checking functionality, and can export files into HTML, EML (HTML mail message), EPUB, PostScript, and PDF formats. It can only open plain text files and RTF files. Ted 2.23 introduced a basic autosave function to help recover files in the event the app suddenly exits.

AbiWord, OTOH, is more advanced, and comparable to the word processing component of Microsoft Works. AbiWord can open, save, and export a greater amount of document formats; it has a proper toolbar, page zoom, and plugin support, spelling and grammar checking, the highlighting of misspelled words; document annotations, revisions, and versioning, and collaboration functionality. The last AbiWord release for Windows is v. 2.9.4 (from 25 November 2012), and remains available for download.

Ted is one of the most fitting Unix/Linux word processing programs for really old computers: its storage requirements are small, and its memory footprint low. I remember in 2005, I could launch it relatively quickly in a 120 MHz computer with Debian 3.0 and just 32 MB of RAM.

The installed size of Ted is 9.76 Mb, while the installed size of AbiWord is roughly 25 Mb. Ted is one of the smallest word processing programs for Linux. In terms of size, it would be competing with Pathetic Writer of Siag Office.

There can be instances, when Ted might crash, such as when quickly browsing through different fonts in the fonts dialog, so take care to save your work regularly.

The latest version of Ted is 2.23, dated 4 February 2013, and its installers are available at the Ted homepage.

Pick your architecture

Given the 64-bit nature of Windows 11, Debian over WSL is also 64-bit. The architecture in use is usually called amd64, even if the CPU in a consumer-grade computer was made by Intel or VIA. 64-bit Ted is available as ted-2.23-amd64.deb.
IA-64, aka Itanium, is Intel's own in-house 64-bit architecture, which is incompatible with AMD64. IA-64 should not be confused with Intel 64 or EM64T, as these two are the names of Intel's implementation of the AMD64 architecture. IA-64 has been discontinued. Its chips have always had niche uses, and they're not found in most PCs.

Installers of Ted for other architectures and operating systems, its language packs, and spelling dictionaries are available at the official Ted FTP directory here.

Required dependencies for Ted

The main problem is, that Ted has several old dependencies that are not available in any modern version of Debian, as Ted has not been maintained since 2013. The .deb packages must each be downloaded and installed separately.

Installation goes with dpkg in the command line. For the sake of simplicity, make sure the current folder is the same where the downloaded .deb packages are located.

$ sudo dpkg -i packagename.deb

Install packages in roughly this order:
Package Download link Download page Notes / From
multiarch-support multiarch-support_2.28-10+deb10u2_amd64.deb Package page / AMD64 package download page Install this package before anything else.

Debian 10 Update 2 (Buster)
libjpeg8 libjpeg8_8d-1+deb7u1_amd64.deb Debian archive Debian 7 Update 1 (Wheezy)
libpng12 libpng12-0_1.2.49-1+deb7u2_amd64.deb Debian archive Debian 7 Update 2 (Wheezy)
libtiff4 libtiff4_3.9.4-5+squeeze10_amd64.deb Debian archive Debian 6 Squeeze

Then install ted-2.23-amd64.deb.

After installation has completed, the shortcut to Ted should be visible in:

Start Menu > All Apps > Debian > "Ted rtf text processor (Debian)", with a dedicated icon. The shortcut can then be pinned to Start or the taskbar.

Subsequent to that, a spelling dictionary can be installed. Their .deb filenames use this naming format: ted_en_GB-2.23.all.deb. Make sure Ted is closed when installing dictionaries.

Finding out what dependencies to install for old or obscure packages in Debian.

I had actually used dpkg to try to install Ted first, not knowing what the dependencies were, and dpkg had promptly informed me what the required packages were. The installation was not finalised because of the missing packages.

apt-get install required_packagename did not help, as the package list for Debian 11 did not contain the names of those old packages.

The Debian installation also includes the Synaptic package manager front-end. I couldn't activate it through the start menu, but could launch it from the Debian command line:

$ synaptic &

This starts Synaptic without administrative privileges. That's just enough to find out information.

In Synaptic:
  1. click on "Status" in the bottom left section > then click on Installed in the top left page.
  2. The list to the right shows the list of all installed packages.
  3. Click into the list to focus into it.
  4. Type ted to search for the package.
  5. If the install failed or did not finalise, the package is marked with red.
  6. Right-click Ted, select Properties
  7. In the Properties window, click on the Dependencies tab.
  8. The Dependencies tab is self-explanatory, and lists all the packages required for a program, component, or package to work.
  9. Packages listed in italics are missing from the system. This should inform users as to which packages to look for on the web.

Configuring user interface font sizes

Graphical apps installed with Debian over WSL by default have small font sizes, as they don't recognise Windows scaling settings. On my computer, very nearly all display elements are scaled to 150% in Windows, which Debian are unaware of.

Fortunately, there are two configuration programs that can fix that.

One is xfce4-appearance-settings. In Application Finder, it's listed under Settings > Appearance, but fails to launch from there. It does launch from the command line:

$ xfce4-appearance-settings &

There, it's easy to change the look and feel of most graphical programs; the most important would be the font size.

But Ted is an older program, so it requires the installation of gtk-chtheme, which is a front-end to change GTK+ 2.0 themes.

gtk-chtheme can be installed that way from the command line:

$ apt-get-install gtk-chtheme

or by launching Synaptic as sudo from the command line:

$ sudo synaptic
On invoking a command with sudo, you may be prompted to enter a password.

In Synaptic:
  1. Click the Search button, enter gtk-chtheme in the Find dialog, click Search or press Enter.
  2. gtk-chtheme should be listed in the results >
  3. Right-click on the gtk-chtheme package, select "Mark for Installation."
  4. Click Apply in the toolbar > review information in the Summary window. It contains details about what packages would be installed. > Click Apply.
  5. Once you get the 'Changes applied' window, it should be safe to close it, and quit Synaptic.
Subsequent to the installation, a "Gtk-ChTheme (Debian)" item will appear in the Debian folder in the All apps section of the Windows Start menu, and it can be launched from there. Its user interface is similar to xfce4-appearance-settings. Changing the font size to 14 pixels or greater should improve the legibility of menus and most other user interface items in Ted. Themes can be changed, too, from light to dark.

Ted 2.23 showing the prologue of "Romeo and Juliet" formatted on a B6-sized page.

No comments: