Posted: . At: 12:03 PM. This was 1 year ago. Post ID: 17363
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Some very useful Xterm tips for using this venerable terminal emulator in 2023.


Xterm is a very useful terminal emulator. There are a few useful menus that may be accessed to change various options in the Xterm window. Hold the left mouse button and the Control key on the keyboard to access the first menu. This is to do with function keys and sending various signals to the terminal emulator. Holding Control and the left mouse button, navigate to the “Print all immediately” option and the text in the terminal emulator will be saved to a date-stamped file. This is useful for saving any output of commands you do not want to lose.

An Xterm window with the Main Options menu open.
The first useful Xterm menu.

The next Xterm menu is to do with the look and feel of the Xterm window.

An Xterm window with the VT Options menu open on Linux.
The next very useful Xterm menu. Hold the Control key and middle mouse button to access.

And the final menu. This controls the look of the Xterm fonts. Hold Control and right mouse button to access this.

An Xterm window with the VT Fonts menu open.
Change the Xterm font options here.

To reset the Xterm window, press and hold left Alt and then press the middle mouse button. The 2nd menu has the option to show a Tek window, click this and hold Control and press the middle mouse button to show the Tektronix window options.

Xterm window with the Tektronix window open as well.
Xterm with the Tektronix window open as well showing the Tektronix window options.

Load a new Xterm window with this command.

xterm -sb &

This will create an Xterm window with a scrollbar. That would be very useful indeed.

And set the foreground and background colours like this. This also sets the colour of the cursor.

(base) jason@jason-Lenovo-H50-55:~$ xterm -sb -fg DarkSlateGrey -bg Teal -cr LightBlue

Create the file ~/.Xdefaults and put this in it.

xterm*Scrollbar.thickness: 15
xterm*Scrollbar.thumb: None
xterm*Scrollbar.foreground: Teal
xterm*Scrollbar.background: DarkSlateGrey
xterm*Scrollbar.borderWidth: 7
xterm*ScrollBarBorder: 1

This will set the colour of the Xterm scrollbar. Run this command to load the new defaults.

(base) jason@jason-Lenovo-H50-55:~$ xrdb .Xdefaults

And here are even more settings for the Xterm in the ~/.Xdefaults file. This will put the scrollbar on the right and also colour the terminal with a dark colour scheme.

xterm*Scrollbar.thickness: 15
xterm*Scrollbar.thumb: None
xterm*Scrollbar.foreground: Teal
xterm*Scrollbar.background: DarkSlateGrey
xterm*Scrollbar.borderWidth: 7
xterm*ScrollBarBorder: 1
xterm*geometry: 80x25
xterm*faceName: terminus:bold:pixelsize=14
!xterm*font: -*-dina-medium-r-*-*-16-*-*-*-*-*-*-*
xterm*dynamicColors: true
xterm*utf8: 2
xterm*eightBitInput: true
xterm*saveLines: 512
xterm*scrollKey: true
xterm*scrollTtyOutput: false
xterm*scrollBar: true
xterm*rightScrollBar: true
xterm*jumpScroll: true
xterm*multiScroll: true
xterm*toolBar: false
XTerm*background: black
XTerm*foreground: gray
XTerm*title: terminal
XTerm*saveLines: 1024

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.