How can I enable xterm 256 in ubuntu 8.04?
Solution 1
I found that simply placing this in either your .bash_profile
or .profile
(if the former doesn't exist) works for me:
export TERM="xterm-256color"
Then either open a new terminal session or source the profile file source ~/.bash_profile
. I'm assuming you use bash, but this will probably work for most shell type dot files.
Solution 2
It looks like Hardy (Ubuntu 8.04) doesn't provide the terminfo entry (/usr/share/terminfo/x/xterm-256color) in the default ncurses packages. Karmic provides this entry in the ncurses-base package (Karmic, Hardy), but Hardy provides it in the ncurses-term package (Hardy).
I found this article on enabling 256-Color Xterms in Ubuntu. To enable:
Install ncurses-term:
sudo aptitude install ncurses-term
-
Customize the xterm entries; add this to ~/.Xdefaults:
*customization: -color XTerm*termName: xterm-256color
-
Add this to ~/.xsession to apply to new terminals:
if [ -f $HOME/.Xdefaults ]; then xrdb -merge $HOME/.Xdefaults fi
Log out and back in to pick up all changes, or just run
xrdb -merge ~/.Xdefaults
-
Open a new xterm and test with
tput
andecho $TERM
; you should see the following output:$ tput colors 256 $ echo $TERM xterm-256color
If you do, you're good to go.
Additionally, some applications will need special configuration to take advantage of the new capabilities.
Related videos on Youtube
Gary
Updated on September 17, 2022Comments
-
Gary over 1 year
How can xterm 256 be enabled in ubuntu 8.04? I was able to get that working in 9.10, but not 8.04.
-
quack quixote almost 14 yearsmichael, any update on your issue? did the answer below help at all? if it didn't can you edit the question and update with what you tried and what effect it had?
-
-
Gerry almost 12 yearsThank you! Worked perfectly in Ubuntu 11.10. edit: doh but it had side effects in Vim. Why on earth doesn't Ubuntu enable this by default so that we don't have to make these hacks?