6

On X window system (TWM) of my Ubuntu 12.04, xterm has width of 484 pixel and height of 316 pixel, and its geometry is 80x24, based on xwininfo.

On X window system (TWM) of my LFS 7.9, xterm has with of 644 pixel and height of 388 pixel, and its geometry is 80x24, based on xwininfo.

How can I configure xterm of LFS 7.9 so that its width by height size can be like Ubuntu 12.04? I like how Ubuntu xterm looks.

2 Answers 2

5

An XTerm's size is determined by the number of characters its displaying, the font it is using, and the size of the window manager decorations (title bar, outlines, etc.).

You're probably using a different (larger) font on LFS. Ubuntu's xterm settings are probably in /etc/X11/app-defaults/{XTerm,XTerm-color} (at least that's where they are in Debian). You could copy them over, or at least the settings you want. [BTW: If you're not aware, XTerm has multiple fonts you can switch to via ControlRightClick and ControlShiftKeypad +/- (all bindings configurable).

You can also do that on a per-user basis in your ~/.Xresources file and with xrdb.

If you want to know what all the settings in the XTerm app-defaults mean, the xterm manpage actually documents them thoroughly.

2
  • Can you please provide an example of how to translate from the xterm manpage to the ~/.Xresources file or to the app-defaults/XTerm file? It's not clear to me how to do that. Thanks! Commented Sep 29, 2018 at 15:15
  • @AdrianKeister that would probably be better asked as a new question, along with details (e.g., which settings in particular). Commented Sep 29, 2018 at 16:21
0

I was trying to resize and reposition my xterm terminal based on pixels as well. The solution I found was using this:

Reposition and Resize using pixels

So what you do is when you're calling xterm, you provide a title to it for example:

xterm -T "My XTerm" 

Then using xdotool you find the Window ID:

xdotool search --onlyvisible --name "My XTerm" 

You use the Window ID to set the size:

xdotool windowsize $WINDOW_ID_GOES_HERE $WIDTH $HEIGHT 

And to reposition:

xdotool windowmove $WINDOW_ID_GOES_HERE $X $Y 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.