ArticleslgStudy

computer science

Twm

Twm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Twm rather than just read about it. In short: twm is a window manager for the X Window System. Started in 1987 by Tom LaStrange, it has been the standard window manager for the X Window System since version X11R4.

Twm — main illustration
Twm — illustration

Key takeaways

  • Twm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Twm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Twm from memory before moving on to harder problems.

Reference excerpt

twm is a window manager for the X Window System. Started in 1987 by Tom LaStrange, it has been the standard window manager for the X Window System since version X11R4. The name originally stood for Tom's Window Manager, but the software was renamed Tab Window Manager by the X Consortium when they adopted it in 1989. twm is a stacking window manager that provides title bars, shaped windows, and icon management. It is highly configurable and extensible. twm was a breakthrough achievement in the early years, but has been superseded by other window managers which, unlike twm, use a widget toolkit rather than a combination of the X Toolkit Intrinsics and XRandR. Various other window managers, such as vtwm, tvtwm, CTWM, and FVWM, were derived from twm's source code. twm is still standard with X.Org Server, and is available as part of many X Window System implementations.

Usage

twm's interface differs from modern common X window managers and desktop environments, many of which tend to work similarly to the Apple Macintosh or Microsoft Windows user interfaces. New users often find twm difficult without reading the manual page. In the default configuration of twm, the title bar has two buttons:

Resize button (nested squares): the user clicks here, drags the mouse pointer to the edge to be moved, then releases when the window is the desired size. Iconify button (circle): reduces the window to an icon. There is no title bar button to close a window. A left click on the desktop brings up a menu that includes an option to delete (close) a window. Window close functionality for the titlebar can be configured in the .twmrc file:

See Closing program windows in twm at Wikibooks. A left click on the title bar brings the window to the top of the window stack; a middle click moves the window; a right click sends the window to the bottom of the window stack. Window focus follows the mouse pointer (point-to-focus), rather than being on whichever window was clicked last (click-to-focus). When a new window is created, a 3×3 grid is displayed following the mouse pointer, waiting for the user to click where the window should appear — left-click to appear in that position with that size, middle-click to resize the window before its creation, right-click to appear at that position but long enough vertically to reach the bottom of the screen. Note that any of the above may be modified by updating the configuration file. (The system file is typically /etc/X11/twm/system.twmrc and the user file is typically ~/.twmrc .)

History twm was written as a replacement for the uwm window manager by Tom LaStrange while he was working at Evans & Sutherland, which was part of the X Consortium: "I sat down at my monochrome Sun 3/50 and typed vi twm.c and then opened the X11 documentation. twm was my first X program. About six months later, I convinced my manager to let me send a copy to the comp.windows.x newsgroup for testing." A version for X11R1 was published on the Usenet newsgroup comp.unix.sources on June 13, 1988. Months later, Jim Fulton of the X Consortium (which was at the time part of MIT) approached Evans and Sutherland and asked them to turn over the code maintenance to the X Consortium. Fulton then made it compliant with the nascent Inter-Client Communication Conventions Manual. Subsequently, twm was released as the standard sample window manager for X11R4, replacing uwm. According to Fulton, the word "tab" was chosen because it conveniently started with 'T' and put the emphasis on the squeezing feature window title bars, which made them look like folders with tabs.

Authors twm was originally written by Tom LaStrange. Later contributors include Jim Fulton, Keith Packard, and Dave Sternlicht, all of whom were employees of the X Consortium.

References

External links

Tab Window Manager (xwinman) An Overview of twm (Tom's Window Manager) (PDF) — Tom LaStrange, Xhibition '89 Conference Proceedings — concerning pre-ICCCM versions of twm From the Desktop: Tom LaStrange Speaks!: Talking with a Man Named Tom (Brian Proffitt, LinuxPlanet, Tuesday 6 February 2001)

Illustrations

Twm illustration
Twm: twm with xcalc and xterm, the xterm window being in focus. xclock is iconified.
twm with xcalc and xterm, the xterm window being in focus. xclock is iconified.
Twm: twm menu
twm menu

Worked examples

Example 1 — a first encounter with Twm

Start with the simplest possible case. Write down what Twm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Twm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Twm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Twm

In research
Twm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Twm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Twm is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1987 software, Free X window managers, Free software programmed in C, so understanding it makes those chapters shorter.
In everyday life
Look for Twm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Twm” →

How to study Twm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Twm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Twm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Twm in simple terms?

twm is a window manager for the X Window System. Started in 1987 by Tom LaStrange, it has been the standard window manager for the X Window System since version X11R4.

Why does Twm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Twm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Twm.

Tags

  • 1987 software
  • Free X window managers
  • Free software programmed in C
  • Software using the MIT license

Keep exploring