{"id":14610,"date":"2026-09-21T01:00:00","date_gmt":"2026-09-21T05:00:00","guid":{"rendered":"https:\/\/www.both.org\/?p=14610"},"modified":"2026-09-04T12:23:52","modified_gmt":"2026-09-04T16:23:52","slug":"whats-old-is-new-again-xterm-on-modern-linux","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=14610","title":{"rendered":"What\u2019s old is new again: XTerm on modern Linux"},"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=\"14610\" 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 class=\"wp-block-paragraph\">I got my start with Unix on a Sun Microsystems 3\/50 workstation, running the TWM window manager for the X Window system. Back then, <em>X Window system<\/em> was just a way to display graphics on a Unix system, and a <em>window manager<\/em> did the hard work of tracking windows and letting switch which was the \u201cactive\u201d window.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">TWM was pretty basic, but it did the job, and I was glad to have it. I was pleased to find TWM on my <a href=\"https:\/\/www.both.org\/?p=11375\">first Linux system<\/a> in 1993.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"540\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2025\/08\/sls-twm.png\" alt=\"TWM in SLS Linux\" class=\"wp-image-11391\"\/><figcaption class=\"wp-element-caption\">TWM with default colors<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That window in the lower-left is XTerm, the X Window terminal emulator. And it may be hard to believe, but XTerm is still around in 2026.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modern XTerm<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The current XTerm is maintained by <a href=\"https:\/\/invisible-island.net\/xterm\/\">Thomas E. Dickey<\/a>, who has worked on XTerm since 1995. The <em>xterm<\/em>(1) man page mentions \u201cJune 2022\u201d so it was updated at least that recently. Although in practice, XTerm is an old program with a long history of development, so there\u2019s probably not much need to update it. XTerm in 2026 looks and acts pretty much like XTerm in the 1990s.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I rediscovered XTerm because my desktop is Xfce, and there\u2019s a menu item to launch XTerm under the \u201cSystem\u201d menu:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"515\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/09\/xterm-menu.png\" alt=\"a menu showing a list of system applications; xterm is at the bottom\" class=\"wp-image-14607\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you launch XTerm using the menu, you\u2019ll see XTerm looking pretty much like it did in the 1990s. The gray bar on the left is actually the scroll bar:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"350\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/09\/xterm.png\" alt=\"a terminal prompt with black text and a white background\" class=\"wp-image-14603\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">XTerm dates back to the earliest versions of the X Window system, so it doesn\u2019t have menus like you\u2019d find in modern desktops. Instead, you activate menus by holding the Ctrl key on your keyboard and clicking in XTerm with your mouse. Each presents different menus:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ctrl+left<\/strong> has the \u201cmain options\u201d that allow you to configure XTerm in different ways, such as logging, generating screen dumps, and configuring the function keys.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"679\" height=\"509\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/09\/xterm-ctrl-left.png\" alt=\"a menu displayed in black and white over a plain terminal\" class=\"wp-image-14604\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ctrl+middle<\/strong> controls the virtual terminal options, including visual bell (\u201cflash\u201d the screen instead of making a beep).<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"633\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/09\/xterm-ctrl-mid.png\" alt=\"a menu displayed in black and white over a plain terminal\" class=\"wp-image-14605\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ctrl+right<\/strong> sets the fonts, such as the font size (from \u201cunreadable\u201d to \u201cenormous\u201d) and supporting TrueType fonts.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"679\" height=\"509\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/09\/xterm-ctrl-right.png\" alt=\"a menu displayed in black and white over a plain terminal\" class=\"wp-image-14606\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The \u201cTek\u201d mode in the Ctrl+middle menu was a neat feature. \u201cClassic\u201d XTerm from the early 1990s emulated the <a href=\"https:\/\/en.wikipedia.org\/wiki\/VT100#Variants\">VT102<\/a> terminal, which was a variant of the venerable DEC VT100. From the mid 1990s until 2012, XTerm preferred the terminal description that matched the <a href=\"https:\/\/en.wikipedia.org\/wiki\/VT220\">VT220<\/a> terminal. Since then, XTerm prefers the <a href=\"https:\/\/en.wikipedia.org\/wiki\/VT420\">VT420<\/a>. The \u201cVT\u201d terminals were all text-based terminals, but another popular terminal was the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tektronix_4010\">Tektronix 40xx<\/a> series, such as the 4010 and 4014. These terminals were made by Tektronix, also known for their <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tektronix_analog_oscilloscopes\">oscilliscopes<\/a>, so it\u2019s probably not surprising that the 40xx terminals could provide graphics that were similar in quality to an oscilliscope: monochrome and line-based.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But these simple graphics made it <em>so easy<\/em> to do certain things, such as preview lab data. I used to do that all the time when I was an undergraduate physics student; <a href=\"https:\/\/www.both.org\/?p=14522\">gnuplot<\/a> supported various \u201cterminal\u201d output types, including Tektronix. This meant you could display charts <em>right at the terminal<\/em>. And with XTerm\u2019s \u201cTek\u201d emulation, you could do charts inside XTerm:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"603\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/09\/xterm-tek.png\" alt=\"a sine wave displayed in black and white\" class=\"wp-image-14609\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Making XTerm more readable<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I wanted to explore XTerm again, but I had to admit that the fonts were just <em>ugly<\/em> to my modern eyes. I\u2019m too used to TrueType fonts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fortunately, XTerm supports TrueType fonts using the <code>-fa<\/code> command line option, and font size using the <code>-fs<\/code> option. For example, you can start XTerm with Liberation Mono 24-point with this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ xterm -fa 'Liberation Mono' -fs 24<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can also set the text colors, using <code>-bg<\/code> to set the background color and <code>-fg<\/code> to set the text color (\u201cforeground\u201d color). For example, you could start XTerm with a light blue background and dark blue text using this command line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ xterm -bg ghostwhite -fg midnightblue<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But every time I launched XTerm using the Xfce menu, it used the defaults. You\u2019ll notice from the above screenshots that there\u2019s no way to \u201csave\u201d your preferences; XTerm always starts up with the defaults. I don\u2019t mind black text, but I wanted an off-white background color so it wasn\u2019t so glaring. And I preferred to use my favorite monospace font, <a href=\"https:\/\/github.com\/IBM\/plex\">IBM Plex Mono<\/a>, which has a style similar to the original IBM Selectric typewriter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then I remembered that the X Window system from the 1990s provided an \u201cX Resources\u201d database, which you could set via a plain text file named <code>.Xresources<\/code> in your home directory. This file uses <strong>key<\/strong>:<em>value<\/em> pairs, which are case sensitive, separated with a colon. You can find the X Resources for XTerm in the <em>xterm<\/em>(1) man page, but the values I needed were <code>faceName<\/code>, <code>faceSize<\/code> and <code>background<\/code> to set the font, font size, and background color. I also added <code>scrollBar<\/code> to disable the scroll bar. I created this <code>~\/.Xresources<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>XTerm*faceName: IBM Plex Mono\nXTerm*faceSize: 14\nXTerm*background: floralwhite\nXTerm*scrollBar: false<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But even after creating this file, XTerm will still use its defaults. That\u2019s because the X Resources are only initialized when X starts up. To merge the new <code>.Xresources<\/code> values into the running X Resources database, you need to run the <strong>xrdb<\/strong> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ xrdb -merge ~\/.Xresources<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And with that, whenever I launch XTerm using the Xfce menu, I get the right font, at the correct size, with an off-white background color, and no scroll bar:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"662\" src=\"http:\/\/www.both.org\/wp-content\/uploads\/2026\/09\/xterm-new.png\" alt=\"a terminal prompt with black text and an off-white background\" class=\"wp-image-14608\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Try this classic terminal on your modern Linux system.<\/p>\n","protected":false},"author":33,"featured_media":4464,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[100,5],"tags":[104,91],"class_list":["post-14610","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-line","category-linux","tag-command-line","tag-linux"],"modified_by":"Jim Hall","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14610","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\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14610"}],"version-history":[{"count":2,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14610\/revisions"}],"predecessor-version":[{"id":14612,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14610\/revisions\/14612"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/4464"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}