SVGATextMode

There have always been a few things about my Linux system that rub me the wrong way, but I’ve put up with them rather than do something about it.  I’ve been using the system more lately, and those “little things” are becoming very annoying.  So this weekend I’m going to see what I can do.  Tonight’s project:  finding some way to display more than 25 lines of 80 characters when I’m in text mode.  In Windows, I use “mode con: cols=100 lines=50”.  I want something similar for Linux.

Here’s an exercise in frustration.  Go to Google and search for “linux lines console” or some such.  Then wade through hundreds of thousands of entries.  Wherever I entered a search phrase for something like that, I ended up with thousands of hits and nothing useful.  Nothing in the shell documentation indicated that I could change the number of lines, so I figured maybe it was a kernel option.  It’s not, but in poking around I found some help text that pointed me to a program called SVGATextMode which is available via FTP from ftp://metalab.unc.edu in the /pub/Linux/utils/console directory.  I went and got the source distribution, but it wouldn’t compile because it was missing some header files.  Maybe I needed to grab something else.  I finally found an older version of the program on my SuSE distribution CD.

I don’t know how it works, and don’t really care (a guy’s got to be selective about what he studies), but the program’s wonderful.  Just edit the /etc/TextConfig file to tell the program what kind of video card and monitor you have (for the monitor you have to specify refresh rates—they’re in your monitor manual), and you’re set.  The text modes that you can display depend on your hardware, but any SVGA card should be able to get an 80×50 mode.  I selected a mode with 51 lines of 100 characters.  The font is very sharp on my 17″ monitor.  Much nicer, in fact, than the font I get on my Windows system.

This program should be installed by default by the distributions that include it, and all distributions should include it (I suspect that the major ones do).  And the distribution’s install program should detect the video hardware (including the monitor if possible) and configure the TextConfig file accordingly.

Now I just need to find a way to have this program run automatically when I boot the system…

Update March 18:  Flipping through the SuSE printed documentation, I discovered that the file boot.local in /sbin/init.d is roughly analogous to the DOS autoexec.bat file.  So all I had to do was add this line at the end of boot.local:

/usr/sbin/SVGATextMode "B100x51"

and now my system comes up in the new text mode.

Amazing what you can learn if you read a little.  I wonder if there’s a decent “Linux for DOS (or Windows) Users” book out there that covers this kind of thing.