screen-users
[Top][All Lists]
Advanced

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

Passing Environment Variables In A Config File


From: Tom Purl
Subject: Passing Environment Variables In A Config File
Date: Fri, 18 Aug 2006 16:15:41 -0500 (CDT)
User-agent: SquirrelMail/1.4.7

I looked around for a while to find a solution to this and could not. Any
help at all would be greatly appreciated.

I use screen on Linux to access a large number of Unix servers.  Some of
the terminal applications that I use on these Unix servers don't
recognize a TERM value of 'screen', so I usually have to set that
environment variable to 'vt100' after logging in.

I was wondering if it was possible to set this environment variable from
my .screenrc file so I can eliminate one more thing that I have to type
every time that I log into a server.

Here's what my current .screenrc file looks like:

    # The vt100 description does not mention "dl". *sigh*
    termcapinfo vt100 dl=5\E[M
    # turn sending of screen messages to hardstatus off
    hardstatus off
    # Set the hardstatus prop on gui terms to set the titlebar/icon title
termcapinfo xterm*|rxvt*|kterm*|Eterm*
hs:ts=\E]0;:fs=\007:ds=\E]0;\007 # use this for the hard status string
    hardstatus string "%h%? users: %u%?"
    caption always

    # shell -$SHELL
    setenv TERM vt100
    screen -t server0  0 ssh server0
    screen -t server1  1 ssh server1
    screen -t servern  3 ssh servern

The 'setenv' command sets the first server's TERM value to vt100, but all
of the other servers use a TERM value of screen.  I also tried placing
that setenv command before ever 'screen' line like this:

    setenv TERM vt100
    screen -t server0  0 ssh server0
    setenv TERM vt100
    screen -t server1  1 ssh server1
    setenv TERM vt100
    screen -t servern  3 ssh servern

...but this didn't have any affect.

Does anyone know what I'm doing wrong?

Thanks in advance!

Tom Purl







reply via email to

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