[SOLVED]-Micro Editor and Termite terminal

Just a heads up on an interesting little problem I had when starting to use Archlabs.

I have for a long time used the standard few Vim, nano and MC built in editors on CLI. (Geany in GUI of course). Anyway, I wanted a bit more function but no so much memory requirement, so I decided to try Micro text editor. Got it installed but it would not run in a Termite terminal. Finally tracked it down to the fact that it does not read the terminfo detail from Termite correctly so it does not understand what environment it is in & will not start.

I installed LXterminal and tried to load it in there. No problem. If you run "infocmp -C " at a terminal prompt you will see what info each terminal sets.

My solution was a simple alias in zsh -

micro=‘lxterminal -e micro’

It is a really nice text editor, I recommend trying it out.
greywolf.

2 Likes

You might be able to get away with setting the TERM environment variable before launching it in termite,
xterm-256color is usually the most compatible in my experience.

export TERM='xterm-256color' micro

MINOR EDIT
I had a similar situation with vim and st. I used a bit of vimscript in my vimrc to set the TERM, funny thing is this isnt an issue with neovim, it handles the terminals much better.

if !has('nvim') && $DISPLAY !=? '' && !($TERM =~? 'xterm' || &term =~? 'xterm')
    let $TERM = 'xterm-256color'
    let &term = 'xterm-256color'
endif

Lemme know if this makes any difference.

1 Like

Thanks, I had tried that (from web reading) but it makes no difference. I thought it should work as well. I think it may have something to do with Termite and how it interacts with the ENV. I am not so worried about what terminal is running behind it so I stuck with the ‘alias’ route. It would be nice to know what exactly is happening though. It is 2018; hard to believe CLI terminals still have such an issue? Welcome to Linux?? :grinning:

greywolf

2 Likes