Jump to content
xisto Community
Sign in to follow this  
jedipi

Can Linux Display More Than 25 Lines display more than 25 lines in console

Recommended Posts

Recently, I need to test a program in linux.The program is running on console mode (xwindows is not started).Screen resolution is 640×480.Only 25 lines of charaster can be displayed.I feel sick to scroll up and down all the time to find out some information.is there any way to make it display more than 25 lines in the linux console mode.I guest, changing the screen resolution may solve this problem!??Am I right?

Share this post


Link to post
Share on other sites

I'm assuming it's 80 characters wide x 25 characters down which is standard Linux terminal size. It does seem it'll be a slim chance that you could change it, although I know you can definitely change it, I don't think that it's display would be great.If you know your program will go over the 25 lines limit run it with | more, e.g. ./yourprogram | moreand this will prompt you to press a key to display more, space bar moves down a whole page.If you do however want to try it out, I'll will tell you how to configure it.Cheers,MC

Share this post


Link to post
Share on other sites

Of course you can change it :P

You send a message to the kernel telling it to use th VESA framebuffer for consoles.
if you re old enough, you will remember that the vesa frame buffer was used before X11 to display graphical games like Quake..

here's how it works...
as root, with your faveorite text editor, open up the file "/boot/grub/menu.lst"

you should see somthing similar to this...

default 0timeout 10splashimage=(hd0,1)/boot/grub/splash.xpm.gztitle Gentoo GNU/Linux (kernel 2.6.10-r1 vanilla)        root (hd0,1)        kernel /boot/bzImage root=/dev/hda2 title Microsoft WindowsXP        rootnoverify (hd0,0)        chainloader +1

you need to add the following t the end of the line that begins with the word "kernel"

vga=0x318 video=vesafb:mtrr,ywrap

0x318 is a kernel resolution code.
any resolution between 600x480 and 1600xSomthing
is possable, but will be limited by your craphics cards and monitors maximum.

0x318 is the mode i use, and gives me approxamatly 50 lines of console..
i think the maximum readable lins is 80, after that the text gets too small.

you will need to keep trying different resolution codes untill you find one that A: is supported by your craphics card. B: is a comfortable font size for you.

here is a list o resolution codes...

taken from http://forums.xisto.com/no_longer_exists/ section 5.3
if the following table doesnt line up / isnt readable, click this link.

Colours  640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200--------+--------------------------------------------------------------
4 bits |    ?      ?    0x302      ?        ?        ?        ?
8 bits |  0x300  0x301  0x303    0x305    0x161    0x307    0x31C
15 bits |    ?    0x310  0x313    0x316    0x162    0x319    0x31D
16 bits |    ?    0x311  0x314    0x317    0x163    0x31A    0x31E
24 bits |    ?    0x312  0x315    0x318      ?      0x31B    0x31F
32 bits |    ?      ?      ?        ?      0x164      ?



You can do som pretty cool things with the frame buffer.
like for example a booting splash screen, with a scroll bar (similar to that used bu windowsXP while its booting)

anyway.. this SHOULD work... it may not if you are using a very old linux distro, or you compiled the kernel yourself, and removed vesa framebuffer support.

enjoy !

Share this post


Link to post
Share on other sites

Thanks guys...I just added vga=0x303 to the end of the line that begins with the word "kernel" in grub.conf.And it really works fine.It is cool when open "multi-windows" in emacs after I set it to 1024x768A logo appear when the system is booting.Thats very cool..

Share this post


Link to post
Share on other sites

thats nothing...

have a look at these consoles (just plain connsoles, X is not running)
http://forums.xisto.com/no_longer_exists/
http://forums.xisto.com/no_longer_exists/
http://forums.xisto.com/no_longer_exists/

anyways, glad to hear it all worked.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.