You are not logged in.

#1 2014-03-10 14:49:01

klingt.net
Member
Registered: 2014-03-10
Posts: 25

[Solved] Setting xterm to xterm-256color won't work as described

My goal was to set TERM to xterm-256color as described in the wiki but it doesn't work.

I tried to add xterm*termName: xterm-256color to ~/.Xresources (with .xinitrc containing [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources) and /etc/X11/xinit/xinitrc. Merging the setting manually with  xrdb -merge ~/.Xresources was also without luck.

Additionally i tried to add the line export TERM=xterm256-color to /etc/profile and to a custom script in /etc/profile.d.
I've also checked if even the scripts were executed by creating a file with touch. The file was created, so /etc/profile was executed.

The only way to set TERM to xterm-256color was by adding export TERM=xterm256-color to my ~/.zshrc (~/.bashrc would've worked also), but this is the way how it should not be done and furthermore i would like to set xterm to use 256 colors system-wide.'

I use XFCE, gnome and gdm if this helps.

Last edited by klingt.net (2014-03-11 09:25:42)

Offline

#2 2014-03-11 03:20:13

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [Solved] Setting xterm to xterm-256color won't work as described

Are you using xterm or are you using Xfce's Terminal app?  I ask because there has been confusion in the past about setting $TERM for Xfce's Terminal. See https://bbs.archlinux.org/viewtopic.php?id=175581
 
From the documentation for the Xfce Terminal Preferences, http://docs.xfce.org/apps/terminal/preferences, under Compatibility:

Emulation setting

    This specifies the terminal emulation. This does not only set the $TERM value, but also the input conversion of the VTE widget. By default this is set to xterm, if changed /etc/termcap will be read to get the emulation values.

    If you have an application that needs $TERM for correct functionality, it is better to set this manually in your ~/.bashrc file (or whatever shell you use) and set the terminal emulation as xterm to avoid incorrect characters in the Terminal.

Offline

#3 2014-03-11 09:25:15

klingt.net
Member
Registered: 2014-03-10
Posts: 25

Re: [Solved] Setting xterm to xterm-256color won't work as described

Thank you!
I was confused, too.

Offline

#4 2014-03-12 17:24:58

Kilzool
Member
From: Ireland
Registered: 2010-08-04
Posts: 232

Re: [Solved] Setting xterm to xterm-256color won't work as described

This is what I do.  I probably won't recommend it though.

Without touching .bashrc or anything in the $TERM...

cd /usr/share/X11/app-defaults
sudo cp XTerm XTermBAK
sudo cp XTerm-color XTerm
sudo vi XTerm

I change this line in vi:  #include "XTerm"  to #include "XTermBAK")
[save and quit vi]

When I use xfce4-terminal and "echo $TERM" it comes up as xterm (since I set that in the xfce4-terminal preferences/options menu)
When I use xterm it will use the xterm-color settings.

Offline

Board footer

Powered by FluxBB