Xterm tips to make this simple terminal emulator even better.

Posted: January 18, 2013. At: 8:46 PM. This was 5 years ago. Post ID: 5203
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.

Setting the font in Xterm.
Setting the font in Xterm.

The xterm terminal emulator has quite a lot of features that make it a very good alternative to the Gnome terminal and Konsole terminal emulators. You can select a font for the terminal window by holding the Ctrl key and pressing the right mouse button. This pops up a menu that allows you to set various font properties. The left mouse button will pop up a menu that allows you to set other properties to configure the xterm terminal emulator. Xterm is the default terminal emulator that is supplied with the Xorg windowing server. There is also the ability to configure the look and feel of Xterm with the ~/.Xdefaults file. This is further explained here: http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.baseadmn/doc/baseadmndita/xdefaults_file.htm. An example that specifically mentions Xterm may be found here; this allows setting up the fonts and sizes as well as the colors in the ~/.Xdefaults file so that they are loaded every time you start Xorg. This file also allows you to configure the Emacs text editor with custom colors when it is running under Xorg.

Nowadays though the ~/.Xresources file should be used instead. Here is an example of a typical ~/.Xresources file for a Linux computer. I tried the .Xdefaults file on a modern Linux Mint 14 computer and it still works; but the .Xresources file is a better idea when you want to set various properties of Xterm and Emacs for your own personalized Xorg session.

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

Read more about the ~/.Xresources file here: https://wiki.archlinux.org/index.php/X_resources.

Setting other Xterm properties.
Setting other Xterm properties.

In other news; I was just using Window maker with dual monitors and it works perfectly. The desktop is spanned perfectly across both screens and the whole thing is very usable and sleek as Windowmaker always is. So that is another good window manager that works with dual monitors. With a nice ~/.Xresources file you can have full control over the look and feel of your Xterm terminal emulator and other Xorg software. There is another page here that has even more information about the Xresources file. There is a sample .Xresources file here: http://mikhailian.mova.org/xresources. The code is not displayed properly though; so I am reproducing it here.

! default system font
!*font: -*-serenetypewriter-medium-r-*-*-12-*-*-*-*-*-iso10646-1
!*font: -misc-*-medium-r-normal-*-14-*-*-*-*-*-iso10646-1
!font: -*-terminus-medium-r-*-*-*-*-*-*-*-*-iso10646-1
*font: -*-clean-*-r-*-*-*-*-*-*-*-*-iso10646-1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! emacs !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Emacs*bitmapIcon: on
Emacs*background: white
Emacs.Paned.XlwMenu.height: 18
Emacs*pane*menubar*font: fixed
Emacs*pane*menubar*foreground: DarkSlateBlue
Emacs*pane*menubar*shadowThickness: 1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! xterm !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! make exclamation mark, percent sign, dash, period, slash, ampersand and
! cyrillic letters to be selected with double click
XTerm*CharClass: 33:48,37:48,45-47:48,58:48,64:48,126:48,161-255:48
!XTerm*font: -*-fixed-medium-r-*-*-13-*-*-*-*-*-iso10646-1
!XTerm*font: -*-serenetypewriter-medium-r-*-*-12-*-*-*-*-*-iso10646-1
!XTerm*font: -misc-*-medium-r-normal-*-14-*-*-*-*-*-iso10646-1
!XTerm*font: -*-terminus-medium-r-*-*-*-*-*-*-*-*-iso10646-1
XTerm*font: -*-terminus-medium-r-*-*-16-*-*-*-*-*-iso10646-*
!XTerm*font: -*-terminus-medium-*-*-*-*-*-*-*-*-*-iso10646-1
!Xterm*font: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1
XTerm*utf8: 1
XTerm*WideChars: 0
XTerm*background: Black
XTerm*foreground: gray90
XTerm*geometry: 80x25
! Colour for the bold attribute
XTerm*VT100*colorBDMode: on
XTerm*VT100*colorBD: purple
! Colour for underline attribute
XTerm*VT100*colorULMode: on
XTerm*VT100*italicULMode: on
XTerm*VT100*underLine: on
XTerm*VT100*colorUL: red
XTerm*VT100*numLock: false
! Turn on colour mode in your xterms
XTerm.VT100*dynamicColors: On
! Number of lines of scrollback to save
XTerm*saveLines: 4096
! Do not clear the screen after the program exits
XTerm*VT100*titeInhibit: true
! Blink instead of beeping
*visualBell: True
! Make Delete act as C-h
!rxvt.keysym.BackSpace: ^H
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Aterm !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Aterm*transparent: true
Aterm*shading: 30
Aterm*scrollBar: false
Aterm*:backgroundType: cut
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! gvim !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Vim*background: black
!Vim*foreground: lightyellow
!Vim*font: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso10646-1
Vim*font: -*-terminus-medium-*-*-*-*-*-*-*-*-*-iso10646-1
Vim*geometry: 80x35
Vim*menuBackground: black
Vim*menuForeground: moccasin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! xscreensaver !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Time out after 10 minutes, cycle mode after each 2
xscreensaver.timeout: 10
xscreensaver.cycle: 5
! Run very low priority, and fade between modes
xscreensaver.nice: 12
xscreensaver.fadeSeconds: 2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! XClock !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!XClock*geometry: 57x57+3+63
!XClock*foreground: DarkSlateGray
!XClock*reverseVideo: true
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! XLoad !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!XLoad*showLabel: false
!XLoad*reverseVideo: true
!XLoad*Paned*StripChart*foreground: DarkSlateGray
!XLoad*Paned*Label*font: fixed
!XLoad*Paned*Label*foreground: Orange
!XLoad*geometry: 57x57+3+125
!XLoad*borderWidth: 0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Xosview !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!xosview*geometry: 57x114+3+187
!xosview*reverseVideo: true
!xosview*foreground: Orange
!xosview*background: black
!xosview*font: 5x7
!xosview*labels: false
!xosview*usedlabels: True
!alicq.geometry: 150x375-0+150
!Alicq*font: -misc-*-medium-r-normal-*-10-*-*-*-*-*-iso10646-1
!wish*font: -misc-*-medium-r-normal-*-10-*-*-*-*-*-iso10646-1
!tkabber*font: -misc-*-medium-r-normal-*-10-*-*-*-*-*-iso10646-1
!gimp*font: -misc-*-medium-r-normal-*-10-*-*-*-*-*-iso10646-1
!Alicq*Text.font: -*-fixed-medium-*-*-*-12-*-*-*-*-*-iso10646-1
!Alicq*Entry.font: -*-fixed-medium-*-*-*-12-*-*-*-*-*-iso10646-1
!Mozilla-bin*geometry: 924x668-50+50
!XDvi.expert: true
!Wmgtemp*geometry: 57x114+3+187

No comments have been made. Use this form to start the conversation :)

Leave a Reply