Forgot your password?
typodupeerror
Book Reviews Books Media

X Power Tools 219

Posted by samzenpus
from the read-all-about-it dept.
stoolpigeon writes "The X Window System has been around for over twenty years and is the display system for an incredibly wide range of operating systems. With the number of Linux users growing, there are more people working with X than ever before. Most modern desktop environments provide user friendly interfaces that make modifying X rather simple. There is not a need to dig into config files and settings as in the past. For those environments without such tools or for the user who loves to dig deep into their environment, this book can be a simple way to understand how X works and how to tweak it in any number of ways. If you want things that 'just work' and have no interest in digging around below the surface this book is not for you. On the other hand, if you think the best thing to do with a shiny new tool is to take it apart, well "X Power Tools" by Chris Tyler may be just for you." Read on for the rest of JR's thoughts on this book.
X Power Tools
author Chris Tyler
pages 254
publisher O'Reilly Media, Inc.
rating 9/10
reviewer JR Peck
ISBN 0-596-10195-3
summary
The author, Chris Tyler, is a professor at Seneca College in Toronto as well as a programmer and Linux user. His first book published by O'Reilly was "Fedora Linux: A Complete Guide to Red Hat's Community Distribution", published in 2006. He cites the growth in X users, combined with active development and the lack of existing books that address X as the motivation for writing "X Power Tools."

X is the windowing system on a wide range of Unix and Unix like systems. Chris is obviously most familiar with Linux and so the material is heavily Linux oriented. This is most apparent when the book deals with Session Managers, Desktop Environments and Window Managers. The material focuses on Gnome, KDE and Xfce and their associated components in regards to X. For the Linux user this could be a valuable resource.

When I've had issues in working with X locally and over the network, I've found that while what I need is available on the web, getting just what I need can be very labor intensive at times. Usually just what I want is spread across tutorials, on-line man pages and forum posts. Sorting out what applies to my situation can be especially difficult when I'm not even sure just how things work for my setup. Chris makes this kind of guessing unnecessary and provides the locations and function of key files. He also spells out how the most important files and tools can be best used.

For the sysadmin on another platform, these Linux specific sections are not going to be much help. Most of the book though, deals with X itself. I've already loaned my copy to one of our AIX admins more than once and I think he plans on picking up a copy of his own.

When Gnome and KDE provide an interface for modifying or customizing X functionality, the book gives at least the name of the program and sometimes screen shots and explanations of how the tool works. This is always after an illustration of how to get the job done with the tools that are a part of X itself. From fonts to keyboard layouts, multi-display to kiosks, everything required is laid out in straight forward terms.

For me, as a Fedora user, this means that having read this book I approach my work environment with a new level of confidence. Behaviors that used to puzzle me, now make complete sense. Quirks that bothered me, no longer need to be tolerated as I know have the tools to get things working just the way I want, rather than using defaults.

The book has just come out, so it was being written before the release of KDE 4. I've looked through the documentation and I don't think any of the changes to programs like KDM or KWin make the information in the book out of date. In fact, according to the KWin release notes, when discussing KWins new compositing support, "...manual configuration of X may be required for proper results..." So if you are a KDE user that likes to live on the edge, this book may come in handy.

O'Reilly says that their "Power Tool" books are comprised of a series of stand-alone articles that are cross-referenced to one another. To be honest, it didn't feel much different from reading any other tech book. Topics flowed naturally and the articles are analogous to sections that divide up chapters in other books. One nice navigation feature is that page numbers are on the bottom of the pages while chapter and article numbers are at the top corner in a decimal notations. For example at the top of page 58 there is a grey square containing the number 3.13 which means that it is the 13th article in chapter 3.

The book has a thorough index. It also comes with 45 days free access to an electronic version through O'Reilly Safari.

For me the only real weakness of the book is that I would like to have seen more information on working with X on Unix. When reference is made to specific implementation of X it is almost always in regards to Linux. I wouldn't want to lose that, but I think a mixed environment of Unix, Linux and Windows is more the rule than the exception today. It would be more work to include other operating systems, but it would have also made the book much more valuable.

All tech books face the danger of becoming quickly useless as progress marches forward. X is actively being developed, but at the same time, looking back on its history I think this book will be useful for sysadmin and user for some time to come.

You can purchase X Power Tools from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

X Power Tools

