Thu, 26 Jul 2012 07:06:02 -0430 от Andres Perera <[email protected]>:
> the problem with this logic is that there are numerous curses
> programs: less, top, systat, vi; just to name the ones i recall from
> base.
since you top-posted, I will too.
what's the problem with top? will it bomb out if there is no TERM?
i think rather than hurrying to answer, you'd better do you homework.
yes, you lose the interactiveness, but all your mentioned programs
do work with dumb terminal no problem!
$ echo $TERM
xterm
$ unset TERM
$ top
load averages: 0.44, 0.12, 0.04 v1.my.domain 05:46:41
18 processes: 17 idle, 1 on processor
CPU states: 0.5% user, 0.0% nice, 7.4% system, 0.4% interrupt, 91.7% idle
Memory: Real: 7944K/35M act/tot Free: 206M Cache: 16M Swap: 0K/280M
PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
1 root 10 0 452K 352K idle wait 0:01 0.00% init
17516 root 2 0 3344K 2580K sleep poll 0:00 0.00% sshd
31665 _syslogd 2 0 412K 712K sleep poll 0:00 0.00% syslogd
15719 user 2 0 3312K 2112K sleep select 0:00 0.00% sshd
665 root 2 0 640K 476K idle netio 0:00 0.00% pflogd
597 root 2 0 1608K 2052K idle netcon2 0:00 0.00% sendmail
15280 user 18 0 740K 520K sleep pause 0:00 0.00% ksh
28645 root 2 0 396K 752K idle netio 0:00 0.00% syslogd
4803 root 2 0 1452K 1632K sleep select 0:00 0.00% sendmail
1977 root 3 0 456K 792K idle ttyin 0:00 0.00% getty
10310 root 3 0 492K 800K idle ttyin 0:00 0.00% getty
44 root 2 0 304K 796K idle select 0:00 0.00% inetd
13251 root 2 0 868K 1216K sleep select 0:00 0.00% sshd
18652 root 2 0 308K 656K sleep kqread 0:00 0.00% apmd
9421 root 2 0 692K 880K idle select 0:00 0.00% cron
3016 _pflogd 4 0 704K 312K sleep bpf 0:00 0.00% pflogd
9936 user 28 0 348K 768K onproc - 0:00 0.00% top
24414 _sndio 2 -20 488K 428K idle poll 0:00 0.00% sndiod
$ less /etc/motd
WARNING: terminal is not fully functional
/etc/motd (press RETURN)
^OpenBSD 5.2 (GENERIC) #0: Sat Jul 14 11:58:37 EEST 2012
Welcome to OpenBSD: The proactively secure Unix-like operating system.
Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code. With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.
~
~
$
$ systat
1 users Load 0.38 0.13 0.05 Fri Jul 20 05:47:04 2012
$
> surely retrofitting them with prompts isn't an option, specially when
> having TERM unset isn't the norm
>
> On Thu, Jul 26, 2012 at 4:33 AM, Mo Libden <[email protected]> wrote:
> > Tue, 24 Jul 2012 18:46:55 +0000 от Alexander Polakov <[email protected]>:
> >> * HvN <[email protected]> [120724 17:17]:
> >> > I booted into single user mode, mounted / and /usr according to FAQ 8.
> >> > However, when I try to use vi to change fstab, it says "unknown terminal
> >> > type". Any suggestions ?
> >>
> >> export TERM=vt220
> >
> > may be vi can be modified to ask for terminal type if it is not defined,
> > something like the following:
> >
> > vi: unknown terminal type, please enter the type of the terminal [vt220]: _