I am unable to open a file with vi
within a screen
session. I am getting vi: No terminal database found
while trying to open the file with vi.
$ which vi
/usr/bin/vi
$ /usr/bin/vi
vi: No terminal database found
I am able to open file using vi
while I am disconnected from screen session.The below commands outside screen session works fine.
$ vi
$ vi a.txt
Tried workaround from here but I am getting No matching processes were found
error
killall vi
No matching processes were found
As @nbari mentioned in the comments:
In the machine that you are sshing from, add this to your shell rc file:
export TERM=xterm
.source ~/.bashrc
or whatever shell you are usingNOTE: These steps are not to be done on the problem machine, but the freebsd you are sshing from.