screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I'm confused about TERMCAP


From: Richard Bronosky
Subject: Re: I'm confused about TERMCAP
Date: Sun, 11 Mar 2007 03:28:47 -0500

On 3/9/07, Michael Parson <address@hidden> wrote:
On Fri, Mar 09, 2007 at 03:53:04PM -0500, Richard Bronosky wrote:
> I'm using "Screen version 4.00.03jw4 (FAU) 2-May-06" on Ubuntu Edgy.
> It seems that invoking screen is creating a TERMCAP that is not making
> vim happy.
>
> How can I stop screen from defining a TERMCAP?  I don't have one
> before I go into screen, and vim works as expected.  Specifically
> Home, End, and other special keys.

> Where can I learn more about TERMCAP and terminal emulation?
> Specifically how to debug and fix problems.  I never know where in the
> stack the keycode mismatch is happening. (Terminal
> App>bash>screen>bash>ssh>bash>vim)  It's very frustrating.

I alias screen to start with vt220 emulation:

screen -T vt220

--
Michael Parson
address@hidden



_______________________________________________
screen-users mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/screen-users

Cool!  I dismissed it at first, but this was actually the post that led me to the solution.  I have modified my .bashrc to now contain:
if [ -n "`which screen 2>/dev/null`" ] && [ "${TERM/screen}" = "${TERM}" ]; then
   screen -T xterm -xS primary ||  ssh-agent screen -T xterm -S primary
fi

I just added the parts "-T xterm"  So now it seems to work, even with the TERMCAP defined.  It just appears to be the right termcap!

The rest of what is happening there is:
1. This is a .bashrc file that I share with a bunch of servers, so I make sure screen is installed and I don't lauch screen if I am already inside a screen
2. Specifiy that I am using xterm, which I pretty much always do, so that is safe to share.
3. -x to join an existing session without terminating any other terminals that may already be connected to it.  (This is great, because I like to have terminals in multiple workspaces, all displaying the same screen session.)
4. The -S (or -xS) gives the name of the session, which is important because if I start a session that I don't want the -x to connect to everytime (like a session I am sharing) giving names helps
5. The ssh-agent in the or condition makes it so that if there isn't a primary session to connect to, it starts an ssh agent, and uses screen as it's shell.  That way I am always ready to SSH into the servers I work on daily.

--
.!# RichardBronosky #!.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]