Professional Web Applications Themes

Colors of text in terminal. - Linux Setup, Configuration & Administration

Hi Experts: My Solaris dtterm sessions are monochrome. I can select the foreground and background color, but then all output from "ls" and viand other utilities are that foreground color printed on that background. Of course, I select colors that are easy to read. When I ssh into my Linux 9.0 PC from Solaris, and run vi on my still simple .profile for example. stty erase ^H VISUAL=/usr/bin/vi set -o vi <--- "set" is yellow, and unreadable on white background export VISUAL <--- "export" is also yellow bindir=${HOME}/usr/bin export bindir <--- This "export" is also yellow. My C++ code is ...

  1. #1

    Default Colors of text in terminal.

    Hi Experts:

    My Solaris dtterm sessions are monochrome. I can select the
    foreground and background color, but then all output from "ls"
    and viand other utilities are that foreground color printed on
    that background. Of course, I select colors that are easy to read.

    When I ssh into my Linux 9.0 PC from Solaris, and run vi on
    my still simple .profile for example.

    stty erase ^H

    VISUAL=/usr/bin/vi
    set -o vi <--- "set" is yellow, and unreadable on white background

    export VISUAL <--- "export" is also yellow

    bindir=${HOME}/usr/bin
    export bindir <--- This "export" is also yellow.

    My C++ code is impossible.

    When I tried black with white foreground for my dtterm,
    searching for text in vi would highlight it with white
    text on yellow background. Also unreadable.

    I found the "--color=never" argument for ls, but that's
    tedious to type in each time.

    Is there a terminal color which results in vi sessions and
    the "ls" command, and whatever other commands I haven't seen yet
    displaying their text in readable color?

    Can I force my session to use the colors I tell dtterm to
    use for foreground and background?

    Can I force the color choices used by "ls", "vi" and
    other utilities for different items to colors of my like?

    Thanks
    Larry
    Larry Lindstrom Guest

  2. #2

    Default Re: Colors of text in terminal.

    Larry Lindstrom wrote:
    >
    > Hi Experts:
    This is RH 9.0

    Thanks
    Larry
    Larry Lindstrom Guest

  3. #3

    Default Re: Colors of text in terminal.

    Larry Lindstrom wrote:
    > Larry Lindstrom wrote:
    >
    >>Hi Experts:
    >
    >
    > This is RH 9.0
    No such thing. It's RedHat 9, RedHat noticed that their "*.0" releases
    were considered extremely unreliable due to insufficiently integrated
    tools with the big system changes they'd make for *.0 releases and no
    one would use *.0 releases anymore, so they changed the numbering scheme.

    Nico Kadel-Garcia Guest

  4. #4

    Default Re: Colors of text in terminal.

    On Sun, 27 Jul 2003 20:04:20 -0700, Larry Lindstrom wrote:
    > Can I have an ssh session with my text displayed in colors that
    > are readable?
    It is the ~/.shellrc or ~/.profile on your remote machine which
    determines that.

    [opt]$ echo $TERM
    dtterm
    [opt]$ ssh 192.168.0.3
    Last login: Sun Jul 27 10:41:16 2003 from tarfu.localdomain
    Linux 2.4.21-xfs.

    Lockwood's Long Shot:
    The chances of getting eaten up by a lion on Main Street aren't
    one in a million, but once would be enough.

    [root]# ls /
    a bin boot buffer cdrom dev dos etc floppy foo home info
    lib mike mnt mnt1 opt proc root sbin tmp usr var

    All of those directory names are colored blue, exactly in accordance with
    /etc/DIR_COLORS.

    Can you do what you ask when logged into the Linux machine - at the
    console of that machine? Your use of dtterm is irrelevant here since it
    is a full color terminal.

    Dave Uhring Guest

  5. #5

    Default Re: Colors of text in terminal.

    Thomas ey wrote:
    >
    > Larry Lindstrom <larrylaracnet.com> wrote:
    > > Hi Experts:
    >
    > > My Solaris dtterm sessions are monochrome. I can select the
    > > foreground and background color, but then all output from "ls"
    > > and viand other utilities are that foreground color printed on
    > > that background. Of course, I select colors that are easy to read.
    >
    > none of this description indicates that your $TERM is "dtterm".
    Thanks Thomas:

    $ echo $TERM
    dtterm

    This is a little script I run when I want to connect to my Linux
    PC from my Solaris PC, called "linux_1".

    dtterm -bg black -fg white -geometry "80x70" -ms black -e ssh ${user}linux-1 &

    Linux-1 is my text only Linux server. I use this linux_1 utility
    to open a window, currently black background and white foreground.
    and running ssh to connect to linux-1.

    I don't have any idea what linux 9 with a text only interface is
    doing.

    I'm used to two colors on my text displays, like a book. The
    contents of the linux-1 ls output and vi sessions look like someone
    wanted to use "All the Craollas in the box". : )

    An almost identical script, except for background color and host
    name, puts an ssh session to my shell account on my ISP's Linux
    system in a nice monochrome green background and white foreground.
    The "ls" output and vi sessions are also in those two colors.

    Can I have an ssh session with my text displayed in colors that
    are readable?

    Thanks
    Larry
    Larry Lindstrom Guest

  6. #6

    Default Re: Colors of text in terminal.

    On Mon, 28 Jul 2003 10:45:55 -0700, Larry Lindstrom wrote:
    > Ok, I didn't have TERM defined or referenced in .profile. $TERM was
    > undefined. When I export TERM, without defining it in profile, $TERM
    > is "dtterm". If I define TERM=dtterm and export, of course, $TERM is
    > dtterm.
    That $TERM was shown on my Ultra 1 running Solaris 9, then I used ssh to
    bring up a Linux machine.
    > Logging into linux-1's console shows $TERM to be "linux". The color
    > ls and vi sessions are still enabled. Hmm, I have stty erase ^H in my
    > .profile, but I can't backspace on the console.
    Well, why don't you remove that stty statement? My $TERM when logged in
    at the console in Linux is 'linux' and my backspace key works properly.
    The stty kludge is for the console in Solaris; Sun still doesn't recognize
    that DEC's VT100 keyboard controls are a standard.
    > Ok, I've set "COLOR none" in /etc/DIR_COLORS and now "ln" displays
    > in the monochrome colors I selected for the dtterm session. Isn't there
    > something I could do to have monochrome "ls" in my account, and not
    > effect others?
    I wish you would specify your shells....

    You can put this into your ~/.profile:

    unalias ls

    Remember to restore /etc/DIR_COLORS.
    > I've looked through the vim man page for the world "color", nothing.
    > I looked for "lang", and found this:
    >
    > /usr/share/vim/vim61/syntax/*.vim
    > Syntax files for various languages.
    >
    > But /usr/share/vim/vim61/syntax/cpp.vim doesn't seem to refer to colors.
    >
    > Do you like these colors? When looking at C++ code, can you read the
    > yellow keywords like "while" printed on a white background? If I use
    > white foreground, black background the yellow keywords stand out fine
    > against the black, but the dark blue comments are hard to read. And the
    > search highlights matching characters by printing them in white on a yellow
    > background. Again, unreadable by me.
    I don't program c++.

    Your problem is that certain colors cannot be distinguished against a
    white background, right? If so, just start a dtterm on your Solaris
    machine like this:

    $ dtterm -fg white -bg black &

    Then use that term to log into the Linux machine.
    > Maybe I just haven't found the foreground and background colors that
    > make all these other colors readable.
    See above.

    > Having text displayed in the foreground/background colors I choose
    > for a dtterm session would also be cool. How do I do that?
    See above.
    > Again, I'd prefer solutions that apply to my account, but for now
    > global solutions are also OK.
    Nothing I have shown you needs be globally applied.
    > Please, I need to cut some code. How do people use vim to help with
    > that?
    Don't know. I can admin these machines and networks but it's been -years-
    since I wrote any original code.
    > I don't want to hate Linux, but it's such a battle to get anything
    > done in this environment.
    Not when you look in the right places.

    Dave Uhring Guest

  7. Moderated Post

    Default Re: Colors of text in terminal.

    Removed by Administrator
    Dave Uhring Guest
    Moderated Post

Similar Threads

  1. Different Colors for Text Links on Same Page
    By f/8 in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: April 13th, 07:41 AM
  2. Replies: 0
    Last Post: July 1st, 02:04 PM
  3. Unable to change fill/stroke colors of boxes and text
    By DennisRCarlson@adobeforums.com in forum Adobe Indesign Windows
    Replies: 1
    Last Post: June 22nd, 09:01 PM
  4. Replies: 4
    Last Post: July 22nd, 07:30 AM
  5. random text & background colors?
    By Bill Parker in forum PHP Development
    Replies: 2
    Last Post: June 30th, 08:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139