Slashdot Log In
X Power Tools
Posted by
samzenpus
on Wed Feb 13, 2008 02:37 PM
from the read-all-about-it dept.
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.
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.
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.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
IT books rarely go out of date (Score:4, Insightful)
Proper qbasic program? (Score:2)
Bad review (Score:2)
Re: (Score:3, Insightful)
Re: (Score:2, Informative)
* What are the chapters?
* What detail does it go into?
* Who is it aimed at?
* Would a newbie find it useful or bewildering?
* How expensive is it?
* Is it easy to use as a reference or do you read it cover to cover?
* What didn't you like about it?
* Was there any bad information in there?
* When you say it's more linux aimed, to what degree?
Those are just some of the questions I can come up with from the top of my head...
My only suggestion for X (Score:3, Insightful)
This isn't a troll; monitors and graphics cards have been able for donkeys years to tell the OS what resolutions and refresh-rates they are capable of for years now and X hasn't caught on.
And that's pretty much my only complaint.
Re:My only suggestion for X (Score:4, Informative)
Parent
Re: (Score:3, Informative)
Now go to your nearest Mac, plug in a second display (while it's running), and watch what happens. Then go to your nearest Linux box, plug in a second display (also while it's already running), and watch what happens. Note that the Mac was using both displays about 4 seconds after you plugged it in, and the Linux box was not.
Re:My only suggestion for X (Score:5, Insightful)
Actually it already works now. I'm running Ubuntu 7.10. Not too long ago I plugged in a beamer into my VGA port, and it... just worked! No configurations, no restart, it Just Worked(tm).
If you're going to whine, at least make an effort to stay up to date with the facts.
Parent
Re: (Score:3, Insightful)
But I do agree, most of whats
Re: (Score:2)
X.Org 7.4 doesn't even seem to need a config file at all.
Re: (Score:2)
Xorg does this just fine on vaguely modern hardware that doesn't need extra hacks. (Intel, I'm looking at your graphics chipset!) It's the distro's configure script that isn't up to the job.
Of course, you COULD contribute a better script...
Re: (Score:2, Informative)
And restart it. Seriously. Since about a year, the best way of running X on a PC is to let it autoconfigure itself without any configuration file, not even the one generated by some distro-supplied automatic configuration system.
Re: (Score:3, Informative)
This isn't a troll; monitors and graphics cards have been able for donkeys years to tell the OS what resolutions and refresh-rates they are capable of for years now and X hasn't caught on.
Uh? Xorg (and XFree86 before) have been querying monitors characteristics via DDC for years. HorizSync and VertRefresh are just for really ancient monitors/graphic adapters. Look here [tldp.org] if you don't believe me.
The best thing about Xorg documentation ever: (Score:5, Insightful)
VIDEOADAPTOR SECTION
Nobody wants to say how this works. Maybe nobody knows
On the more serious note, Xorg might have some misfeatures and shortcomings - that don't really justify everyone whining there, but, well, it's kind of typical - but the sheer fact that something designed over 20 years ago to operate with hardware and software long forgotten still does its job well and manages to keep up with other windowing systems even when it comes to bells and whistles (Composite, etc.), while being ABI (ABI, mind you, not API) compatible with software that actually is 20 years old, means something. That's one solid piece of engineering, the kind one doesn't see often.
XDMCP: Help please! (Score:2)
Re: (Score:3, Informative)
-matthew
Re: (Score:2)
Even on Ubuntu 7.10, it's still a beast to deal with. I don't have hardware ordered specifically with Linux in mind, I need Linux to work without that.
Re:So when do we get its successor? (Score:4, Insightful)
You don't install ANY OS on hardware without considering driver support.
MacOS is no different. Various forms of Windows are no different.
Linux and X are not alone in this.
That said, I've never gotten all the whining. I've put no more
effort into buying machines and vidcards that I would have done
to avoid a lemon under Windows. Yet I've managed to avoid problems.
Slackware 96 was not pretty but it wasn't painful in this regard at all.
Parent
Re: (Score:3, Interesting)
The biggest problem with X11 has always been looks. Always. The core stuff is ugly, difficult to code with, ugly, no
Re: (Score:3, Insightful)
Re: (Score:3, Insightful)
Re: (Score:2, Insightful)
Re:So when do we get its successor? (Score:4, Insightful)
Parent
Re:So when do we get its successor? (Score:5, Insightful)
Parent
Entitlement Complex in Open Source Software (Score:4, Insightful)
If you know him personally or if it's a side project or it interests him enough, he may do it for free. That's his choice as to how to spend his time. However, the vast majority of programmers in the open source community think that X works. They aren't interested in pursuing an alternative, at least not for free. I'll bet if you offer to pay their salary, their interest would be piqued. I'll bet if you had the skills to write one on your own, you could do it and attract some mindshare. Now, and this is key, sitting around on Slashdot and bitching about it won't solve the problem.
Do it yourself because you are interested, hire someone else to do it, or accept that the vast majority of open source development is done because it's in the best interests of the person working on a particular project, and right now, the consensus amongst open source developers is that the X Window System works.
Parent
Re:So when do we get its successor? (Score:5, Insightful)
> but it's gotten tiresome - it doesn't actually address the criticism at all.
Actually it is more response than the original poster deserved. Go reread it, he complaimed that it is old. No specific complaint, no suggested solution.
And you fail to understand the FOSS idea. The line between users and developers doesn't exist. If you don't like it you are free to fix it. Iven if you aren't a uber coder who can write GL drivers in their sleep you can at least learn enough to make good guggestions, bug reports or hell, contribute some better documentation. If you can't code or at least understand the system enough to make constructive criticisms and suggestions for improvements then you really should just shut up and accept what you get because talking from ignorance just reduces the signal to noise and makes it harder for those who do have a clue to get on with improving the stuff you use.
10 to one both you and the original poster don't even realize GNOME and KDE aren't even part of X. That sort of ignorance is what makes every thread about X devolve into silly rants about GUI usability and brings out the Mac fanbois. X itself is just fine now and with some of the current improvements working their way towards mainstream it will only get better.
Parent
Re: (Score:3, Insightful)
Absolutely. That's why I find the standard response of "well fix it yourself" to be so boorish and irritating. Criticisms should not be dismissed simply because they come from someone who's not a programmer. I think you put it very eloquently when you talk about helping people to contribute.
Re: (Score:2)
Re: (Score:3, Insightful)
If you didn't pay for it and you don't like it you have two options:
1) Write something better. Surely you can because you know what you don't like about the old one, right?
2) Shut the fuck up, grow a set, and realize that the open source community is not your personal bitch.
You are exactly the reason why I gave up writing open source software. You had
Re: (Score:2)
Re:So when do we get its successor? (Score:5, Informative)
From Alan Coopersmith [opensolaris.org] of Sun Microsystems:
Parent
Re: (Score:2)
Didn't Windows at some point suffer from having all the graphics stuff running in kernel mode? I'm pretty sure you wouldn't like loading a multi-megabyte module into your kernel. The size of the NVIDIA closed source kern
Re: (Score:2)
Re: (Score:2)
Why? What's wrong? We have hw acceleration, we can use it over the network, we have nice toolkits that work on top of it, it has good documentation and nvidia, ati and intel write drivers for it. Why change it?
Re:So when do we get its successor? (Score:5, Interesting)
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.
Parent
Re: (Score:3, Interesting)
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
Re: (Score:2)
*My experience with NX has not been that great, both from a use and configuration standpo
Re: (Score:2)
The general defense I keep seeing for X seems to be that people "aren't criticizing it properly". As if to say that just having problems with X isnt sufficient if you don't fully understand and can vocalize on those problems in a tech-savvy manner. In the past year, I don't know how many X problems I've run into, *most* of them being r
Re: (Score:3, Insightful)
The problems of being single-threaded are simple and easy to find: something hanging causes all updates to stop. The bugs that you get in multi-threaded code are generally much worse: locking problems and concurrency i
Re:So when do we get its successor? (Score:5, Interesting)
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.
Parent
Re: (Score:3, Informative)
Re: (Score:2, Informative)
It's not so obvious anymore on todays multicore, multi-GHz numbercrunchers with gigs of RAM, but X11 is a lot of things, but _not_ speedy. They didn't even try to make it speedy - the network transparency layer (among other things) creates so much overhead it was a pain to use X11 until relatively recently.
When XP was first released its windowing system actually felt more responsive than X11 did on the hardware from that time.
Re:So when do we get its successor? (Score:5, Interesting)
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.
Parent
Re: (Score:3, Informative)
You ever run into the issue that Firefox scrolling is sooo slow? Its probably because the scrolling routines aren't being 2d accelerated like they should be.
Putting too much in user space might seem like a good compromise, but depending on how often you context switch to achieve thi
Re: (Score:3, Insightful)
Have you measured the cost of network transparency, and would you be willing to debate Jim Gettys and Keith Packard about that being one of the bottlenecks? (This is one of the persistent myths of X11.)
Causes For Rendering Bottlenecks (Score:5, Informative)
As for rendering bottlenecks, they are many and varied and none of them have to do with the network transparency issue. When local clients talk to a local server they do so via local sockets or shared memory, both of which are very fast and impose minimal or no penalties.
What accounts for bottlenecks are things like the inability to do compositing, leading to tearing of windows when they're being dragged. This is fixed by the composite extension and a fast compositing manager, like the one found in compiz.
Another issue is that the old driver architecture (XAA) was geared towards old-style drawings. These days we don't really look at stipple patterns much, so the new driver architecture (EXA) is geared towards solid fills and fast blits for bitmaps instead, which is what you end up doing on a modern desktop anyway. It turns out though that this is very hard to get right and the bugs are still being worked out. I don't think that this is really an issue with X being old so much as that this is just a damned hard problem to get right. It is being worked on (check out Carl Worth's blog for some examples on this particular front) so hopefully things will improve.
Finally, there's the constant bottleneck due to incomplete or inadequate drivers. The new radeonhd, for example, only recently gained 2d acceleration support, and still lacks any sort of 3d accel. This sort of problem prevents X from adequately taking advantage of all the hardware has to offer, so performance can suffer. As a result, you lose the ability to run things like compiz, which address these issues.
Finally, I haven't watched it yet, but I recommend you take a look at Keith Packard's google talk on remaking X [google.com]. X has been largely rebuilt from the inside over the past several years, and things like Render, RandR, Composite, Damage, Fixes, Input Hotplug, and EXA have really sprung from that initiative. It's wort
Parent
Re: (Score:3, Interesting)
As a final point, something I mentioned in another post I made just a minute ago to another poster in this thread
Re: (Score:3, Informative)
Let me put it this way. If we were to come up with say, a new open standard for a window system API, and all the associated drivers necessary for it, etc., and we were to submit that to ISO, we would call it something like the Open Window Standard or somesuch. X.Org would rename themselves to "Open X.Org." X is as much a defacto standard as .doc, but that doesn't make it good. And anyone whose ever had X break on them can testify to the fact that it's just not an elegant solution for how to do things. It's inefficient, it's monolithic, it doesn't play well with multiple processors, it has all these flaws. I didn't think I had to bring those things up: this is Slashdot, we know the flaws are there. Dammit, we should be complaining about them shouldn't we?
Actually, here in slashdot what we get is lots of people, much as yourself, mentioning flaws. But very few people have any real idea of what they are talking and about one third (being generous!) of the posters are probably among those that think that KDE is a window manager, that QT and GTK are part of X, and that have some very mystical and completely misguided understanding of how the SELECTION protocol works.
There are flaws. This is obvious from reading the mailing lists of the X developers. But your
Please put an end to this meme. (Score:3, Informative)
Are you sure? I've personally used X on these machines:
http://en.wikipedia.org/wiki/SPARCstation [wikipedia.org]
http://en.wikipedia.org/wiki/Intel_80486 [wikipedia.org]
http://en.wikipedia.org/wiki/SGI_Indy [wikipedia.org] With accelerated 3D in 1993.
Not to mention a bunch of other machines I can't find convinient references for. Bear in mind that a well written X11 program will still display on those machines (albeit probably missing some modern feature