shell color syntax/highlighting on FC4
I am running a Fedora Core 4 box with a tcsh shell. Everything works fine, except for one thing.
On Red Hat Linux 9 there used to be color highlighting in vi and also when you called up a man page. On Fedora Core 4, however, instead of color, I get just ugly bold black/white letters when there should be color. I have already tried 'setenv TERM xterm-color' from the vi docs - while this fixes vi, man pages, pine, etc. still do not have color. While this may not be a bug, I have a strong personal preference for this. Anyone have any fixes? |
In RH9 you would alter the .bashrc file in your home directory, adding the following at the end:[code]alias ls='ls _color=auto'
for the ls command to show files in colour. (And, globally, you put it in /etc/bashrc.) Of course - this was for the (default) bash shell. And only worked for ls. The man page for tcsh is quite exhaustive. There is advice under LS_COLORS which should help with man pages. but: in my FC4 system, I can modify the terminal parameters by selecting edit > current profile ... so long as colours are turned on everything is in colour. |
I am using xterm... in 'ls' there's color by default, and I got color in vi sort of working,
but in everything else there's no color. |
Let me elaborate... colors in 'ls' work fine - but when I use vi to create a new file in xterm, the tilts (~) that represent blank lines are in color (blue), but when, say, I press 'i' for insert or 'R' for replace, the vi statusbar at the bottom of my xterm is still an ugly bold black color.
Additionally, when I call up a man page, instead of colors, I get bold black. Also in pine, I had colored (blue) links in my messages on RH9. Again, on FC4, I only get bold black text instead of color. This seems like an odd issue (the color and highlighting were fully working on FC2, but has stopped working for me on FC3 and 4. Additionally, this issue doesn't only affect the tcsh shell - bash also has this problem. Again, any help would great help me (and my eyes). :cry: |
Did you try altering the profile colours from the gui?
(Try the obvious first...) My FC4 has all the colours working by default ... I have altered the profile colours so the background is "transparent" and the text is in grey. Boldface is white. vi and so on all show proper colours. /etc/bashrc contains the bash settings. This is what mine contains: Code:
# /etc/bashrc |
Simon, I tried using your bashrc file and my problem is still there. What do you mean by alternating the colors in the GUI? I am using xterm, not gnome-terminal.
BTW, this problem exists in both the bash and tcsh shells, if that helps. I tried setting my TERM variable to a bunch of different settings, but it had no effect. |
To enable syntax colors/highlighting in Vi, try creating/editing ~/.vimrc and adding the line
Code:
syntax enable |
I posted 2 pics of my problem.
--EDIT-- URLs updated Screen1 Screen2 --EDIT-- As you can see from the first screenshot, I have colors in vi, but the statusbar at the bottom is still black. The 2nd screenshot shows a man page - as you can see, there is no color at all. Under RH9, I had full color in both. |
Sorry, I can't see your screenshots. I'm getting forwarded to an ad page. But if you aren't getting a status line in Vi, add the following to your ~/.vimrc file:
Code:
set ruler Code:
set statusline=........... " Specify what you want to include in your status line |
Picture URLs updated, please check the post again...
|
OK - I think I see your problem.
Was the background always yellow or did you adjust that yourself? The man pages are supposed to be monochrome. They were that way for me in RH9, and FC2 as well as FC4. Though I think you can set the highlight and boldface colour as something different ... this is done for the terminal config. Just like the background colour. see the xterm man pages --- of just use gnome terminal. |
I set the window background to yellow on purpose - I like different-colored windows.
If I wanted different-colored text in the man pages, how would I set the highlight and boldface colors for xterm? |
I agree to:Pengy:
|
OK - I am using FC4, but I am using the gnome console.
From the console menue, I can select: edit>profiles>myprofile>colors I have selected a built in scheme for normal text (grey on black). In this setting, normal text is grey (doh!) and highlighted text is white. I've selected a transparent background and set transparency at about 30% ... so I see this against a dim version of my desktop wallpaper. I can also cutomise the colour scheme if I want to - say to crimson on clover? In the man pages, the "highlight" is the same colour as the text only darker for light backgrounds and lighter for dark backgrounds. (To see why this may be, try this: man ls > ls.txt - then view ls.txt.) There is also a colour pallette - with built in schemes and a custom option. eg. if you want the hyperlinks in lynx to be red while the text is browney-grey on a parchment coloured background ... then drag the pale yellow to the background tile, the pale brown to the foreground tile, and the crimson to the dark blue tile. e-voila. Of course, this is your encoding for everything using that terminal profile. |
Ok, I'll try that. Would you happen to know the commandline switches to do the same
in xterm? |
All times are GMT -5. The time now is 07:13 PM. |