Terminal color schemes 101

Fri 25 January 2013

When I first started using the commandline like all other newbie Ubuntu users I fired up Terminal. Later I moved to yuakake then to Guake then to Tilda and now doing a full circle as I have come back to my first love, GNOME Terminal. As life would I have it I have had the opportunity to re-write Terminal help in mallard and what better way to start a rewrite than to research a bit into its behaviour?

Basics: Color representation

GTK use 16-bit color components. so RGB color is represented as rrrrggggbbbb. For example (-> indicates equivalent to), the color #26268B8BD2D2 -> #268BD2 -> RGB (38,139,210). [1] You need not memorise these values. You can pick colors of your choice using a color picker (inbuilt into Terminal or an external program)and it will give you the color code in 8-bit format which you can convert to 16-bit format as seen above.

Basics: Jargon - terminal, terminal-emulator

A text terminal is command line interface (CLI) that lets you execute commands and programs. A terminal emulator is a program that emulates a text terminal inside a GUI environment.

Basics: Access your terminal

By default, you should have access to terminals in two ways:

  1. Press Ctrl + Alt + F1 on your keyboard to view the "tty" (text terminal). You can come back to your GUI environment with Ctrl + Alt + F8. F1 to F6 are the different text terminals available. So instead of F1, press Ctrl + Alt + F2 and you will shown tty2 and so on.

  2. Menu> Applications>Accessories>Terminal should be the default way to access Terminal on Ubuntu, however if you have any other distribution installed, then please check under System in Applications menu.

Basics: Know the colors tab in Terminal>Edit>Preferences

There are 2 ways of setting custom terminal colors.

A. Choose from available color schemes option

picture alt

picture alt

As you can see drop down menu listing options such as "white on black" and "custom" are presets. The colors boxes showing a color when clicked give you a color picker, these change the preset to "Custom" when select a different color. So the idea you select a preset and you can modify specific colors in it to your taste, this switches your color choice to "Custom". In case you are not happy with your custom choices, simply select back your preset. Preset colors will be restored. Last selected colors will still remain in "Custom" option the preset drop down menu. (sorry I was unable to capture drop down menu fully even timed screenshot using the gnome-screenshot utility doesn't capture the opened menu). Guide to some nice 3 color presets

B. Use gconf-tool to directly set all colors from command line either according to your choice or usisng a preset available on the internet. Check out this article.

[1] devav2's answer on askubuntu, a community help website

Category: Internship