PDA

View Full Version : Had anyone ever thought of changing how fbterm acts?



there.is.only.xul
June 18th, 2019, 07:36 PM
If you don't know, fbterm is a terminal which runs in the frame buffer of your TTY. There. Now you know. However, there's something else;

fbterm adds its own hacks to make 256 colours play nice, since xterm-256color is ass and linux doesn't support it. But then I read this in the man pages;


A new terminfo database entry named "fbterm" was added to use these private sequences, all program based on terminfo should work with it. By default, FbTerm sets environment variable "TERM" to value "linux", user need run "TERM=fbterm /path/to/program" to enable 256 color mode.

...What? If fbterm adds fbterm to terminfo, why doesn't it set TERM to fbterm? So for the last few days I've been beating my head against a solid brick wall as no matter what I do with fbterm or zsh it just doesn't want to comply with my idea of how things should work (unless, of course, I tell my .zshrc to export TERM="fbterm" in which case it doesn't work in X, and I don't know how to make it TTY-conditional.)

This isn't asking how to make what I want happen, which is basically to add into my .zshrc a TTY-conditional TERM for 256 colours in fbterm without having to manually type TERM=fbterm every single time. This is asking... why linux? If fbterm has its own terminfo entry I have to manually define anyway, why doesn't it use its own terminfo definition by default? That would make the most sense right?

Had anyone ever thought of patching fbterm so it uses its own terminfo definition automatically?

TheFu
June 18th, 2019, 09:30 PM
I know nothing about zsh. Sorry.

I'd check if XDG_SESSION_TYPE is set. Any value is probably sufficient to know it is a GUI, not tty.
Or check XDG_SESSION_DESKTOP for any value.

I'm a pure xterm user. HATE colors. Most setups are too hard to read.