Results 1 to 9 of 9

Thread: NTFS directory coloring in terminal

  1. #1
    Join Date
    Dec 2006
    Beans
    30

    Question NTFS directory coloring in terminal

    I'm annoyed by the default coloring of NTFS directories in Ubuntu. Just watch:

    (I believe the NTFS partition may have encryption enabled and the green background color symbolizes that the folder is encrypted?)

    The screenshot is taken from a gnome-terminal running on my Ubuntu 7.10 laptop, ssh'ed into my desktop PC which has both a ntfs and a fat32/vfat partition on it. However the same colors appear when sshing in using PuTTY, or using gnome-terminal without sshing directly from the desktop computer.

    So I guess it must be the "terminal-server" (if there is such a thing) on the Ubuntu 7.10 x64 desktop PC that defines the coloring scheme.

    I want to remove the green background-color from the NTFS directories so it becomes readable. How do I do that?
    Last edited by josteinaj; October 10th, 2011 at 11:37 PM. Reason: Replaced screenshot since the link was broken. the new one doesn't have a FAT-illustration. Taken in Ubuntu 11.10 Beta2.

  2. #2
    Join Date
    Mar 2006
    Location
    Saint Petersburg, FL
    Beans
    1,123

    Re: NTFS directory coloring in terminal

    Quote Originally Posted by josteinaj View Post
    I'm annoyed by the default coloring of NTFS directories in Ubuntu. Just watch:

    (I believe the NTFS partition may have encryption enabled and the green background color symbolizes that the folder is encrypted?)

    The screenshot is taken from a gnome-terminal running on my Ubuntu 7.10 laptop, ssh'ed into my desktop PC which has both a ntfs and a fat32/vfat partition on it. However the same colors appear when sshing in using PuTTY, or using gnome-terminal without sshing directly from the desktop computer.

    So I guess it must be the "terminal-server" (if there is such a thing) on the Ubuntu 7.10 x64 desktop PC that defines the coloring scheme.

    I want to remove the green background-color from the NTFS directories so it becomes readable. How do I do that?
    You need to make changes to the dircolors command in your .bashrc script, but first you need to export the dircolors database to a file like this:
    Code:
    dircolors --print-database > ~/.mydircolors
    then edit the file:
    Code:
    nano ~/.mydircolors
    and change the colors to your preferences. Save the file then make changes to your .bashrc script. So you would:
    Code:
    nano ~/.bashrc
    then locate the following portion:
    Code:
    # enable color support of ls and also add handy aliases
    if [ "$TERM" != "dumb" ]; then
        eval "`dircolors -b`"
        alias ls='ls --color=auto'
        #alias dir='ls --color=auto --format=vertical'
        #alias vdir='ls --color=auto --format=long'
    fi
    and change the string:
    Code:
    "`dircolors -b`"
    to
    Code:
    "`dircolors ~/.mydircolors`"
    so when you login your bash script will change the defaults to your colors.
    For those new to Ubuntu most of your answers can be found at help.ubuntu.com or ubuntuguide.org

  3. #3
    Join Date
    Dec 2006
    Beans
    30

    Re: NTFS directory coloring in terminal

    It worked. Thanks!


    (It seems NTFS doesn't discriminate between "readable" and "executable", but that's another issue.)

  4. #4
    Join Date
    Sep 2008
    Beans
    2

    Re: NTFS directory coloring in terminal

    Thanks for that tip. It worked for me as well.

  5. #5
    Join Date
    Aug 2006
    Beans
    21

    Re: NTFS directory coloring in terminal

    If you got this to work, can you share your .mydircolors file? I can't seem to get the directory background highlighting turned off.

    Thanks.

  6. #6
    Join Date
    Aug 2006
    Beans
    21

    Re: NTFS directory coloring in terminal

    I figured it out. Change the line in .mydircolors to this,

    STICKY_OTHER_WRITABLE 01;34 # dir that is sticky and other-writable (+t,o+w)
    OTHER_WRITABLE 01;34 # dir that is other-writable (o+w) and not sticky

    Problem solved.

  7. #7
    Join Date
    Nov 2008
    Beans
    58

    Re: NTFS directory coloring in terminal

    Quote Originally Posted by andylinux View Post
    I figured it out. Change the line in .mydircolors to this,

    STICKY_OTHER_WRITABLE 01;34 # dir that is sticky and other-writable (+t,o+w)
    OTHER_WRITABLE 01;34 # dir that is other-writable (o+w) and not sticky

    Problem solved.
    thanks for that extra detail, that solved it. the details are rather important.

  8. #8
    Join Date
    May 2009
    Beans
    1

    Re: NTFS directory coloring in terminal

    What does it mean when a directory is listed with a green background?

    When I text copied from the terminal window into Gmail I don't get the colors. How do you copy the directory listing with colors?

    Thanks in advance.

  9. #9
    Join Date
    Nov 2009
    Location
    Two Rivers
    Beans
    30
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: NTFS directory coloring in terminal

    Cool tip! Thanx

Tags for this Thread

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
  •