5
I'm configuring both my gnome-terminal and xterm columns (i still haven't picked which of these I will be using) and I have a couple of issues I would like to fix:
- the typing area seems to be smaller (fewer columns) than the display area
- the typed text is not wrapping to the next line when it reaches the end - it just continues back around on the same line, overwriting the prompt
(i have set a custom bash prompt with PS1 in case this is relevant)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.1 (wheezy)
Release: 7.1
Codename: wheezy
$ echo $TERM
xterm
$ stty -a
[peter@mine ~] $ stty -a
speed 38400 baud; rows 52; columns 126; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
$[peter@mine ~] $ # the column width only goes up to here ------------------------------------------------>
the results are identical in both the xterm and in gnome-terminal 3.4.1.1
and as you can see, the output of the stty -a
command goes right up to the edge of the screen, while the typing does not go that far.
I have found that I can get the desired result by setting the columns to a very large number, eg:
$ stty cols 1800
this fixes both problems. Is it the right way to go about solving this problem? Will this "break" any of the output from programs? So far I have tried top
and stty -a
and these seem OK.
more info as requested in the comments
i found that if i cat
some input into a file then the columns actually strech the full width of the terminal window:
[peter@mine applications] $ cat > /tmp/asd
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasssssssssssssssssssssssssssssssssssssssssssssssssssssssssssqqqqqqqqqqqqqqqq
qqqq
does this imply that it is actually bash that is restricting the number of columns and not the terminal? if so then how to alter the number of columns in bash?
1Please always mention your operating system. xterm runs on Linux, Unix, BSD, OSX, Solaris, etc etc. Also, are you actually using the
xterm
terminal emulator?$TERM
does not define the emulator being run, only its type. – terdon – 2013-09-30T14:23:34.230ok i have added that info. – mulllhausen – 2013-09-30T14:29:14.440
So, is this actually
xterm
or another terminal emulator? Also, try removing your custom PS1, do you still have this issue? – terdon – 2013-09-30T14:30:36.130And do you have the same problems if you’re typing into something other than
bash
; e.g.,csh
orcat
(typecat > /tmp/asdfg
; end with Ctrl+C or Ctrl+D)? – Scott – 2013-10-01T01:58:26.453thanks for the diagnosis suggestions. i will post the results when i get back home later on today. – mulllhausen – 2013-10-01T04:06:46.310