How do I change the color for directories with ls in the console?

1

To change your directory colors, open up your ~/.bashrc file with your editor

nano ~/.bashrc

and make the following entry at the end of the file:

LS_COLORS=$LS_COLORS:'di=0;35:' ; export LS_COLORS

Some nice color choices (in this case 0;35 it is purple) are:

Blue = 34 Green = 32 Light Green = 1;32 Cyan = 36 Red = 31 Purple = 35 Brown = 33 Yellow = 1;33 Bold White = 1;37 Light Grey = 0;37 Black = 30 Dark Grey= 1;30

The first number is the style (1=bold), followed by a semicolon, and then the actual number of the color, possible styles (effects) are:

0 = default colour 1 = bold 4 = underlined 5 = flashing text (disabled on some terminals) 7 = reverse field (exchange foreground and background color) 8 = concealed (invisible)

The possible backgrounds:

40 = black background 41 = red background 42 = green background 43 = orange background 44 = blue background 45 = purple background 46 = cyan background 47 = grey background 100 = dark grey background...
0 0
2

Below is a sample of my dircolors file, I want subversion folders (.svn) to be colored, but i guess the extension section only applies to file names.

How do i set colors for directories with certain names?

NORMAL 00 # global default, although everything should be something. FILE 00 # normal file DIR 35 # directory LINK 01;36 # symbolic link FIFO 40;33 # pipe SOCK 01;35 # socket BLK 40;33;01 # block device driver CHR 40;33;01 # character device driver # This is for files with execute permission: EXEC 01;32 # List any file extensions like '.gz' or '.tar' that you would like ls # to colorize below. Put the extension, a space, and the color init string. # (and any comments you want to add after a '#') *~ 01;33;41 # stuff we hate to find laying around (flashing red) .svn 37 .cmd 01;32 # executables (bright green) .exe 01;32 .com 01;32 .btm...
0 0
3

I just created a REG file to set the default console colors to be the same as the default XTerm colors:

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Console] ; 00BBGGRR, not RGB! "ColorTable00"=dword:00000000 ; 0 - black "ColorTable04"=dword:000000CD ; 1 - dark red "ColorTable02"=dword:0000CD00 ; 2 - dark green "ColorTable06"=dword:0000CDCD ; 3 - dark yellow "ColorTable01"=dword:00EE0000 ; 4 - dark blue "ColorTable05"=dword:00CD00CD ; 5 - dark magenta "ColorTable03"=dword:00CDCD00 ; 6 - dark cyan "ColorTable07"=dword:00E5E5E5 ; 7 - light gray "ColorTable08"=dword:007F7F7F ; 8 - dark gray "ColorTable12"=dword:000000FF ; 9 - red "ColorTable10"=dword:0000FF00 ; 10 - green "ColorTable14"=dword:0000FFFF ; 11 - yellow "ColorTable09"=dword:00FF5C5C ; 12 - blue "ColorTable13"=dword:00FF00FF ; 13 - magenta "ColorTable11"=dword:00FFFF00 ; 14 - cyan "ColorTable15"=dword:00ffffff ; 15 - white

If you want to edit it, notice that the numbering of entries (ColorTableXX)...

0 0
4

Thank you for that piece of information... that's exactly what I need.

For future people that run across this post here's what I did.

I looked it up: http://www.starnet.com/xwin32kb/edit/Color_and_font_options_for_xterm_and_dtterm/

and you go to Settings > Environment > General Settings

and in "Terminal to Launch Console programs"

You'll see something like

xterm -T $TITLE -e

If you want (for example) a black background and white text.. you change it to

xterm -bg black -fg white -T $TITLE -e

Some reason it didnt work when I added to the end but I had to add it right after xterm to make it work.

That's how you fix the problem and I hope this helps somebody in the...

0 0
5

On most Linux distributions, the ls command is aliased to color-ls by default. This displays different types of files in different colors. Unfortunately, the default color for directories is blue, which is quite dark and very difficult to see against the default black background. The quickest and easiest way to fix this is to copy the system color configuration file into your home directory and modify its contents.

