Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
25
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

[2]Unfortunately, installing Print Services for UNIX means several hours of work for the Windows administrator as she installs the service, reinstalls the latest Microsoft service pack, and then reapplies all the patches that need to be installed on top of that. Don't be too hard on her when she refuses. It will take much less time for you to work around her problems than for her to make your life easier.

Local Printers

If your print server doesn't provide ldp services, or if it's directly attached to the parallel port, there's another process to follow. It's friendly looking, it's script−driven, and it requires you to install a whole bunch more software. Take a look at /usr/ports/print/apsfilter.

The good news is that apsfilter will help you speak CIFS to a remote print server. It will help you configure a local printer, either a fancy laser one or one of those El Cheapo $59 inkjet USB models. You might wind up going through the configuration script several times trying to get it right, unless you know exactly what sort of equipment you have, but it will work quite well once you get it set up.

X: A Graphic Interface

The GUI you sometimes see on a UNIX system is called the X Window System, or X for short. X has some advantages and disadvantages over other windowing systems, but once you get used to it, X can be quite useful.

One of my favorite features of X is that a program can display output on a different machine than it's running on. I frequently run a program on one server and have the user interface appear on my desktop. For example, I only have StarOffice installed on my laptop. When I'm working on one of the servers in my basement[3] and need to whip up a printed complaint letter to a software vendor about their lousy product, I connect to the laptop sitting in the upstairs library and start StarOffice. Although the program is running on the laptop, the interface displays on my local terminal. At times this can actually be more convenient than working on the laptop, as I keep the printer, envelopes, and stamps near the server room.

X Prerequisites

Before you can set up X, you need to know some basic things about your system. Break out the manual for your monitor and try to find the values for "horizontal sync" and "vertical refresh". Also get the manual for your video card and find out its exact model name and number.

X Versions

FreeBSD supports a version of X known as XFree86, which is based upon X version 11, release 6, or X11R6. At the time I write this, two different versions of XFree86 are in use: Version 3.3 is the older, stable standard, while version 4 is the new, up−and−coming standard. The version you have will depend on the default in FreeBSD when you installed.

If you have one version but want the other one, you can uninstall all ports that use X, remove the entire /usr/X11R6 directory tree, and install the port of the correct version from under /usr/ports/x11. (This will take a long time and use a lot of disk space.) You then get to reinstall all your X−dependent ports. Enjoy.

484

Configuring X

To configure X, you can use the text−based tool xf86cfg, or the graphic tools xf86config (version 4) or xf86Setup (version 3). But beware: Unlike just about anything else you can do with a computer, improper use of XFree86 can actually physically damage both your monitor and your video card. If you test your XFree86 configuration and see your screen flare, strobe, or look like it's having any sort of trouble, leave X immediately. (You can force X to shut down with the key sequence CTRL−ALT−BACKSPACE.)

Making X Look Decent

The default X setup is ugly. Really, really ugly. It's ugly because X only handles basic screen drawing. While that's not a problem when it comes to drawing terminal windows, menus, and whatnot, X just won't make very pretty pictures. To make X realistically usable, you'll need some sort of desktop environment or window manager.

The subject of window managers is yet another topic of debate among UNIX users. You can find people who believe that the best window manager in the world is the one that ships with X: twm(1). I have to admit that it's not bad, in a bare−bones, back−to−nature, tree−bark−eating sort of way. If I had a system with only 4MB of RAM, twm would be my choice.

Since any computer I work on these days has more than 4MB of RAM, however, I tend to use window managers with a few more features. If you look under /usr/ports/x11−wm, you'll see quite a few window managers. Feel free to experiment with them. I'll mention four specifically, just because of their popularity and my experiences with them.

Popular X Desktops

My personal favorite window manager is WindowMaker (/usr/ports/x11− wm/windowmaker). It's fast, light, highly customizable, supports themes, and looks darn good on just about any size monitor.

The fvwm2 (/usr/ports/x11−wm/fvwm2) window manager is an old classic that's still in heavy use today. It's very flexible, and all configuration is handled by a text file. It is stable, has a small footprint, and is very reliable. It's also boring.

The most popular desktop environments among many newer UNIX users are Gnome (/usr/ports/x11/gnome) and KDE (/usr/ports/x11/kde2). Both try to be all things to all people. Both include system configuration tools, Web browsers, and office suites. In my opinion, both are painfully bloated and obtuse, much like the proprietary systems they hope to replace. If you prefer a Windows− or Mac−style interface, though, you might be happy with either one of these.[4]

The choice of windowing environment is highly personal. I think it would be interesting to do a psychological study of UNIX users, classifying them by window manager choice. (Useful, no. But interesting.) Play with several, and you'll soon find one that fits your working style.

[3]Before you get too impressed at my having a server room in my house, know that my wife calls the basement server room the junkyard and the machines that lurk therein Frankensteins. I don't see what's wrong with using a 166 MHz Digital Alpha to heat the teapot, but she has other ideas. [4]Gnome and KDE fans would say that my preferred environment lacks vital features. It's all a matter of what you expect on your desktop.

485