X Window System Look and Feel


It can only get better from here. Let's continue our lesson and learn more about customization. Launching the X Window System is mostly the responsibility of the particular window manager you've chosen to run. This section will help you learn which window manager to use based on your particular needs. For now, though, let's talk generally about what window managers can do for you and why you may want to use them.

Today, there are many window managers to choose from. Selection is good; it maintains competition, which leads to increased value in the products you use. As with all competing products, some window managers are good and some aren't. Although there are differences from one manager to another, all window managers are similar in operation. For example, most window managers for X are designed for use with a three-button mouse. The buttons on the mouse serve the following purposes:

  • The left button is used for pointing, clicking, and selection.

  • The center button is used for general functions, such as moving or resizing windows.

  • The right button is used for application-specific functions, such as opening in-application pop-up menus.

You do not have to use this mouse layout and it can be changed. However, it's helpful to remember these designations if you want to implement and use the third mouse button for your Unix system, or if you want to know what all three buttons will do by default.

The X Window System environment also uses the concept of focused input when you type on your keyboard. What this means is that when you work with Unix, you can basically focus your input wherever you want as long as your system is configured to do so. In X, there are multiple options for focusing your input. Most window managers can be configured to

  • Focus input on the foremost window

  • Focus input on a selected window

  • Focus input on whichever window the cursor is over

When you configure Unix to focus on the selected window, X does not need to be the selected window. It's also helpful to know that when you configure a window manager to focus input on whichever window the cursor is over, you can direct the input into a window that may be partially hidden. In Microsoft Windows and Apple Macintosh, the active window is the dialog box that is in the foreground. If you want to use a background application, you have to select it, thus bringing it to the foreground. With Unix, by simply dragging the mouse pointer over a background window, you can activate it and ensure that it's running as if it is in the foreground. Thus, as a learner of Unix, you may get confused and not be working in the window you thought you were. Be careful as you navigate and pay attention to where your mouse pointer is if you attempt to work in a window that does not appear active.

Let's review the .xinitrc file once more. When looking at the file, pay close attention to the xrdb command on the second line. What is this used for?

 #!/bin/sh xrdb -load $HOME/.X11defaults 

To answer this question, we need to become familiar with the resource database, which is where the X Window System gets its configuration settings. Most configurations of X are handled by a server-based resource database. A client will make a request of the server. The server will check its database for the requested information. If the server has the information, it will provide it; if not, it will let the client know it doesn't have the information. It's that simple.

The server will check for user preferences based on the client that is requesting them. The command xrdb is what is used to load the database. Once X is loaded, xrdb is loaded immediately following. xrdb will also load the needed configuration from a dot file. Dot files will be discussed in Lesson 16, "Modifying Your Environment."

Check Your Documentation Each version of Unix can be customized, and you may be working on an already-customized version. It takes a while to be able to modify your environment properly; many times, it requires trial and error or lots of reading. Reading the documentation stored locally on your system for whatever window manager you are using is a great start. Also, if you can set up a test Unix system to practice on, that is ideal. You can become a master of modification when you have a practice lab to work in.


In this section of the lesson, we have completed our discussion on customizing your X Window System environment. You should feel comfortable with the ways that Unix will attempt to set your environment when you load it, either by giving you a default .xinitrc script group of settings or by using a modified group of settings that you have created. Remember, we will learn more about how to alter files in the next few lessons, so you can come back to this section when you learn how to use vi or the emacs editors to make any changes you would like. Let's move on to a discussion of some of the window managers available today.



    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net