Incus terminal emulator scaling problems

Edit: Actually issue is not solved. I get the same issue on build. I will dig into more of this.

So, what is odd is the arch linux package works just fine. However, no matter where I try it on, or what image I use, for some reason when I execute incus exec mycontainer -- login it uses the /dev/pts/1 terminal in the container and everything works properly specifically scaling without a problem. When I execute incus console mycontainer on the other hand it uses /dev/console as the terminal which this has the scaling issues. It isn’t that big of a deal, but hey, glad I found a solution.

So that’s normal, incus console doesn’t spawn a command that we control, it just attaches to the serial console of the instance.

This is a normal serial link, while Incus knows about your window size and sends it to the server, we can’t actually resize a serial console, you’ll notice the same if you connect to some embedded device or switch or something over a serial link, resizing your terminal, while it may send the appropriate signal to the driver, will not lead to the “physical” terminal size changing on the remote device.

In general, incus console is only really useful to see early boot messages, it shouldn’t be used day to day to interact with instances as it’s a single serial console (can’t run multiple incus console and get different sessions) and it’s also attached to a ring buffer for log gathering so everything that’s sent through it is temporarily held in memory and is retrievable over the API, again because it’s really meant to get early boot logs, not day to day interactions.

1 Like

Ah, so it was my fault the entire time. I am so sorry for bothering you with this. Thank you for your help regardless and for this useful information.

Well, I’m glad we figured out what was going on and I’m sure it will be useful for others :wink:


I tried it in an Incus Arch VM, installing Incus in there and launching a container.

As noted above, the differentiating factor was the way to get a shell into the container.

  1. incus exec mycontainer -- sudo -l ubuntu: It’s good, TUI applications scale properly.
  2. ssh ubuntu@mycontainer.incus: It’s good, TUI applications scale properly.
  3. incus console mycontainer: Not good, TUI applications do not scale properly. TUI applications stick to the default 80x25 or something around there.
1 Like