Comments Filter:
  • by Anonymous Coward on Wednesday February 13, 2008 @03:24PM (#22410658)
    That's an invalid argument. X works. In this case, you might know your car isn't getting forty miles per gallon like a hybrid, and don't know enough to convert it into one. Neither do most people. So just shut the fuck up unless you've got something to offer. It'd be awesome if someone would convert my car into a hybrid for me. It isn't likely to fucking happen--it might if enough FOSS people got together and came up with something though.
  • by canuck57 (662392) on Wednesday February 13, 2008 @03:44PM (#22410992)

    I know X is entrenched and all, but really, aren't we all fed up with this dinosaur? A new window system might be a good thing for Linux as a whole.

    Why does every new kid on the block insist you have to replace it to be any good without knowing how much effort it takes to get a GUI working right?

    X-Windows is also 1984 from MIT as Wiki on X-Windows [wikipedia.org], which makes it almost 24 years old. And components of it likely existed before it's 1984 debut. It has had a lot of years to become polished. For without it Linux would likely still have some proprietary GUI that can't be used with other hosts. That is, I enjoy login into Linux, login to a different vendor of Linux or perhaps a BSD, AIX or Solaris....and it works!

    I will admit, having used and programmed X-Windows from almost year one, it was initially heavy, had alignment bugs and was no where near like today's X. It was in fact ahead of it's time but now that the graphics hardware has enough juice it is in it's prime. A portable inter-operable network/GUI.

    And just so you don't think this fossil is stodgy, GTK is a fantastic Motif replacement. You should try it, real nice.

    Don't try to make Linux look like Vista, Vista will not last. And X-Windows will outlast Bill Gates himself. Bills empire still can't do portable Windows without outside help. Perhaps spend your time with that new X-Windows desktop for Linux, the one with the cube.

  • by ettlz (639203) on Wednesday February 13, 2008 @03:46PM (#22411034) Journal

    When XP was first released its windowing system actually felt more responsive than X11 did on the hardware from that time.

    This is what you get when most of your windowing system is run in the kernel: the low-level drawing and management routines are just a syscall away. Plus I believe the Windows window system is multithreaded (or, at least, much of the stuff runs in the applications' threads when they make windowing calls). X.org, on the other hand, is single-threaded and runs as a user-space process, so there's also context switching overhead. [All that "Ha-ha, NT runs its video drivers in the kernel" stuff is misleading; the criticism wasn't that the hardware support was in the kernel, which is where it should be, it was that a load of management stuff was there too.]

    Personally I'd like to see a lot change in the structure of X11. I'm not fond of the way the 2D stuff appears to work by acquiring privileged maps to areas of physical memory, effectively subverting the kernel. I'd much rather it were all built using DRI. In-kernel modules would be responsible for mediating access to hardware registers. The heavy lifting and config part of the drivers should be done in user-space (much like MesaGL) with a minimal multi-threaded graphics server. X11 would be run as an application on top of this to provide network/legacy support, etc. But then again I'm not an X.org developer and they probably know better.

  • by Anonymous Coward on Wednesday February 13, 2008 @04:06PM (#22411318)
    It's good to look at why one wants to replace something, and not replace it if it's not broken.

    But really, X *is* a dinosaur. The drawing operations it has to support were neat when we had 1-bit displays, but aren't that useful (or accelerated) on modern hardware. Its imaging model is completely different from modern printers and page definition languages. Antialiasing and transparency (at the window level) is obviously an afterthought, and resolution-independence was an early goal that nobody really got working. Font support is only so-so. Color calibration is basically nonexistant. It has a bunch of individual features which run great, but not with each other, like OpenGL and video and Xinerama. Compositing support is still kind of flakey. Network support can be useful but X11 screwed up the design. The Unix Haters' Handbook has a whole chapter of other issues.

    And sure, we could (and probably will, eventually) fix each of these things. But X11 seems to never drop its old baggage, even when nobody's using it. So when somebody wants to fix fonts or colors, they'll do that by adding new extensions (which have to be installed in the server, yay), and now we'll have N+1 ways to do these things, and still most people won't use the good new way. Anybody who's done software testing can tell you about the reliability of N orthogonal features; it's no wonder compositing + video + OpenGL + Xinerama doesn't work.

    There's something to be said for wiping the slate clean and saying "OK, it's 2008 and we now know how to do compositing and acceleration and video and fonts and colors, so we're going to throw out all the dead ends we've created in the past 25 years, and start fresh". (You can even run X11 inside whatever graphics system we create, like X11.app on the Mac.)

    Writing a network protocol for a graphics system isn't fundamentally that hard to do. There's no black magic here. Linux users claim to know better than anybody the problems with a monoculture. And yet, X11 is so monstrous that there's really only room for one implementation; there simply aren't enough graphics geeks who are willing to put up with the pain of maintenance to support several. So when Xorg forked, it was a Really Big Deal. It shouldn't be! Note that the programs that open-source does best are those that we have a million of (like text editors, or chat clients, or MP3 players), and those that we always complain about are the big monsters that nobody is crazy enough to write a new implementation of (X11, OOo, Moz). I do not believe this is a coincidence.

    I would really like to have a graphics system that is simple enough that I (with only a 4-year degree in computer science) can understand, and which we're using because it's the best design we can come up with, not because it's the only free windowing system we could find in 1984.
  • by SL Baur (19540) <steve@xemacs.org> on Wednesday February 13, 2008 @07:24PM (#22413798) Homepage Journal
    It's not that it's difficult, they do a pretty good job now, it's that noone has come up with anything better. A decade ago, some guys got together with something called GGI which was intended to be a non-networking X11 replacement. Its main distinguishing feature was that it would be closely tied to the kernel, much like the graphics in Microsoft Windows is tied. Nothing much came of it.

    The biggest problem with X11 has always been looks. Always. The core stuff is ugly, difficult to code with, ugly, not integrated into a single desktop environment and did I mention that it's ugly? The KDE guys fixed all of that, though X11 has been pretty decent though not always integrated since X11R4.

    My biggest like about X11 is how easy it is to network with. Your server runs locally, your windows can run natively on any machine in the world. Outstanding!

    It's not broken, so it really doesn't need any fixing or rewriting for the sake of rewriting and I like my KDE/X11/RedHat workstation at work more than I like my MacBook Pro.
  • by Bryan Ischo (893) on Wednesday February 13, 2008 @07:34PM (#22413916) Homepage
    I'm not offended, although I purposely tried to make myself sound that way in my post to incite your response. So I guess two can play at that game huh ... :)

    As a final point, something I mentioned in another post I made just a minute ago to another poster in this thread ... I think that a large part of the perceived inadequacy of X is due to the nature of modern desktop implementations. I'm really going to show what an old man I am here, but I *still* run twm, one of the original X window managers, and I have it 'tuned' using a configuration file that does things like remove window title bars (they waste space don't you know), and binding most windowing operations to keypresses (or key/mouse combinations). I don't run any kind of 'start' menu bar, I just type the command name of any program I want to run into an xterm. While my desktop is in no way representative of the reality of modern desktops, it does demonstrate, I think, that performance is to a large degree dependent upon the complexity of the desktop, much more so than the underlying graphics subsystem. All X programs have always run speedily for me, because there is so little running on my system and contending for CPU and video card cycles. I have no fancy effects going on. No D-Bus servers, or clients, no big and complex window managers like the K window manager or whatever one Gnome uses. It's all streamlined and simple. And as a result, I get to see the performance of X when it's not bogged down with 'crap', and honestly, it's pretty good.

    I mentioned in my other post about how my father-in-law's approach to computers is to buy (or build, actually he likes to build his own systems, to his credit) the fastest stuff available, and the absolutely *load* it down with the newest version of Windows and every task bar application, quick-launcher, drag-and-drop utility, browser toolbar, etc, that he possibly can. It is absolutely no joke when I say that he, for example, will have two or three browser toolbars installed at once (who needs BOTH Yahoo and Google toolbar at the same time? You end up with the top 1/3 of every browser window being covered in little buttons and doodads that are totally redundant and useless). And he'll have 2 or 3 drag-and-drop CD-burning applications running from the taskbar at the same time. On top of that, every little task bar icon known to mankind; there'll be literally 15 - 20 of them in there. His computer, despite being way faster than anything I ever owned, boots in like 5 minutes, and once booted, every windowing operation is sluggish; redraws can be watched as they occur. Opening windows or pulling up the Start menu or clicking on a drop-down menu literally takes several seconds. It is insane.

    This is an example of how the exact same poor performance that you are ascribing to X, can be achieved on the supposedly superior (from a performance perspective) Windows "directly in the kernel" graphical system.

    I installed Linux on a USB drive and booted his same computer up with it, and it was so fast and snappy in comparison to his Windows XP installation, it was amazing.

    So my point is, that really the slowness is almost certainly caused by the amount of work being loaded onto the graphical system, not by the underlying performance of the system itself. And Windows and X are no different in this respect.
     
  • by krmt (91422) <therefrmhere@yahoo . c om> on Wednesday February 13, 2008 @11:22PM (#22416160) Homepage
    (Argh, why did I not use preview? Sorry, posted again with formatting!)

    It's not at all clear that we could gain anything by starting over, and in fact we'd probably lose quite a bit. Yes, there are old methods to do things, but they are being deprecated or replaced outright. XCB replacing Xlib is a particularly good example, as is the replacement of server-side fonts with client-side. Essentially these things aren't real issues any more, so they don't take up any real mental bandwidth when you need to work on X.

    The drawing model and things that the UNIX Hater's Handbook talks about have been pretty well addressed over the last half decade. Cairo is the official replacement for the old drawing model that X provided, and Cairo works really well and is getting better all the time.

    The problems you're talking about, like compositing well and having video work well with OpenGL, are not trivial problems, and they are often unsolved. We don't really know how to accelerate all sorts of rendering operations (glyph rendering is proving to be particularly difficult at the moment, for example) and for things like video in a composited opengl context it's highly unlikely that the code would get written any faster or cleaner if you were starting from scratch rather than reworking the existing codebase to make this necessarily complicated thing happen.

    You're also ignoring many of the problems that X solves remarkably well. It's an incredibly modular design that allows for extensibility with simultaneous backwards compatibility. It actually does a very good job of managing windows. Finally, it does a ton of the dirty work like knowing how to read EDID blocks, parse a configuration file, or allow drivers to execute x86-mode BIOS calls on non-x86 hardware. All of this can be unpleasant code to write where you'd gain little or nothing by rewriting it.

    So yeah, a cleaner design would be nice, but a vast amount of code has been fixed by deletion from the X server, to the point where the size of the server actually has gone down between some releases. So things are improving, and while it's slow, at least it's moving at a visible pace these days. Because of this, I'm really not convinced that starting over would get you more than the joy of reimplementing solutions to hard problems.

"Everything should be made as simple as possible, but not simpler." -- Albert Einstein

Working...