20080211 twm on red hat enterprise and elsewhere - plembo/onemoretech GitHub Wiki

title: twm on Red Hat Enterprise (and elsewhere) link: https://onemoretech.wordpress.com/2008/02/11/twm-on-red-hat-enterprise-and-elsewhere/ author: lembobro description: post_id: 560 created: 2008/02/11 21:01:20 created_gmt: 2008/02/11 21:01:20 comment_status: open post_name: twm-on-red-hat-enterprise-and-elsewhere status: publish post_type: post

twm on Red Hat Enterprise (and elsewhere)

OK. So I just can’t stand it anymore.

Working on a full bore Oracle ERP rollout is aggravating enough without having to deal with the constant brain-dead “drag and place the window” behavior of twm on Red Hat Enterprise Linux (RHEL).

On a big project where multiple sysadmins are all circling around a system like buzzards over some poor dying animal, one way to get everyone “on the same page” is put them all on the same display. For that, VNC is the absolute greatest thing since sliced bread (a small cultural note: when I was growning up I actually thought the bread we got around the corner from my grandparents house in Astora was the best — and it was very definitely not sliced).

The only problem with doing a VNC session on RHEL is that it uses the very ancient twm window manager. Designed to run on a minimum of memory and CPU (some later window managers like Blackbox actually use fewer resources, as does a twm successor, FVWM), it has a minimum of features. One thing that’s turned off by default is automatic placement of windows, which requires that the operator manually place every new window after it opens.

After 6 months of doing that I finally fired up the man page for twm and dug out the fix I’d used over 7 years ago when running twm on FreeBSD as my primary desktop.

Basically all you need to do is copy /etc/X11/twm/system.twmrc to the home directory of the user invoking vncserver, rename it .twmrc and then add a single line to it:

RandomPlacement

In my case I stuck this directive right after the lines that defined what fonts the system should use.

Once I was done, I killed the vnc server process and then invoked it again. From that point on any new window that got opened was randomly placed on the desktop without further intervention from me.

I feel better now.

Copyright 2004-2019 Phil Lembo