Getting emacs’ ansi-term to play nicely with FreeBSD

I was playing with the various shell options – sorry, trying to learn eshell – this evening. While playing with eshell I learned about the second, fully fledged terminal emulator ansi-term.

Most of my machines here run FreeBSD, as does the machine that hosts this blog. FreeBSD’s terminal emulators don’t recognise eterm-color as a valid terminal type, plus FreeBSD uses termcap and not terminfo, so the supplied terminfo file was of limited use.

As usual, stackoverflow came to the rescue with this answer. After adding the termcap entry and rebuilding termcap.db, ansi-term is now recognized as a full featured terminal emulator, running inside emacs. So now I can do this:

Screen Shot 2014-01-07 at 10.09.17 PMThat’s midnight commander running on one of my FreeBSD servers, inside GNU Emacs on my Mac. Job done.

And yes, ESC-0 is passed through correctly so I can actually exit mc.

One thought on “Getting emacs’ ansi-term to play nicely with FreeBSD

  1. Nice to see other hybrid Emacs/FreeBSD users out there. I’ve since moved on to using eshell about 90% of the time, but jump back to a terminal emulator for things such as cd /usr/ports/categoar/port && make config.

Leave a Reply

Your email address will not be published. Required fields are marked *