The course is part of this learning path
Building and maintaining Linux graphic desktops
This course - the seventh of eleven courses covering LPIC-1 Linux certification - will explore Linux Display Managers and graphic Desktop Environments. You will learn how to:
- configure hardware peripherals for use in a GUI environment
- control graphic login sessions
- manage Display Managers like LightDM
- enable and manage Linux accessibility utilities to ensure that users with disabilities can access system resources, and
- build a graphic user interface on top of a virtual server in Amazon's AWS.
If you have thoughts or suggestions for this course, please contact Cloud Academy at firstname.lastname@example.org.
As you are probably already aware, these days the XWindows system on most Linux distros will automatically recognize the hardware peripherals, like monitors and mice, that are connected to the system. But this won't always be the case, especially if you ever have to work with minimal or older hardware running some of the less consumer-oriented software packages.
Therefore, a Linux sysadmin needs to know how to work with all of the available configuration tools. But before we get to that point, it's important to know how to find out whether a particular hardware device is actually compatible with the Linux kernel. Checking in advance can obviously save you both unnecessary expense and trouble. Depending on the class of peripheral you're looking at, there's actually quite a range of excellent community and vendor based resources. Video cards are often very complicated devices to get working on non-mainstream systems, and there's plenty of help available online.
Configuring Linux desktops using xwindows
http://xorg.freedesktop.org/wiki/projects/drivers contains links to information on most major and some minor chip sets. As it turns out, in many cases, you won't even need to go that far. The man help system has more useful information on this than you might think. Running Man ATI for instance, will give you a compatibility overview of all ATI graphing drivers. Man trident will do the same for trident drivers.
Once you're confident that your device should work, you'll have to actually get it going. If Linux doesn't pick up the device on its own, you might need to work with configuration files. For XWindows, you'll need to edit either xorg.conf or xf86Config. Both of these files will usually live in the /etc/X11 directory. Note the X of X11 is upper case. But here, things get a bit weird. If you're running Ubuntu or Fedora, or another modern consumer friendly distribution, then neither of those two files will likely exist. The standard setup simply doesn't use them anymore and hasn't for years. But that doesn't mean you can't create your own. And as I mentioned just before, if you're trying to get a non-standard hardware combination going, or you'd like to change the mode used by a video driver, you may very well need to create one.
Here's a sample XOrg.com file. You can see that the file is divided into sections, like server layout and files. Most sections contain information identifying a device and setting the mode and configuration in which it'll run. Thus, the first input device section identifies a mouse, its driver, and a number of options. The second input device section does the same for a keyboard. The monitor section identifies your monitor and the device section, your video driver.
This next section, called Screen is interesting. It binds together the video driver from device, and the monitor from the monitor section. The most important section of them all is server layout, which in this example, is all the way at the top. Server layout glues all the sections together into a single working hardware profile.
Linux comes with some very useful configuration diagnostic tools. XWinInfo will display information about a particular window. Let's run XWinInfo from this terminal and then click on the terminal itself. Of course, we could also have clicked on any other window that happens to be open on our desktop. We're given the window's current screen coordinates, size, color depth, and other details. If you're on a system that has access to multiple monitors, you might want to confirm how a particular one of them is designated. This you can do through the display variable. Running echo display, taking care to type display in upper case characters, tells us what we want to know.
XDPYinfo, which I believe stands for X Windows display information, will return the current system display configuration, along with all the alternate display and modes that are possible using your hardware profile. As you can see, the problem with XDPY info is that there's really too much information to absorb so quickly. Let's slow that down a bit by piping it to less, which will let us view it one screen at a time. Now we can see information about display size, a list of available extensions, and then details about the screen's capabilities. I have to admit that I don't understand too much about this, but one day you might really appreciate it.
Controlling access to Linux desktop sessions
Since it's possible for remote users to log into your machine and start a graphic session, for security reasons, it's very important to know how to control who and if anyone will be allowed. Naturally, your private IP address should never be exposed to anyone outside your local network, and if your routing rules are properly set up, that should never happen. But you might also want to control which local network users are granted access.
You do this with xhost. xhost followed by the plus sign, will enable graphic access to anyone. xhost and the minus sign will restrict access to anyone who hasn't explicitly been allowed. You can permit access from computers using a particular IP address using xhost + followed by the IP address. And xhost with the minus sign and an IP address, will remove access from an IP address that had been previously allowed.
Finally, the LPIC expects you to be familiar with the X font server. Now I have to tell you that the people responsible for maintaining the LPIC exam, who do a terrific job by the way, already three years ago, seem pretty much an agreement that the X font server should be removed from the list of exam expectations. They know that there's no way anyone will ever again have to actually use it, nor has it been used for many years. I'm not exactly sure why then, after all these years have passed, X font server is still there. But in any case, consider yourselves familiar with it.
Let's review. You can use the man system to view configuration details for a graphic hardship sets, the files, XOrg.com and XF86config found in the /etc/x11 directory are used to configure system peripherals. The screen section of the XOrg.com file binds together data from the monitor and device sections, and the server layout section glues all sections together to create a total system profile. XWin Info displays information about a particular window. The display variable contains your display designation. XDPY info returns information about your current display. xhost + will allow access to any remote graphic logins, xhost - will restrict access to all but explicitly approved logins. xhost + and an IP address will add the address to the allowed list. And xhost - and an address will remove that address from the allowed list. Finally, X Font server doesn't do anything at all.
About the Author
David taught high school for twenty years, worked as a Linux system administrator for five years, and has been writing since he could hold a crayon between his fingers. His childhood bedroom wall has since been repainted.
Having worked directly with all kinds of technology, David derives great pleasure from completing projects that draw on as many tools from his toolkit as possible.
Besides being a Linux system administrator with a strong focus on virtualization and security tools, David writes technical documentation and user guides, and creates technology training videos.
His favorite technology tool is the one that should be just about ready for release tomorrow. Or Thursday.