Discussion:
xterm question
Andre Wyrwa
2001-07-19 18:14:11 UTC
Permalink
Hi,

I've got trouble with my xterm.
When my input exceeds the line, it doesn't break to the next line, as it
shoult, but to the same line, so that I am overwriting my own stuff.

This sometimes leads to confusing uglyness.

Does someone have a hint?

I remember having another xterm-question, but I don't get it in mind,
right now.

Andr?.
--
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
Gerard Beekmans
2001-07-20 19:43:10 UTC
Permalink
Post by Andre Wyrwa
Hi,
I've got trouble with my xterm.
When my input exceeds the line, it doesn't break to the next line, as it
shoult, but to the same line, so that I am overwriting my own stuff.
This sometimes leads to confusing uglyness.
Does someone have a hint?
I remember having another xterm-question, but I don't get it in mind,
right now.
in your .bashrc and .bash_profile files add this:
export INPUTRC=/etc/inputrc
(or put the file in your home dir, depending whether you want everybody
else to make sure of it too) and put this in it:

set horizontal-scroll-mode Off

This is documented in "man bash" under the heading: Readline Variables
There's more you can change here which changes bash' behaviour
--
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
--
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
Andre Wyrwa
2001-07-22 03:04:11 UTC
Permalink
Post by Gerard Beekmans
export INPUTRC=/etc/inputrc
(or put the file in your home dir, depending whether you want everybody
set horizontal-scroll-mode Off
Thx, but it seems that this is the solution for the wrong problem.

My bash breaks the line (in console-mode everything is fine).
In xterm it just doesn't break it to a new line, but to the same.

Like this:

1.
prompt# blablablablablablabla

2.
prompt# blablablablablablablablablablablablablablablablabla

3.
laompt# blablablablablablablablablablablablablablablablablablablablab
^^

You know what I mean?
It only happens in xterm.

Andr?.
--
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
Gerard Beekmans
2001-07-22 04:51:33 UTC
Permalink
Post by Andre Wyrwa
You know what I mean?
It only happens in xterm.
Yup, when xterm starts, it starts bash and that bash version isn't
reading the inputrc file.

Probably because xterm doesn't start bash as a login shell, so add
"source /etc/inputrc" to $HOME/.bashrc as well

If you add it to both .bash_profile and .bashrc, then you are assured
that bash will read at least one of the files depending on how xterm is
invoking bash (perhaps even as /bin/sh - I can't seem to recall right
now).
--
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
--
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
Andre Wyrwa
2001-07-22 10:27:16 UTC
Permalink
Post by Gerard Beekmans
Yup, when xterm starts, it starts bash and that bash version isn't
reading the inputrc file.
Here are my .bashrc-files:

.bashrc:
---
test -r /etc/bashrc && . /etc/bashrc

PS1="\e[00;33m\u:\w >\e[00m "
PS2="> "
export PS1 PS2
---

/etc/bashrc:
---
# global inputrc
export INPUTRC="/etc/inputrc"

# make ls colored and set some defaults
eval `dircolors -b /etc/DIR_COLORS`
if test "$UID" = 0; then
alias ls='ls -a --color=tty -T 0'
else
alias ls='ls --color=tty -T 0'
fi

#case `tty` in
# */pty*|*/pts*|*/ttyp*)
# export TERM=xterm-color
# ;;
#esac

set horizontal-scroll-mode Off
---


So the problem can't be bash. And the default for horizontal-scroll-mode is
Off.
I think it must have to do with the Xresources.

Andr?.
--
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
Gerard Beekmans
2001-07-22 13:36:57 UTC
Permalink
Post by Andre Wyrwa
---
# global inputrc
export INPUTRC="/etc/inputrc"
# make ls colored and set some defaults
eval `dircolors -b /etc/DIR_COLORS`
if test "$UID" = 0; then
alias ls='ls -a --color=tty -T 0'
else
alias ls='ls --color=tty -T 0'
fi
#case `tty` in
# */pty*|*/pts*|*/ttyp*)
# export TERM=xterm-color
# ;;
#esac
set horizontal-scroll-mode Off
set horizontal-scroll-mode Off shouldn't be in a bashrc file - it will
not work there. It has to be in the file specified by the $INPUTRC
variable. So what does your /etc/inputrc file contain exactly?
--
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
--
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
Seth W. Klein
2001-08-11 20:01:35 UTC
Permalink
<snip>
My bash breaks the line (in console-mode everything is fine).
In xterm it just doesn't break it to a new line, but to the same.
<snip>
Have you checked the value of $TERM?

cheers,
Seth W. "sklein" Klein
--
sklein at mint.net http://members.mint.net/sklein/
LFS FAQ Maintainer http://archive.linuxfromscratch.org/lfs-faq/
They live on the edge? I live hanging from my safty harness rope.
--
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
Loading...