On most systems, the configuration file for the color utility is /etc/DIR_COLORS. You probably won’t be able to modify this file unless you’re the root user, but if you copy it into your $HOME directory as .dir_colors; you can edit its contents and it will then override the system defaults. You only need to edit two characters and you’re done.

Find the following line in the file (on my system it’s line # 59):

DIR 01;34 # directory

The offending number is 34, the numeric code for blue. I typically change this to 96, which is turquoise. It’s a...

0 0
6
...
0 0
7

In C#, the console has properties that can be used to change the background color of the console, and the foreground (text) color of the console.

Console.BackgroundColor // the background color
Console.ForegroundColor // the foreground/text color

The issue is that background color applies only where text is written, not to free space.

Console.BackgroundColor = ConsoleColor.White; // background color is white
Console.ForegroundColor = ConsoleColor.Blue; // text color is blue

Now, with the above code, it does indeed turn the text blue, but it only turns the background of the text white, instead of the entire console window's background.

Here's an example of what I mean:

As you can see, the white background only displays behind the text, and does not change the color of the entire console window.

How do I change the color of the entire console window?
...

0 0
8

PuTTY uses its own colour specs for emulating X terminals. It is under the Window -> Colours category in the main configuration window you get on startup. In the section 'Adjust the precise colours PuTTY displays' you can edit entries in the 'Select a colour to adjust' box. The usual directory colour, for example, is ANSI blue. I find this too dark, so I lighten it to (74,74,255).

To enable colours in a standard bash session under most distros (and certainly Debian-like things such as Ubuntu,) first test for the existence of the dircolors executable, then look for a local override .dircolors. If found, run dircolors with the local file and if not use the system defaults.

if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" fi

The -b flag means emit Bourne shell compatible colourisation rules. To alter the colours themselves, you will need to provide an X11 resource file with the overrides you want....

0 0
9

Description

This article is from the Frequently Asked Questions for Linux, the Free/Open Source UNIX-like operating system kernel that runs on many modern computer systems. Maintained by David C. Merrill with numerous contributions by others. (v1.0).

A: If ls is displaying in color and you haven't told it to, you probably have an alias configured for it. Some distributions ship this way by default.

The shell command, unalias ls, should completely unset the configuration that some distributions provide as standard.

To permanently make this change, check your initialization script, .bashrc.

A: To change the colors, rather than removing them, refer to the ls man page (man ls).

 

Continue...

0 0
10

Yeah, I wouldn't expect those to work.

ChatColor.RED is just a char (or a String, I don't remember) that Bukkit can pick up on and go "Oh, this means all the text from here on out is red."

System.out is native to Java. It doesn't care that there's the Bukkit color-change character in what it's printing. It'll just print the chars in plaintext. Let me guess, when you tried it with that method, it printed some odd symbols before your text? Probably &4 or something to that effect?

The same thing applies to Bukkit.getLogger(). It's returning a java.util.logging.Logger, which is not part of Bukkit either.

What you CAN do, though, is this:

Code:

//Get a reference to the server, whichever way you can Server server = ... ConsoleCommandSender console = server.getConsoleSender(); //Send the console something! console.sendMessage(ChatColor.RED + "It's but a flesh wound!");

This should work.

Click to...

0 0
11

I implemented bash shell into my windows 10 as "Bash on Ubuntu on Windows".

And now I just want to remove the heighlight from folders in console.

There is an example : https://scr.hu/JWW6Mm

Additionally I use bashIt library to change design of my console but i dont know how to change that hightlight :(

I find an answer and if somebody need it there is solution.

You need to add this :

LS_COLORS=$LS_COLORS:'ow=1;34:' ; export LS_COLORS

into your .bashrc file

More information here : http://www.bigsoft.co.uk/blog/index.php/2008/04/11/configuring-ls_colors

or here :...

0 0
12

Check out my other tutorials on the Unix Page, and my

Check my blog

Copyright 1994, 1995 Bruce Barnett and General Electric Company

Copyright 2001, 2013 Bruce Barnett

All rights reserved

You are allowed to print copies of this tutorial for your personal use, and link to this page, but you are not allowed to make electronic copies, or redistribute this tutorial in any form without permission.

Original version written in 1994 and published in the Sun Observer

This section describes C Shell (CSH/TCSH) programming. It covers conditional testing, control loops, and other advanced techniques.

This month begins a tutorial on the bad-boy of UNIX, lowest of the low, the shell of last resort. Yes, I am talking about the C shell. FAQ's flame it. Experts have criticized it. Unfortunately, this puts UNIX novices in an awkward situation. Many people are given the C shell as their default shell. They aren't familiar with it, but they have...

0 0
13
Text-Terminal-HOWTO: Terminal Emulation (including the Console) Next Previous Contents

A trivial type of terminal emulation is where you set up a real terminal to emulate another brand/model of terminal. To do this you select the emulation you want (called "personality" in Wyse jargon) from the terminal's set-up menu. This section will not discuss this case.

Since a PC has a screen and keyboard (as does a real terminal) but also has much more computing power, it's easy to use some of this computing power to make the PC computer behave like a real text terminal. Still a third type is where you just use a text-based interface (at the console --usually just the monitor) to your Linux PC, either by a terminal screen (such as xterm) in Xwindow or by a "virtual terminal".

To fully emulate a real terminal on a PC requires that a serial port of the computer will be used to connect the emulated terminal to another computer. This would be either with a direct cable connection...

0 0
14
+alt1Client only command +alt2Client only command +attackClient only command +attack2Client only command +backClient only command +breakClient only command +camdistanceClient only command +caminClient only command +cammousemoveClient only command +camoutClient only command +campitchdownClient only command +campitchupClient only command +camyawleftClient only command +camyawrightClient only command +commandermousemoveClient only command +csm_rot_x_negClient only command +csm_rot_x_plusClient only command +csm_rot_y_negClient only command +csm_rot_y_plusClient only command +duckClient only command +forwardClient only command +graphClient only command +grenade1Client only command +grenade2Client only command +jlookClient only command +jumpClient only command +klookClient only command +leftClient only command +lookdownClient only command +lookspinClient only command +lookupClient only command +mat_texture_list +movedownClient only command +moveleftClient only command +moverightClient only...
0 0
15

Branch

A branch is a named pointer to a commit. Selecting a branch in Git terminology is called to checkout a branch. If you are working in a certain branch, the creation of a new commit advances this pointer to the newly created commit.

Each commit knows their parents (predecessors). Successors are retrieved by traversing the commit graph starting from branches or other refs, symbolic references (for example: HEAD) or explicit commit objects. This way a branch defines its own line of descendants in the overall version graph formed by all commits in the repository.

You can create a new branch from an existing one and change the code independently from other branches. One of the branches is the default (typically named _master ). The default branch is the one for which a local branch is automatically created when cloning the repository.

Commit

When you commit your changes into a repository this creates a new commit object in the Git repository....

0 0
16

Recent Articles

Planning Brings Success

GET UP, DUST YOURSELF AND MOVE ON! Human beings are designed to make mistakes, irrespective of age, qualifications and past achievements we are all prone to go wrong. However, it is so fascinating to learn how people respond after making… more

Fake News: Libyan Slave Markets - Exclusive Report

After CNN came out with video of slave auction markets in Libya, all hell broke loose online and on mainstream media; reports of African slaves being auctioned in Libya and the true ongoing horrors of immigrants drowning trying to escape… more

Auto Insurance - Do You Even Need Full Coverage?

There are two basic types of auto insurance coverage plans that just about every insurer offers. Liability, and full coverage. Of course, there may be plans in between like partial coverage. But, which one should you choose?… more

Home Made Vacations

Pack up the books and unpack the board games!...

0 0
17

These are just a few of the most common GNU / Linux commands that you may find yourself looking for, along with some answers to common questions about running Linux. On most systems more information about a command can be found by typing [ man command ] ; man being the word man and command being the particular command you are checking.

You will need to be root to use some of these commands ; also be sure to check your

path

. If there is no path to the command then you will likely get a

" command not found "

error. Check the command to be sure you have typed it correctly. Be

extremely

careful as root , you can make your system unusable. This is very important to understand. If you are using a dual boot system you may not be able to access either system if you make a mistake as root and your system is not bootable. Before you type any command as root be absolutely certain of what you are doing. Any comments are encouraged and welcome at

Update...

0 0