Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2015 01:15:18 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Erich Dollansky <erichsfreebsdlist@alogt.com>
Cc:        "Michael B. Eichorn" <ike@michaeleichorn.com>, freebsd-stable Stable <freebsd-stable@FreeBSD.org>
Subject:   Re: su on 10.2: TERM: Undefined variable
Message-ID:  <56525A96.7060405@quip.cz>
In-Reply-To: <20151123073107.49bca531@X220.alogt.com>
References:  <5650642B.5030707@quip.cz>	<1448138525.10590.18.camel@michaeleichorn.com>	<5651A102.8050106@quip.cz>	<5651BD59.8070203@quip.cz> <20151123073107.49bca531@X220.alogt.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Erich Dollansky wrote on 11/23/2015 00:31:
> Hi,
>
> On Sun, 22 Nov 2015 14:04:25 +0100
> Miroslav Lachman <000.fbsd@quip.cz> wrote:
>
>>>
>>> Miroslav Lachman
>>
>> The only workaround I found is adding
>> export TERM=""
>> at the top of the script.
>>
> this is a bit strange. TERM should be always define to tell the
> applications the capabilities of your terminal. When X is running, it
> is normally set to xterm, if nothing is available - or you do not know
> what is available - set it to vt100.
>
> Of course, the best would be to find out why it is not set on your
> machine.

TERM is not set or is empty if script runs from crontab. I think this is 
normal. Michael's test didn't print value of $TERM too, but his su 
didn't complained about "Undefined variable".

If I run this script in ssh session it prints "screen", because I am 
using screen.

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56525A96.7060405>