Terminal colors and resolution

Peter Garrett peter.garrett at optusnet.com.au
Sat Jul 29 13:50:45 UTC 2006


On Sat, 29 Jul 2006 17:54:02 +0800 (CST)
Soo Qing <sooqing at yahoo.com.sg> wrote:

> My PC is CLI. I would like my terminal to have green
> text on black. My system is without X and I like to
> know which file do I need to edit to do it.

I think you can set tty colours using the "setterm" command ( see "man
setterm" - there are some interesting options in that man page.
> 
> Also, how do I change the resolution of the CLI?

>From memory, there are options you can pass on the kernel line of the grub
bootloader to adjust the resolution in a tty. At the end of the line you
can pass for example " vga=791 "  or other numbers, or you can use
vga=ask , or codes like

res/col | 640x480  800x600  1024x768 1280x1024
--------+-------------------------------------
256     |  0x301    0x303    0x305    0x307
32K     |  0x310    0x313    0x316    0x319
64K     |  0x311    0x314    0x317    0x31A
16M     |  0x312    0x315    0x318    0x31B

That table is from
http://www.linux.com/article.pl?sid=06/05/04/1621224

Which you might find interesting. There's also this:

http://en.tldp.org/HOWTO/Framebuffer-HOWTO-16.html

but it looks rather old...

I found the table below on
http://home.nyc.rr.com/computertaijutsu/grub.html

# VESA framebuffer console @ 1024x768x64k
vga = 791
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769

These numbers go at the end of the kernel lines in /boot/grub/menu.lst 

Hope that helps somewhat. 

Peter









More information about the ubuntu-users mailing list