Page 53 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 53

Exposure to Computer Disciplines



                   Notes         choosing the window you type to is called “setting the input focus .” Most window managers can
                                 be configured to set the focus in one of the following two ways:
                                   (a) Point to the window and click a mouse button (usually the first button). You may need to
                                      click on the titlebar at the top of the window.

                                   (b) Simply move the pointer inside the window.
                                 When you use mwm , any new windows will get the input focus automatically as they pop up.
                                 3.4.2 The Xterm Window

                                 One of the most important windows is an xterm window. xterm makes a terminal emulator
                                 window with a UNIX login session inside, just like a miniature terminal. You can have several
                                 xterm windows at once, each doing something different. To enter a UNIX command or answer a
                                 prompt in a window, set the focus there and type. Programs in other windows will keep running;
                                 if they need input from you, they’ll wait just as they would on a separate terminal.

                                 You can also start separate X-based window programs (typically called clients ) by entering
                                 commands in an xterm window. Although you can start new clients (xterm, xcalc , and so on)
                                 from any open xterm window on your computer, we recommend starting all of them from the
                                 first window that you opened.

                                 Here’s an example. To start the calculator called xcalc, enter:
                                 % xcalc &

                                 12345 %
                                 The shell will print a PID number like 12345 has more information on this subject.) If you forget to
                                 add the ampersand (& ) at the end of the line, kill (terminate) xcalc with your interrupt character
                                 (like [CTRL-C] to get another shell prompt—then enter the command correctly.
                                 The new window may be placed and get the focus automatically. Or, the window (or an outline
                                 of it) may “float” above the display, following the pointer—until you point somewhere and click
                                 the mouse button to place the window.

                                 You can also start a new xterm from an existing xterm . Just enter xterm & (don’t forget the
                                 ampersand) at the shell prompt.

                                 The same method works for starting other X programs.
                                 3.4.3 The Root Menu

                                 If you move the pointer onto the root window (the “desktop” behind the windows) and press
                                 the correct mouse button (usually the first or third button, depending on your setup), you should
                                 see the root menu . You may need to hold down the button to keep the menu visible. The root
                                 menu has commands for controlling windows. The menu’s commands may differ depending
                                 on the system. Your system administrator (or you, if you study your window manager) can add
                                 commands to the root menu. These can be window manager operations or commands to open
                                 other windows. For example, a “New Window” menu item can open a new xterm window for
                                 you. A “Calculator” item could start xcalc.

                                 3.5 Sharing Files

                                 UNIX makes it easy for users to share files and directories. Controlling exactly who has access
                                 takes some explaining, though—more explaining than we can do here. So here’s a cookbook set
                                 of instructions.




        46                                LOVELY PROFESSIONAL UNIVERSITY
   48   49   50   51   52   53   54   55   56   57   58