LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2007, 02:34 PM   #1
young_rhkid
LQ Newbie
 
Registered: Feb 2007
Posts: 11

Rep: Reputation: 0
Editing color appearances for SSH connections


For what ever reason, this server that I SSH into displays directory colors in a very dark blue color instead of the bright blue that I am used to seeing on other boxes.

I have found only a few resources online that could show me the location to where I can adjust the brightness.

Does anyone know how I can adjust the directory colors. Is there something in /etc/bashrc ???

Its annoying to strain my eyes at the text that is almost black like the background.

Thanks
 
Old 10-29-2007, 06:18 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 77
The problem does not occur on your end, but on the remote end. The remote end has a set of dircolors which is used by your login shell. The ANSI color escape sequences are transmitted through ssh to your terminal emulator, which displays them as it should. So there are a few ways to remedy the situation, each occurring at a different point along the pathway:
  1. The most elegant way is to change your dircolors settings on the remote machine. If you make them match your own dircolors settings, it would look the best.
  2. A different solution is to disable dircolors altogether from within bash (or whatever shell’s builtin ls is being used).
  3. A hacky solution is to tell the local terminal emulator (e.g., xterm) to display the requested color differently. This means the information for dark blue text will still be sent over ssh, it’s just interpreted differently by your terminal emulator.
The specific details for these depends on (respectively) the remote machine’s distro/setup, the remote shell in use, and the local terminal emulator in use. If you need more help, just provide the information corresponding to the solution you would like to chose (I would recommend the first).
 
Old 10-30-2007, 08:24 AM   #3
young_rhkid
LQ Newbie
 
Registered: Feb 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you for the tip! You pointed me into the right direction. The distro that I am working in is Fedora 4. I tracked down /etc/DIR_COLORS and found a line such as:
DIR 01;34 # directory

I believe that I need to add something along the lines of 1;34m ...the 'm' making it bright?
 
Old 10-30-2007, 12:28 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 77
First off, /etc/DIR_COLORS is a system-wide file. Modifying it usually requires root permissions. I guess if you have those it’s okay, but if you don’t, try ~/.dir_colors or something instead.
Quote:
Originally Posted by young_rhkid View Post
DIR 01;34 # directory

I believe that I need to add something along the lines of 1;34m ...the 'm' making it bright?
No, I don’t think so (‘m’ is used to terminate ANSI escape sequences as they occur in quoted strings). The ‘1’ means bold which is ok. The ‘34’ means dark blue. If you want light blue, replace it with ‘36’ (you might instead try to copy your local machine’s dircolors to the remote machine so you won’t have to guess these subtleties).

Last edited by osor; 10-30-2007 at 12:37 PM. Reason: it is a file, not a directory
 
Old 10-30-2007, 09:22 PM   #5
young_rhkid
LQ Newbie
 
Registered: Feb 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Yeah, so for I do understand that /etc/DIR_COLORS is a system-wide file in which is fine. I have root access with 3 other co-workers in which the navy blue text was killing the eyes when looking at directory names. I could not quite make heads or tails to the '1' or 'm' in the string so I could not tell what to change to make the dirs a brighter blue.

Thanks again!
 
Old 10-31-2007, 10:22 AM   #6
young_rhkid
LQ Newbie
 
Registered: Feb 2007
Posts: 11

Original Poster
Rep: Reputation: 0
01;34 did the trick! The default value was 00;34 in which gave the directories the midnight blue color that drove me insane.

THANKS a-mill!!!!
 
Old 10-31-2007, 09:34 PM   #7
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 77
Quote:
Originally Posted by young_rhkid View Post
01;34 did the trick! The default value was 00;34
I’m sorry I misread your other post, but I’m glad you figured it out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unauthorized SSH connections ErrorBound Linux - Security 1 03-11-2007 02:25 PM
appearances Tekai Linux - Newbie 1 10-08-2004 10:41 PM
Can I see ssh connections? bruno buys Linux - Networking 4 11-19-2003 02:46 PM
SSH is blocking my connections tarballedtux Linux - Security 8 11-01-2002 04:19 PM
SSH - Refused Connections bfloeagle Linux - Networking 6 08-31-2001 12:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration