It is possible to use colors on the Unix command-line interface.

learn more… | top users | synonyms (1)

4
votes
3answers
760 views

Colored text set up with PS1 and colored output from commands mess each other up

I have PS1 that ends with an opening color sequence (like \[\e[0;32m\]) to have all text in the terminal colored (green in this case). However, when I use a command such as ls (which is aliased to ls ...
4
votes
1answer
521 views

Is there a way to temporarily change the terminal colour?

I use the gnome-terminal and most of my editors with a white on black theme as I find its easier on the eyes. One of my labs requires screenshots of the terminal (with the process) to be submitted ...
4
votes
1answer
794 views

How can I keep color codes with grep input?

It I grep something twice: ... | grep foo | grep bar It seems foo is not highlighted. Infact, it seems grep removes colorcodes from its input; Any way to prevent this?
4
votes
1answer
764 views

Pass colors from ls through pipe to awk 'print' statement

This is a follow-up to my question from yesterday, Show sum of file sizes in directory listing. Thanks to Zero Piraeus and a point in the right direction by Mauritz Hansen, I now have function ...
4
votes
2answers
380 views

How do I extract the colours from a PDF?

I have a PDF and I want to verify the colours being used (check that they match our corporate colour scheme for instance). Specifically, I want to check that the correct CMYK colours are being used. ...
4
votes
1answer
2k views

How do I change my monitor's gamma settings?

How do I change my laptop monitor's gamma settings on Linux Mint 9 (preferably using a GUI interface)?
4
votes
1answer
288 views

Set ls color listings based on regex instead of globbing

Is it possible to set regex patterns for color matching in the LS_COLORS variable? So instead of just *.jpg=38;5;220 Can I do \.(jpg|gif)=38;5;220 That's just an example, I'd like to get more ...
4
votes
1answer
69 views

Highlighting text in bash when using reverse history search using Ctrl-R

Using Ctrl-R, I can search the history in bash. But what to do, If I want to highlight the relevant word which has been typed upon by me. Example: (reverse-i-search)`mount': sudo mount /dev/sda2 ...
4
votes
1answer
76 views

What's the problem with terminals vs colors?

I'm a long time linux/unix user, as almost anyone working with this kind of OSs I use the terminal or a terminal emulator a lot, but I never understood why it's so hard for any GNU/Linux distribution ...
4
votes
1answer
481 views

Is there a Vim syntax file for ANSI-colored output of CLI apps?

I have quite a lot of Perl scripts which print colored output to the terminal, using Term::ANSIColor. This is the same as when a shell script does e.g. echo -e '\e[1;31mError:\e[0m Your fault.' ...
4
votes
2answers
1k views

Configure MC and aptitude color schemes

I'm using Ubuntu, and I'm having trouble reading text in MC and Aptitude because of the color scheme. Is there any way to change it?
4
votes
3answers
2k views

Make terminal text color different when in ssh session

Is there a way to make my terminal (konsole) display different text colors when I'm in an ssh session WITHOUT modifying the remote host's color configuration? Like, maybe automatically switching to a ...
4
votes
1answer
152 views

How can I colorize head, tail and less, same as I've done with cat?

I've got 'color cat' working nicely, thanks to others (see How can i colorize cat output including unknown filetypes in b&w?). In my .bashrc: cdc() { for fn in "$@"; do source-highlight ...
4
votes
2answers
1k views

Convert PDF from sRGB color space to CMYK

Does anyone know how I can convert a PDF (or EPS) file from sRGB color space to CMYK color space? My workflow is currently the following: Draw an image with Powerpoint Print via postscript printer ...
4
votes
2answers
795 views

Xresources color settings

I'm using Gentoo with XMonad and set all the colors in .Xresources file. The problem is that for some apps setting *.background and *.foreground is not enough since they override the settings for some ...
4
votes
1answer
722 views

How can I search for and highlight multiple strings in VIM?

In VIM, how can I search for multiple strings and have a different color highlight for each match?
4
votes
1answer
416 views

Coloring shell command and output differrently [duplicate]

Possible Duplicate: Customizing bash shell: Bold/color the command bash $ cat what-i-want "I want the output be in a different color." I'd like my commands stand out among the output, ...
4
votes
2answers
1k views

No syntax coloring in vim for me, but ok for my students

My students get syntax coloring in vim, but I don't! Even when I "syntax on" as a command syntax on or put it in my .vimrc and/or .exrc. The terminal is xterm. I am missing something in vim or is ...
4
votes
1answer
418 views

Program similar to xcalib to invert desktop colors

I'm using xcalib to invert colors on my computer at home. I have two monitors at work, and unfortunately the xcalib -i -a inverts only one of them (the one I don't want to invert). I haven't found any ...
3
votes
2answers
361 views

Unix Shell and colours

Can any one please help me understand this code snippet that I found in .profile file echo -en "\e[32;44m $(hostname) \e[m";echo -e "\e[m"
3
votes
3answers
729 views

Prevent watch breaking colors

I'm altering scripts at work that monitor log files to single out certain items and colorize them. The final output is a list of 6-digit numbers in several columns. I've been able to add a ~ to the ...
3
votes
2answers
181 views

Delete duplicate images. Need Software for computing average color of an image

I want to delete duplicates in a massive bunch of images. Well as I have dups of the same picture in a different resolution I will make the deletion myself. BUT I want to do this in linear time. So I ...
3
votes
2answers
84 views

dircolors: rules for _ext (rather than .ext)

In UNIX, many file extensions do not contain the dot in front, as in bashrc rather than bash.rc or ssh_config rather than ssh.config I would like to add dircolor rules for _config as well. However, ...
3
votes
2answers
2k views

256 color in real console

I have in my .bashrc export TERM=xterm-256color but this cause blinking all colored text (ls --color, in vim etc.) in real console (CTRL + ALT + F1) . So is there any possibility to recognize in ...
3
votes
2answers
552 views

How to prevent a Qt/GTK app (Calibre) from using colors defined in .Xresources?

I have colors defined in .Xresources. They look lovely on urxvt, and utterly ghastly on Calibre. Calibre does not appear to have any way to disable or override those colors, so is there any way I can ...
3
votes
1answer
83 views

Use a custom colourscheme in Vim

I have customized a color profile for Vim (toto.vim) in the colors folder at : /usr/share/vim/vim74/colors Now, to use it, I am obliged to call it each time I start vim, using the command : ...
3
votes
1answer
187 views

How to disable flashing file names in rlogin

I have a strange problem with my rhel 6.4 system. If I do a rlogin to any of my machines, all the files in the remore machine will be flashing and it is so annoying. Can somebody please tell me how ...
3
votes
1answer
241 views

Cut colored text ignoring color tags

My problem is similar to this one; I want to use cut to simulate a nowrap on tmux, but my output is colored. I know how many columns I want to keep (50) but I don't know how many color tags will be on ...
3
votes
1answer
979 views

git grep colors differ from grep custom colors

I've setup grep colors in my ~/.bashrc : export GREP_COLORS='ms=01;34:mc=01;34:sl=:cx=:fn=35:ln=32:bn=32:se=36' They work for grep --color=auto grep --color=always Unfortunately, those custom ...
3
votes
1answer
123 views

How can i colorize cat output including unknown filetypes in b&w?

I like the colors I have in vim. Can I get my output similarly colorized when I do a cat? I like that I can use the colorize tool as in Colorized `cat` for source and script files?. I would like that ...
3
votes
2answers
426 views

Print console colors

Wrote a bash function to display the console colors. But, it seems some of the colors are not possible to show that way! (?) Also, note the strange "bright black"! (Note: The below screendump is of ...
3
votes
2answers
87 views

Why does the Linux virtual terminal support only 16 colors, by default?

Why does the Linux virtual terminal support only 16 colors, by default? Is there a particular reason for this?
3
votes
5answers
5k views

In bash how can I change the color of my command prompt? [duplicate]

Possible Duplicate: How to customize .bashrc to configure command prompt? When I run a command, I often times have trouble finding the beginning of the command output. An easy fix to this ...
3
votes
2answers
4k views

change prompt color depending on user or root in zsh

in zsh you can have a %# in your PS1 (or whatever PROMPT variable) which basically means display % if user or display # if root. I'm wondering if there is any way to affect this so that the % or # ...
3
votes
1answer
39 views

Fine-tune LS_COLORS for directory suffixes?

I’m fine customizing most settings in LS_COLORS. I don’t need help customizing the colors for different file suffixes. What I would like to do is configure special colors for certain directories, ...
3
votes
2answers
89 views

How to change font colors in terminal?

I know how to change the font color via preferences, but it changes the color of ALL text, as in below:     What I'm going for is something more like this:     Any ...
3
votes
4answers
478 views

Colored output in less when tailing a logfile

I am in dire need of a way to color my less output while reading a file that is constantly being appended. The file in questions is a Resin servlet container log. My current "implementation" of the ...
3
votes
3answers
1k views

Solarized colors in st (simple terminal)

I want to use st with solarized colors like I can with urxvt (of course this is done via .Xresources, in st the colors are defined in a header file). I've tried to put the colors in st's config file ...
3
votes
1answer
64 views

Customizing less colors

When using less in OS X, how can I customize the colors with with things are displayed? When I run less within an ansi-term in Emacs the colors don't come out nicely. $ less --version less 418 ...
3
votes
1answer
71 views

How to set light colors instead of bold in PS (shell prompt)

I have an Archlinux installed on headless RaspberryPi. I'm using SSH to connect to it. I've added some colors to bash with editing sudo nano /home/pi/.bashrc and adding: ...
3
votes
2answers
129 views

customise ls color for directories contain specified file/s

How can I colorize directories contain files with word INCORRECT inside? Example: I have 3 directories which contain log file. dir_a/log dir_b/log dir_c/log The file log in dir_c contain word ...
3
votes
1answer
377 views

Color script output only when invoked from interactive shell

I made a bash script producing colored output. The colors are fine when the script is called from an interactive shell. However, if the output is processed in another script, or passed through a pipe, ...
3
votes
1answer
199 views

Colour bleeds right when writing a custom script in byobu

I am using byobu with tmux backend in Ubuntu 12.04. I am trying write a custom script as shown at the manpage of byobu: #!/bin/sh printf "\005{= bw}%s\005{-}" "$(uname -r)" When being run (using ...
3
votes
1answer
33 views

Make `most` pager properly handle colours from standard‑input

How do I make the most pager properly display colours in text received from standard‑input? Note: I'm not sure whether or not it's a bug in most. I am not encountering the same issue with less and ...
3
votes
1answer
139 views

how to edit and color bash's tab completion list

Following is what i would like to have. When the tab completion is ambiguous, and bash prints the list of possibilities. I would like it to colour the next character I should press inside every word ...
3
votes
1answer
225 views

Set tmux status line color based on hostname

I'd like tmux to pick a color dynamically based on the hostname of the machine. Since I share my tmux.conf across several machines, assigning an unique color for each of those hosts would be handy ...
3
votes
1answer
79 views

How to show console color in Emacs shell

When I run a command by smart-compile, I get string like this. [32mYour bundle is complete![0m [32mIt was installed into ./vendor/bundle[0m I think [32m and [0m represent color in console. Is ...
3
votes
0answers
788 views

ls and vim color on SunOS 5.8/Solaris 8

I want to use ls and vim with color on Sunos 5.8 SunOS 5.8 Generic_117350-11 sun4u sparc SUNW,Sun-Blade-2500 I have installed ls (GNU coreutils) 6.9 and vim 7.2 In ~/.cshrc: setenv TERM sun-color ...
2
votes
3answers
195 views

How can I tell echo/printf in Bash to swallow escape codes, based on a condition?

I have a Bash script that is being run interactively and as a cron job. When run interactively it outputs colored text on the terminal. However, when run in cron it doesn't have a terminal and ...
2
votes
2answers
956 views

How to change the background color of curses applications?

I hate that blue background which is everywhere in ncurses applications like: irssi, mc, tig, … I want to change that color, how can I do it? I know that midnight commander has themes, but what about ...