How to change font size when using "open console in qube"?

I changed the font size in xterm for default-dvm and default-mgmt-dvm, but those changes didn’t propagate to the terminal opened via open console in qube. I tried restarting the whole computer after making the font size changes changes too. The xterm font stayed the new size in default-dvm and default-mgmt-dvm after the restart, but they still didn’t propagate to the open console in qube. I suspect the problem is related to the console being vt220 (can be verified by running echo $TERM). Alternatively I fundamentally don’t understand how the console interacts with the VM it was opened in.

I had originally assumed the open console in qube was xterm because it looks the same as the default terminal on minimal xfce templates. But it doesn’t behave like xterm when I try to configure it…

There might be something wrong with how you changed the font size. Please provide details.

When you edited /.Xresources in default-mgmt-dvm and ran # xrdb -merge ~/.Xresources you would for sure get your customization applied in console logs.

At least it worked for me.

Looks like the mistake was on my end. Before posting more troubleshooting details I double checked my past steps, including going back and editing ~/.Xresources and running xrdb -merge ~/.Xresources in the default-mgmt-dvm vm. Once I did that, the fonts changed size as expected. Seems that I either edited ~/.Xresources in the wrong qube, or I misstyped a command and didn’t see it throw an error or something.

Sorry for the false alarm. :sweat_smile:

@pypy Any chance you could type up the steps you made? I’d just love to do they same in all instances I use xterm. That default font size really bugs me.

From a dom0 terminal run qvm-run default-mgmt-dvm xterm. This will open xterm in the default-mgmt-dvm vm. In the default-mgmt-dvm vm xterm window, navigate to /home/user/ and make a file called .Xresources if it isn’t already there. Edit the file to have have the following.

XTerm*renderFont: True
XTerm*faceName: Monospace
xterm*faceSize: 12

xterm*faceSize: can be customized to whatever font size you prefer.

The white space after the : should be a tab, not a spacebar space (but IDK how to show tabs using this forum’s default formatting…).

Also, there seem to be unusual rules around capital vs lower case letters, so XTerm*faceName may not be equivalent to xterm*faceName.

Save the file, and exit back to xterm command line in default-mgmt-dvm.

Then run xrdb -merge .Xresources. This tell xterm to update to use whatever changes you made to the .Xresources file. The next xterm you open in default-mgmt-dvm should have fonts that are the size you want.

If you want, you can repeat the process for the root user. You can use sudo -i from xterm in default-mgmt-dvm to become root. Then you would edit the .Xresources file in the /root directory, before running xrdb -merge .Xresources

Strictly speaking, IDK if

XTerm*renderFont: True
XTerm*faceName: Monospace

are needed to change the font size, but it shows up in lots of examples online.

Here are some other useful things you can customize in the .Xresources file if you want to change colors in addition to sizes.

XTerm.vt100.foreground:
XTerm.vt100.background:
XTerm*scrollbar.background:
XTerm*scrollbar.foreground:

You can set colors with words like black or green, or you can use rgb format which is rgb:00/00/00. Again, the space after : is a tab, not a spacebar space.

There are many more things that can be added or changed in .Xresources file. But you can get a lot of mileage from being able to set font sizes, font colors, background colors, and scrollbar colors.

Hope this is helpful!

I very much appreciate you writing this post @pypy. At first I couldn’t get the changes to stick, so I made a couple of changes and all went well. Plus, I found some other tips to add.

I don’t know if these are significant ,or that my first edit was a brain-fart on my part, but since some point are case sensitive my edit to .Xresources was

xterm*renderFont: true
xterm*faceName: monospace
xterm*faceSize: 12

With the TAB spacing you mention.

To add:

To view the edits made (after merge):

xterm &

To check all parameters:

appres XTerm xterm

In addition, I found the font size can be changed:

In the xterm window, press and hold Ctrl + click the right mouse button. You can change the font size from the xterm menu. Holy cow, that menu is new to me!

Every day is a school day.

My eyes are very grateful for your post. :slightly_smiling_face:

Maybe you are interested in:

XTerm*selectToClipboard: true

but that could be security unwise. I use it mostly in templates.