ALINK="#FF0000">

"Linux Gazette...making Linux just a little more fun!"


SVGATextMode

By Larry Ayers, layers@marktwain.net

Fit More Text On Your Console Screen

Introduction

This summer a new version of SVGATextMode was released, and thinking that many Linux users might be unfamiliar with the package, I put together this review as an introduction to a versatile and useful console utility.

Typically, Linux distributions use LILO as the boot loader, which refers to the file /etc/lilo.conf for instructions. One of the lines in the file is vga = , with either the number of a console video mode following the "=", or the word ask. If "ask" is specified, the Linux boot process is interrupted and you are asked which (EGA) video mode you prefer. An option (thankfully!) is also provided allowing the user to peruse a menu of available console video modes, which varies depending on the video chipset. With my generic S3 Virge card, these modes are offered:

It's nice to have a choice of video modes (which determine the screen font size) but these boot-time options just scratch the surface of what the newer video cards and monitors offer. SVGATextMode is a utility which borrows some of the techniques which the X-Window system uses to exploit the resources of your video system and applies them to the console screen.

How It Works

SVGATextMode actually reprograms the registers of your video card, allowing many more modes than the preprogrammed modes available at boot-up. It borrows some of the techniques used by XFree86 in order to make available more console video modes. The modes provided by your video-card BIOS are EGA modes, and they run at a low refresh-rate and dot-clock compared to those used by X-windows.

The program can be either started at boot-time from one of the init-files, or at any time from the console prompt. When it starts a configuration file (/etc/TextConfig) is parsed. The defaults are very conservative. The file needs to be read and edited before any real advantage can be obtained from the program. This is due to the vast differences in capability between various video cards and monitors. As in X configuration, the correct values for your monitor's horizontal and vertical refresh rates need to be entered in the TextConfig file. If you've successfully configured X you shouldn't have any problems with SVGATextMode.

Configuration and Use

SVGATextMode is what I consider to be a "mature" package, in that it has been under development long enough to have received contributions and bugfixes from a worldwide community of users. Many video cards are supported, though I don't think quite as many as XFree86 supports.

In the default /etc/TextConfig file many of the lines are high-resolution modes contributed by users. Once you have entered your video chipset and monitor timings into the file, the command SVGATextMode -n [mode] will let you know if your hardware can support the mode without actually starting the program. Once you've found some promising modes just eliminate the "-n" from the command and with any luck you'll have the new text mode visible on your console screen. Possibly the screen will be corrupted. Running the SVGAlib utility savetextmode before trying a new mode, then if corruption appears restoretextmode afterwards ought to allow recovery of your previous default text mode. It will take some experimentation, but the package is very well documented and is worth the trouble.

There are some included modes with 160-character wide screens, which can be very useful while running an editor which allows two 80-character pages to be displayed side-by-side. Emacs can do this, and there is a LISP package available called follow-mode which allows both pages to scroll relative to each other.

SVGATextMode doesn't just allow more characters to be displayed on the screen. Even relatively low-resolution modes will look crisper and be easier to read due to the higher refresh rates typically used. The most dramatic advantages, naturally, are evident with newer, more powerful video-cards and large monitors, but even with my middle-of-the-road equipment the utility is well worth using.

Caveats

If you use Dosemu from the console there can be problems. I have to reset the text-mode to my old default 80x43 mode before starting Dosemu or I get unrecoverable corruption requiring a reboot. I haven't had any problems switching from a console session to X and back, but, just as with X-windows, performance varies depending upon the video-card and monitor involved. Read the documentation; it's very complete and a great help while getting started.

Availability

The source package (version 1.6) can be retrieved from the Sunsite archive site or one of its mirrors, in this directory. A binary package for Redhat systems is available here, and a Debian binary can be downloaded from here.


Copyright © 1997, Larry Ayers
Published in Issue 21 of the Linux Gazette, September 1997


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next