Re: passing environment variables through to screen

Mark Diekhans <markd-OgJdDNYpxNJWk0Htik3J/[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <[email protected]>
Thanks for the response.  In case this hits anyone else, the
problem is this is a Linux security measure due to screen being
setgid.  This seems Linux-specifc in the system and specific to TMPDIR
and certain other environments variables.  See below.  It's
mentioned here:

         https://bugzilla.redhat.com/show_bug.cgi?id=129682#c1

Although this is not documented in man ld.so(8) as suggest in
one of the postings.

The best work around I can see is to have TMPDIR set in
/etc/screenrc.

Mark

FreeBSD 8.2, OS/X 10.7.4:
    TMPDIR=/var/barney FRED=fred screen 
    echo $TMPDIR
    /var/barney
    echo $FRED
    fred

CentOS 5.2, Ubuntu 12.0
    TMPDIR=/var/barney FRED=fred screen 
    echo $TMPDIR
    bash: TMPDIR: unbound variable
    echo $FRED
    fred


Kevin Van Workum <[email protected]> writes:
>    As far as I know, screen behaves like any other process and inherits
>    its environment. So invoking screen as follows should work, if not,
>    then you have some other problems.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.