0

Currently, I am running Ubuntu Server 16.04 on a 64 bit MacBook Pro. I chose Ubuntu Server because it has no GUI (this was before I learned a number of distros can be run w/o the GUI). Vim, GNU Screen, and Dropbox make up 99% of the computer's usage. However, I am experiencing a number of frustrations with Vim and colors.

After checking to make sure my machine has the /lib/share/.../x/xterm-256color file, I have tried adding export TERM=xterm-256color to the end of my ~/.bashrc. As well as installing ncurses-term and creating a xsession and xtermdefault.

Everything else I am finding that would allow me to set xterm-256color as the default involves a GUI or GNOME; neither of which is on my machine.

At this point, I do not believe I have the know-how to make this default on Ubuntu Server; hence my question: Are there any Linux distros, that when run without the GUI, have the default $TERM of xterm-256color?

EDIT: I basically would like my console/tty to open already set at TERM=xterm256. I understand that this is possible if I am running a GUI, which I am figuring is because I would not be running tty, I would be using terminal or terminator. So, I guess what I really want to know is it possible, with a GUI, to run terminal instead of tty OR if it is possible to make my tty default to TERM=xterm256 instead of TERM=linux.

UPDATE: I now have the vocabulary for what I was looking for: I wanted to know if there was a distro that came with a framebuffer terminal as default. In the time since posting this, I have learned that, no, there is not, but there are tools such as yaft and fbterm that does excatly what I was hoping for.

345422
  • 375
  • 1
    TERM is not something that you can choose as you like out of many options, it has to be consistent with the terminal you're using. For Linux console that's linux, not xterm-256color. – Satō Katsura Jan 31 '17 at 19:03
  • @SatoKatsura Can I make XTerm my terminal without a GUI? – 345422 Jan 31 '17 at 21:09
  • 1
    Nope, xterm is, well, "X Terminal". – Satō Katsura Jan 31 '17 at 21:23
  • @SatoKatsura Does that mean that you can't really configure the console to 256 colors outside the Xs? – Błażej Michalik Jan 31 '17 at 22:39
  • See http://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con – jasonwryan Jan 31 '17 at 23:15
  • @SatoKatsura I've seen a number if things that suggest if I install a desktop I can boot it without a GUI, would the tty used in that environment be the same as one use used when running the desktop? – 345422 Jan 31 '17 at 23:28
  • @boredrandom no. you can boot the computer without starting the GUI but then you'll have the exact same system, just with some additional files on disk. that doesn't change the nature of the Linux console. – strugee Feb 01 '17 at 01:49

1 Answers1

2

short: no

long: (actually I could provide a detailed answer...)

You could do that, but it wouldn't work well:

  • Linux console (without some work on key-bindings) won't match xterm.

  • colors won't match

  • terminal description (in addition to colors and function-keys) won't match - infocmp shows me more than 40 differences aside from those.

Linux console supports 16 colors, and has a feature to do something plausible with the 256-color sequences. But it's incomplete (even with the 16-color limitation), since the palette isn't programmable. Here's a screenshot for my Debian/testing machine to illustrate:

Linux console attempting to show 256- and 88-color palettes

With the same scripts, using xterm, you can see that xterm updates the palette for the 88-color script (making the 256-color output look odd...). Even without that (since Linux doesn't change anything), the Linux console's rendering of the 256-color palette isn't what you had in mind:

xterm showing 256- and 88-color palettes

As I pointed out in a related question (256 colors in console (tty)), with some effort it might be possible to get fbterm to work, essentially making a replacement for the Linux console. But fbterm wouldn't work with TERM=xterm-256color.

Thomas Dickey
  • 76,765
  • At the time you gave me this answer I had no idea what to do with it. However, I have been using Arch Linux since I've posted this question and can actually do something with this answer. fbterm was excatly what I was looking for. I have played with it and yaft. yaft has come out the winner and I can get all of the proper colors in vim without starting X. Thank you. – 345422 Dec 10 '18 at 03:03