twm on CentOS 7

NOTE: An observant reader advised me that the “X Window System” is no longer available for CentOS/RHEL 7 (and might not be for CentOS/RHEL 6). A workaround is incorporated below.

I’ve been using twm as my basic window manager for remote vnc sessions on Red Hat Linux machines for almost a decade, and saw no reason to change that even though the latest release of CentOS (following its upstream source, Red Hat Enterprise Linux 7), inexplicably omits the xorg-x11-twm package.

Two important things to understand about twm: (1) it’s no longer under development and so remains, perpetually, pinned to version 1.0.3; (2) it consists of a single executable dependent on libraries that ship with the standard xorg distribution of x11. As a result, it turns out that the twm binary from the latest CentOS 6 package, xorg-x11-twm-1.0.3-5.1.el6, works just fine on CentOS 7.

If you’re interested in running a minimal X system like mine, you’ll need to install some additional packages. At a minimum you’ll need the following:


Mext, download and install xorg-x11-twm from your favorite CentOS 6 mirror:

rpm -ivh --nodeps xorg-x11-twm-1.0.3-5.1.el6.x86_64.rpm

For maximum flexibility you can add the following CentOS 7 packages if they’re not already installed (some older apps may need these):


Finally, to avoid getting the font load error that is the result of modern Linux system’s use of UTF-8, use this modified xstartup under .vnc (be sure to back up the original):

# Simplified vnc x session
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid '#222E45' 
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
LANG=C twm &

The key here is to set “LANG=C”, so that the UTF-8 intolerant code in twm won’t throw a fit.

This entry was posted in System Administration on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).