On Fri, Oct 10, 2014 at 04:03:03PM +0100, Chris Green wrote:
> I have a dlink NAS which has mutt installed on it.  It works in
> command line mode, e.g.:-
> 
>     mutt -s Subject john.sm...@somewhere.com <message.txt
> 
> but it would be useful if I could run it interactively.  At present it
> fails as follows:-
> 
>     ~ $ mutt
>     Error opening terminal: xterm.
>     ~ $ 
> 
> As I understand it this is because there's no termcap/terminfo on the
> dlink NAS.  However I'm running via ssh so the terminal *is* actually
> an xterm and understands all the appropriate bits and pieces.
> 
> Is there any way I can tell the remote mutt that it has a proper
> terminal to run in?

You can setup your own terminfo database on the NAS.  It only needs
one entry, xterm.

Create a terminfo directory structure in your NAS home directory,
say '~/.myterminfo/x'.

Into the directory 'x', copy from your desktop machine, the compiled
entry for xterm.  It is probably in '/usr/share/terminfo/x/xterm'.

In your NAS shell config file (eg. .profile, .bashrc, .whatever),
set and export 'TERM=xterm' and 'TERMINFO=~/.myterminfo'.

Presumably your editor on the NAS is similarly failing.  If so,
TERM and TERMINFO can be set and exported from the command line
so your editor works properly.

If your editor is working fine without setting up a personal
terminfo database, perhaps the NAS terminfo database is in a
non-standard location and all you need to do is point your
TERMINFO variable to it.  (locate terminfo, or maybe locate
terminfo/x/xterm)

Jon
-- 
Jon H. LaBadie                 j...@jgcomp.com
 11226 South Shore Rd.          (703) 787-0688 (H)
 Reston, VA  20190              (609) 477-8330 (C)

Reply via email to