In the Terminal Preferences Advanced tab, it is possible to specify a value for the TERM variable. I've set it to xterm-256color in order to have 256 instead of the usual 8 colors available. Unfortunately, when starting a new terminal, the value of $TERM is still xterm (the default).
As a workaround, I've now put ## Set TERM, cause the (XFCE) Terminal's TERM preference doesn't work... if [[ ${TERM} == "xterm" ]]; then export TERM=xterm-256color fi into my ~/.zshrc. As long as you don't use different terminal emulators and one of them doesn't support that setting, it should be ok.
Not terminals fault, it properly sets TERM in the child environment, however vte overrides this for some reason. Reported in https://bugzilla.gnome.org/show_bug.cgi?id=640940.
Hi Nick, thanks for pointing that out. Tassilo
(In reply to comment #1) > ## Set TERM, cause the (XFCE) Terminal's TERM preference doesn't work... > > if [[ ${TERM} == "xterm" ]]; then > > export TERM=xterm-256color > > fi > > into my ~/.zshrc. As long as you don't use different terminal emulators and > one of them doesn't support that setting, it should be ok. For multiple terminal emulators, do something like: if [ "$COLORTERM" = "gnome-terminal" ] || [ "$COLORTERM" = "Terminal" ] then export TERM=xterm-256color fi
The vte bug says that in order to override TERM setting, one should use vte_pty_new + g_spawn "manually" and not vte_terminal_fork_command_full(), which is "only" a "convenience wrapper".
Master sets emulation, which sets term through vte.
(In reply to comment #6) > Master sets emulation, which sets term through vte. Note that this won't work. VTE apparently only supports emulation=xterm (there's nothing else in /usr/share/vte/termcap-0.0/). So even though using TERM=xterm-256color works in a shell, it won't work in emulation mode. In any case, messing with emulation is very error prone and can break the terminal. Messing with TERM is not really that bad (although it can leads to some surprising results). Anyway, right now it's unfortunately not really possible (due to https://bugzilla.gnome.org/show_bug.cgi?id=640940) to set TERM in xfce4-terminal, so a workaround needs to be found (for example in .bashrc, although it has some problems too).