You are not logged in.

#1 2013-10-08 02:48:14

kevinae91
Member
From: NJ
Registered: 2012-09-26
Posts: 49

Xterm Color Issues

I've been trying to apply a color scheme to my Xterm, but for whatever reason, it just does not want to color anything at all. I assign the color scheme in my ~/.Xresources file, but it only ever accepts the Foreground and Background colors. Everything else just takes on the color assigned on xterm*foreground. What am I doing wrong? Am I missing an extra config file or extra parameters for Xresources?


Just keep it simple.

Offline

#2 2013-10-08 02:50:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Xterm Color Issues

Are you reloading the file after you make changes?

Please paste your .Xresources


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-10-08 02:50:42

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Xterm Color Issues

If you really want help around here, you need to actually provide all the relevant information.  In this case, doesn't it seem like providing the actual configuration might be somewhat helpful to whoever is reading this post?


Edit: Also, what expectations do you have on what should actually be colored?  What is it you are looking at that you think should have color?

Last edited by WonderWoofy (2013-10-08 02:51:26)

Offline

#4 2013-10-08 02:51:40

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,742

Re: Xterm Color Issues

Jason beat you by 8 seconds tongue


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2013-10-08 03:07:09

kevinae91
Member
From: NJ
Registered: 2012-09-26
Posts: 49

Re: Xterm Color Issues

This is all that's in my Xresources file:

XTerm*termName: xterm-256color
XTerm*vt100.colorMode : True
XTerm*vt100.colorBDMode : True
XTerm*vt100.colorULMode : True

XTerm*background: #000000
XTerm*foreground: #CCCCC6

!black
*color0:  #000000
*color8:  #090909
!red
*color1:  #111111
*color9:  #181818
!green
*color2:  #222222
*color10: #272727
!yellow
*color3:  #333333
*color11: #393939
!blue 
*color4:  #444444
*color12: #484848
!magenta
*color5:  #555555
*color13: #595959
!cyan
*color6:  #666666
*color14: #707070
!white
*color7:  #777777
*color15: #818181

As for what I think should be colored differently than standard text are files, directories, shell output, highlighting, etc..

Last edited by kevinae91 (2013-10-08 03:11:11)


Just keep it simple.

Offline

#6 2013-10-08 03:15:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Xterm Color Issues

kevinae91 wrote:

As for what I think should be colored differently than standard text are files, directories, shell output, highlighting, etc..

For files and directories, you have to set up .dir_colors and tell your shell to use it. Other shell output and syntax highlighting also has to be set up independently of your $TERM.

In short, setting the colours is only half the job.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2013-10-08 03:29:43

kevinae91
Member
From: NJ
Registered: 2012-09-26
Posts: 49

Re: Xterm Color Issues

jasonwryan wrote:
kevinae91 wrote:

As for what I think should be colored differently than standard text are files, directories, shell output, highlighting, etc..

For files and directories, you have to set up .dir_colors and tell your shell to use it. Other shell output and syntax highlighting also has to be set up independently of your $TERM.

In short, setting the colours is only half the job.


See, and that's where I get lost. Wouldn't setting colors in the XTerm configuration files clash with any color settings you put in the shell configuration files? (e.g... bashrc, dir_colors, etc..). If I have to set up all of the colors through the shell, then what is the point of even bothering with the XTerm config files.. I'm lost here.


Just keep it simple.

Offline

#8 2013-10-08 03:32:48

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Xterm Color Issues

An example would be

$ ls --color=always 

Offline

#9 2013-10-08 03:37:57

kevinae91
Member
From: NJ
Registered: 2012-09-26
Posts: 49

Re: Xterm Color Issues

Alright you know what, maybe this is just a better way to get some answers. I mean I have been reading the various Arch Wikis on this whole XTerm/Xdefaults/Xresources color thing and I just keep going in circles as the Wikis tell you only a sliver of information, and anything else that may or may not be required to use said sliver of information is omitted.

Take this screenshot for example: http://earspl1t.deviantart.com/art/Arch … -391266504

And this screenshot: http://imgur.com/r/unixporn/04Z7aiH

How exactly does a person get all of those various colors to be used in the terminal?


Just keep it simple.

Offline

#10 2013-10-08 03:39:52

kevinae91
Member
From: NJ
Registered: 2012-09-26
Posts: 49

Re: Xterm Color Issues

WonderWoofy wrote:

An example would be

$ ls --color=always 

Well that's quite interesting... now how the heck can I set different colors, and make them persist instead of having to use --color=always?


Just keep it simple.

Offline

#11 2013-10-08 03:43:40

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Xterm Color Issues

Use aliases.  Those screenshots are using programs that have color support.

Offline

#12 2013-10-08 03:43:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,742

Re: Xterm Color Issues

set an alias

ewaller$@$odin ~ 1001 %cat /etc/skel/.bashrc 
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
ewaller$@$odin ~ 1002 %

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#13 2013-10-08 03:45:22

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Xterm Color Issues

Now I beat you by eight seconds!

Offline

#14 2013-10-08 03:45:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,742

Re: Xterm Color Issues

smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#15 2013-10-08 03:56:18

kevinae91
Member
From: NJ
Registered: 2012-09-26
Posts: 49

Re: Xterm Color Issues

Aha, well that certainly answers a bigger question for me.. but is there a way to color other things? For example, color output from the ping command, echo command, sed, etc..

And also, how would I go about changing those colors that I just turned on with the alias?


Edit*

Also I see now what those color codes assigned in Xresources do, once colors are turned on for specific things. I turned on auto color for ls, and now XTerm is using the colors from Xresources to color code the files and directories. It all makes sense now.

Last edited by kevinae91 (2013-10-08 04:00:48)


Just keep it simple.

Offline

Board footer

Powered by FluxBB