lxc-start: wrong terminal size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
1. Create a Precise container with the Ubuntu template:
sudo lxc-create -n precise -t ubuntu -- -r precise
2. Start the container with lxc-start:
sudo lxc-start -n precise
The following effects can be observed:
a) Independent of the actual size:
ubuntu@precise:~$ echo $COLUMNS $LINES
80 24
b) Commands like less behave strange if not 80x24.
c) If you type a command that is longer than 80 chars, the cursor jumps to the first column on the same line overwriting the prompt and the command; the ouput of such commands is correct.
If you connect to the container with
sudo lxc-console -n precise
the effects a-c cannot be observed and work as expected.
Expected: containers started with lxc-create should behave like containers connected to with lxc-console
Workaround:
sudo lxc-start -n precise -d
sudo lxc-console -n precise
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lxc 0.7.5-3ubuntu52
ProcVersionSign
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelMo
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
Date: Tue Apr 24 12:46:26 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: lxc
UpgradeStatus: Upgraded to precise on 2012-03-31 (24 days ago)
Thanks for reporting this bug.
Note that you can get 'properly' sized consoles using 'lxc-console'. The
console you get from lxc-start is special, for instance you can also dump
it to a file with -c. If you don't want the initial console at all, you
can avoid taking up your terminal by doing 'lxc-start -n container -d' to
detach the original console, then 'lxc-console -n container' to get a
properly sized console.
The sizing behavior has always been as you describe. I'm not sure whether
to consider it a bug or not - we should discuss it with upstream. In the
meantime, I'll mark this bug confirmed and wishlist priority, so we don't
forget about it.