Set default XTerm font and screen size

xrdp xterm default

I’ve been employing the interesting hack to run a single graphical program on my raspberry Pi of installing and running xrdp without having installed a full graphical window manager. When I connect to the rdp session and have my window set to 1920×1080, the terminal window that appears runs in the top left of the session window with no visible borders. If the mouse is over the terminal session the cursor works as expected. If the mouse is over the vast blackness of the rest of the screen, the cursor is a simple X cursor.

It’s never been a huge deal to me because I just run the single command of my graphical program most of the time. I had been looking for a way to configure the terminal to be a specific size based on the RDP session, but it’s not really designed for that.

What I finally found was that if I specify the font and window geometry based on the font, it will create the terminal window appropriately. A bit of trial and error and I came up with the following file in my user directory. One nice feature of this fix is that it’s not modifying any systemwide configuration.

wim@WimPi4:~ $ cat ~/.Xresources 
xterm*faceName: Luxi Mono
xterm*faceSize: 16
xterm*geometry: 147x41

Thanks to this post for giving me the solution.