Strictly On-Line, LJ Index and more.
Flattery (Venus or Hedwig?)

Linux Mandrake 6.0 is out. I received it twice in the mail, so I know. I also put it on a partition of a VArStation to check it out. That's when the déjà vu came. I knew I had seen that screen before, “Welcome to Linux Mandrake”. Yes, dozens of times, only I seem to remember the phrase was “Welcome to Red Hat Linux”.

Linux Mandrake, you see, is based on Red Hat. It has a newer kernel, runs a well-configured KDE instead of GNOME, professes to be optimized for Pentium family processors, includes the usual Netscape, StarOffice 5.1 (the new version) and Corel Wordperfect, but at this stage it's still more a derivative of Red Hat than a totally independent distribution, at least so far.

One thing I discovered, though, is that Red Hat does successfully probe hardware. In fact, on the VArStation, Mandrake's installer (which is Red Hat's installer with the title changed) probed everything, which is a big improvement from E machines where Red Hat found nothing but the mouse. Even my home computer was never Red Hat probe-able, but then again, it's nearly a century old in computer years. The point is that when choosing between a VArStation, an E machine, and a “computer” from 1996, go with a VAr. Still, how do you decide between Mandrake and Red Hat?

Many people insist that Mandrake is better than Red Hat. Mandrake does come out later (by necessity), so it is more current. It also runs KDE, which seems to be winning the desktop's favor, and its configuration is pretty nice. It has more menu entries than I recall in Red Hat, and more useful links on the desktop (such as XKill). Mandrake also has some kind of automated online software upgrade function which seems to work—it would be so very Red Hat to have something like that. Mandrake also includes 5 CD-ROMs (though with less software than SuSE) and 100 days of e-mail support. (Well, phone support is a bit too social for us computer types anyway). And, it costs less.

Red Hat, even if it is older by an insurmountable couple of months, does have some points in its favor. For one, it has 700+ pages of documentation compared to Mandrake's concise 189. Also, Red Hat is apparently competing with Linuxcare in terms of support, whereas I don't know how Mandrake performs in this area, though they seem devoted to helping the new user. The Mandrake web site is full of enthusiasm about supporting new users, and maybe Mandrake, with its cute magician logo (Blue Hat?) will take an active role in bringing denizens of other OSes across the mountains to the western paradise that is Linux.

Mandrake is such a mysterious, exotic name, one might expect something a little more intimidating than a distribution for newbies (maybe Linux for sorcerers and witches or something). Still, it's a fine distribution, full of energy, with a following, and it's a bit funny (though maybe not intentionally), if you go for that. Linux Mandrake, based on Red Hat, copied Debian's login penguin, uses a blue hat for its logo, the BeOS color scheme in KDE, and named the distribution Venus (that's almost as good as naming a computer Amiga and then naming its chips after the developers' girlfriends). I hope Red Hat responds by naming their next distribution Aphrodite; when I make my distribution which has snakes growing out of the monitor, I'm going to name it... Well, in any event, Linux Mandrake does a good job of introducing Linux neophytes to elements of a few distributions. It may be among the better ones out there, especially for beginners.

Stupid Programming Tricks—>Console Graphics

Many people are bored with the console. “It's just text! Console games are stupid!”, they often announce. However, many games are available for Linux which take advantage of console graphics. They use the entire screen, don't require X and don't have silly borders and buttons all around them. Console graphics are fun, fast, and much easier than graphics in X.

The established Linux console graphics library is svgalib, with its sidekick vgagl. Svgalib is a low-level graphics library, and vgagl is a fast, frame-buffer-level graphics library for use with svgalib, containing many drawing, text, bitmap, screen buffering, palette handling and 3-D functions. Using these two libraries in conjuction makes programming graphics for Linux exceedingly easy, and both are included in practically all Linux distributions. Although svgalib doesn't work on some cards, needs root privileges to run, and may require an immediate reboot or even crash the machine if things go wrong, it usually works and it lets us do much more than X.

Here's a small example of how to get started. Next month, we'll move on to things which look impressive but are just as easy. The full details of svgalib and vgagl can be found with man svgalib and man vgagl. In case you're interested in a particular function, its man page should be available too; for example, man vga_waitretrace. If svgalib doesn't work, install the newest version which supports the new graphics cards. This example opens a graphics screen of 320x200 in 256 colors, draws some shapes, and waits for a key press before exiting. I recommend compiling with this command:gcc -Wall -O2 shapes.c -lvgagl -lvga -o shapes

#include <vga.h>
#include <vgagl.h>
#define VGAMODE G320x200x256
int main(void)
  GraphicsContext *screen;
  char key;
  screen = gl_allocatecontext();
  gl_setfont(8, 8, gl_font8x8);
  gl_write(16, 68,
    "Console graphics are so cool!");
  gl_circle(160, 100, 60, 2);
  gl_fillbox(140, 80, 40, 40, 3);
  gl_line(0, 0, 319, 100, 4);
  gl_hline(0, 100, 319, 5);
  gl_setpixel(160, 86, 6);
  for (key=0; key==0; key=vga_getkey())
  return 0;

—Jason Kroll


Doc Searls is the Editor in Chief of Linux Journal