"TERM environment variable not set"

4 posts / 0 new
Last post
#1 Tue, 03/14/2017 - 15:18
OliverF

"TERM environment variable not set"

Hello,

Context: Webmin/Virtualmin (latest stable and official) with the Authentic theme. In the bottom-left of the left column, there is a series of clickable icons, first sysinfo, second >_ to open a shell as root.

If I open this shell icon, I very quickly run into this error: TERM environment variable not set

All I wanted was to run top without having to open my putty client on my PC.

I was puzzled, googled around, to no avail. For instance:

# echo $term

#

Oookay, blank line.

Let's make sure

set | grep TERM
BASH_EXECUTION_STRING='(set | grep TERM) 2>&1'
TERM=dumb

Ooops, dumb terminal?

Let's get rid of that?

export term=xterm
# top
TERM environment variable not set.

Hah! No deal. The TERM variable didn't change.

set | grep TERM
BASH_EXECUTION_STRING='(set | grep TERM) 2>&1'
TERM=dumb

Another method perhaps?

set term=xterm
# top
TERM environment variable not set.

Dang.

I also tried with vt100. Or export TERM=xterm-256color. Same results, the TERM variable does not change.

At this point, I'm lost.

Please, would someone have an idea? I'm open to all suggestions, thank you! :)

Sun, 07/02/2017 - 04:45
perler

the same issue here, would like to use some ncurses stuff in this shell..

Sun, 08/27/2017 - 15:07
Joe
Joe's picture

The popup shell isn't an interactive shell (yet). It can only do the same things the "Command Shell" module can do. You can't run ncurses stuff, nothing that requires an interactive terminal. I'd love it if we could, but that's a lot more complexity.

We need to solve a bunch of problems before it can become an interactive shell. One of them is WebSockets in the server (either in the Webmin server, or we introduce a new server like the Mojo server to run alongside miniserv just for stuff that needs WebSockets). That is probably the one that'll take the longest and may have to wait until sometime during the Webmin 2.0 development cycle. None of the "easy" options are optimal (adding another web server just to get WebSockets is kinda wasteful of memory), but the hard options are very hard indeed (implementing WebSockets from scratch in miniserv or porting Webmin to run under the Mojo server, both of which are huge undertakings).

In short: I dunno when the popup shell will be a "real" terminal. But, it isn't today. It's not a bug...it's just something it can't do. There is the ajaxterm module that does to interactive terminals, however, if you need an interactive term inside Webmin.

--

Check out the forum guidelines!

Tue, 08/29/2017 - 07:02
OliverF

Duly noted, thank you Joe for the explanation, I understand now :)

Perhaps a rejection error adding itself to the shell to tell when interactive shell requests come, to explain it's both no use and not a bug on which we'd want to spend time?

Topic locked