6

Using the command echo $TERM, I get the output 'xterm'. However, I have not done anything to install the X Windowing System, and as far as I know, Xterm cannot run without it, and Arch does not install it by default. (Furthermore, there isn't any manpage on xterm, and I would think that if I actually had xterm installed, it would have a manpage).

So is the default terminal for Arch Linux really Xterm? If so, how is it running without X? If not, why does the $TERM variable contain 'xterm', and what is the default terminal?

1 Answer 1

11

When you log in to the console without X11, you are using the Linux built-in "virtual console". It's built into the kernel and its terminfo name is linux, which is what you should be seeing in $TERM.

If your $TERM has anything else, carefully check your configuration, including:

  • the agetty lines in /etc/inittab (they should say linux at the end1)
  • system-wide shell startup scripts
    • /etc/profile, /etc/profile.d/*.sh
    • /etc/bash.bashrc (if using bash)
  • your own shell startup scripts
    • ~/.profile, ~/.bash_profile, ~/.bash_login, ~/.bashrc

1 Certain Arch Wiki pages suggest configuring agetty in inittab to use xterm or even xterm-256color. This is nonsense.

6
  • 1
    Could you elaborate on that last part?
    – Daniel Beck
    Nov 26, 2011 at 14:06
  • Which part are you referring to -- "your own shell startup" or "Arch Wiki"? Nov 26, 2011 at 14:13
  • When googling for an example of Arch's inittab (being away from my own system), I found the Arch Wiki page on "Init and inittab", which has such examples in it (agetty being told to use "xterm-256color" as the terminal name) without sufficient explanation as to why it should be done like that. Not only this configuration is incorrect and cannot add any new features (such as more colors) to the Linux tty, it can even break programs expecting to be able to use Xterm-specific commands, as other users blindly trust and copy-paste the Wiki examples... Nov 26, 2011 at 15:26
  • Ah right now I understand what you mean. It'd configure the Linux virtual console to pretend to be xterm, with negative side effects in everything checking e.g. Term env variable or Termcap
    – Daniel Beck
    Nov 26, 2011 at 15:33
  • 2
    Alright, I feel like a complete moron--the $TERM on my arch linux computer is 'linux'; however, I've been accessing the computer via ssh (the keyboard is busted, I just used my desktop keyboard, which happens to be a USB keyboard, to do). I had no idea that ssh would use a diff terminal than the one the computer was using, though it seems pretty obvious now. Sorry for that.
    – Anachrome
    Nov 26, 2011 at 20:18

You must log in to answer this question.

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