I configured my xterm using the CTRL-MiddleClick
and CTRL-RightClick
. Is there a way to export save these settings?

- 829,060

- 409
3 Answers
Use editres
You cannot save what you configured through XTerm's own menu. BUT, XTerm is a well behaved X application and as such it supports the editres protocol. So what you should do is:
- Launch XTerm
- Launch editres
- Use the 'Get Tree' command of editres to get the Xt widgets tree of the XTerm (you simply click on the XTerm)
- Select the 'vt100' widget and click on 'Show resource box'
- Look at the bottom of the resource box, you may have to resize it, and set the 'Save File' filename
- Click on the wanted resources and set their values
- When done, click the 'Save file' button and quit editres
The save file can now appended to your .Xdefaults.
Example of what I got by this procedure:
.xterm.vt100.utf8: true
.xterm.vt100.utf8Fonts: true
.xterm.vt100.utf8Title: true
.xterm.vt100.vt100Graphics: true
.xterm.vt100.dynamicColors: true
.xterm.vt100.reverseVideo: true
.xterm.vt100.rightScrollBar: true
.xterm.vt100.scrollBar: true
.xterm.vt100.colorRVMode: true
Beware, some options take effects only when some other option changes. For instance: rightScrollBar is looked up by Xterm only when scrollBar changed from false to true.
But all in all you should have the possibility to do the configuration you want.
Links:

- 181
I don't think you can save settings of a running Xterm to a file. Xterm settings are specified via X resources. Each of the entries in the menu corresponds to a resource. The manual lists the available resources. Near the end of the resource section, you'll find a description of the menus, and for each menu entry, a description of the action it invokes; and for each action, the manual indicates what it does, which can be to modify a setting controlled by a resource.
When your X session starts, resources are loaded from ~/.Xdefaults
. You can reload the file at any time by running
xrdb -merge ~/.Xdefaults
For example, to enable the blinking cursor and allow applications to change the window title, put this in ~/.Xdefaults
:
XTerm.VT100.allowTitleOps: true
XTerm.VT100.blink: true

- 829,060
You can also use X11's appres
utility. For your case, you want to query the the XTerm
class, or more specifically the VT100
class.
appres XTerm
Or
appres VT100
Both commands will output values in the same format as .Xresources
uses.
Redirect/pipe to a file to save them.
appres VT100 | tee VT100resources.txt

- 156
xrdb -query
, but that shows the default settings applied when XTerm starts, not the current settings of an XTerm window. – Gilles 'SO- stop being evil' Nov 26 '12 at 18:13