0

I recently discovered that if I log in to my Debian system without lightDM, just using the commandline prompt, and then instead of typing "startx" straight away actually use the commandline, the coloring in "man" pages is better than I've ever seen. Not in terms of choice of color, that's always cyan, but in how the colors are applied.

echo $TERM

linux

I haven't been able to get this linux setting to work in Xfce-terminal, evidently because it requires termcap, which is not in Debian repositories anymore, not even the compat package that used to be there until 2005.

Is there another terminal I can use that will give me the same coloring as I get in the login console? I haven't been able to get the default xterm program to show colors, and I read that the gnome-terminal and several others all share the same code base as xfce4-terminal.

Please note I've tried other solutions I have found with research, including using Vim as man pager, editing .bashrc or .Xdefaults, etc. Nothing works like the linux setting in login tty console.

My current workaround is to press Ctrl+Alt+F2 and log in to another tty console. But I'd like to avoid doing that and have the linux coloring in the terminal emulator.

5
  • What is it you mean, specifically, by 'how the colors are applied'?
    – Tom Hunt
    Sep 8, 2015 at 15:25
  • have you tried this. Though is uses the word termcap it is based on tput which is terminfo.
    – meuh
    Sep 8, 2015 at 17:38
  • @TomHunt: how colors are applied relates to the logic, what gets colored. The tt1 console using $TERM=linux uses different coloring logic than, say Vim as man pager.
    – user133379
    Sep 9, 2015 at 11:54
  • @meuh: Thanks for the link, that has solved my problem. The logic of the coloring is not the same as the console, but it's equally good and helpful. Thank you!
    – user133379
    Sep 9, 2015 at 11:54
  • You can always comment on your own post. Please don't post comments as answers.
    – terdon on strike
    Sep 9, 2015 at 13:20

2 Answers 2

0

Setting TERM does not change the behavior of the terminal. You would set TERM to tell applications what the terminal can do.

Depending on how old, VTE may depend upon a bundled termcap file (which was read via ncurses from 2008 or before). Originally (2002), the idea was to read a termcap file and emulate the corresponding terminal. That idea fell by the wayside long ago, from the outset VTE simply emulated a subset of xterm. There was some activity to replace termcap with terminfo in 2014, which devolved into making all of the relevant logic hard-coded.

Applications which use VTE are unaffected by this: they use ncurses, with terminfo (some applications use the termcap interface of ncurses, which uses terminfo underneath).

The main visual difference between Linux console and a terminal running in X is that the latter usually makes windows which are smaller and therefore have lower resolution than the Linux console. You can make the colors match (it is after all the same hardware).

Agreeing that XFCE Terminal is just another skin over VTE, in itself VTE does not duplicate the functions of the Linux console:

  • it uses different fonts
  • it does not recognize the escape sequences for switching fonts,
  • not does it recognize the escape sequences for the Linux console color palette

The fonts are more pertinent to the question (you are less likely to rely upon those color palette escape sequences, but if you wanted the same behavior, that's relevant). The console fonts are designed for the text-mode configurations of the console, and with those comparatively low resolutions look nice (usually).

The Linux console supports 16 colors; all of the X terminal emulators you might choose from do at least that. Some of the skins over VTE provide the ability to change the palette so that you could match the shade of color used.

-1

I've heard about xfce4-terminal being unable to use terminfo, but I'm pretty sure that most other gtk terminals can handle it. If that doesn't work, xterm, (u)rxvt qterminal, konsole should all work for minimalist to maximalist setups.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .