Friday, October 23, 2009

CDE: A Desktop for All Seasons













CDE: A Desktop for All Seasons

If you ever use a Macintosh or one of those other Windows computers, then you know what a desktop is. When you start up a computer with the Macintosh or Windows OS installed on it, slick-looking graphics and mouse-clickable icons and menus take over your entire computer screen, giving you a common workspace for all your programs and windows. That’s the desktop.


The desktop gives you a slew of ways to keep track of your files and get your work done efficiently and painlessly. You can open multiple windows and switch between them with the click of a mouse button. You can do spiffy stuff such as dragging and dropping to share files and information among your programs. Graphical tools that come with the desktop give you views into the operating system, your files, and your network (if you’re on one). Additional graphical tools let you do neat stuff, such as send and receive mail, manage print jobs, and change the way your desktop looks.


Although window managers (such as Motif) have been around for quite some time, real integrated desktops like the ones built into Windows and the Mac OS are just beginning to catch on in the UNIX world. Now you can choose from a whole crop of UNIX desktops. The first widely used UNIX desktop was the Common Desktop Environment, or CDE. CDE is the result of an unprecedented outbreak of cooperation among a number of UNIX vendors — including Hewlett-Packard, IBM, Novell, and SunSoft — and the Open Software Foundation (the same people who brought you Motif, remember?).


CDE desktops are not quite as simple, of course, as their Windows and Mac OS counterparts. The Mac and Windows desktops are developed and sold only by Apple and Microsoft, respectively. Each company that sells CDE along with UNIX, on the other hand, offers a slightly different version of CDE developed exclusively for its own version of UNIX. Unlike the Mac and Windows desktops, which are built in to the operating system and appear whenever you start up your computer (like it or not), CDE desktops are optional. You don’t have to use CDE to use UNIX, and you (or, more likely, your system administrator) can decide whether to have CDE start up when you log in.


To enhance the confusion to acceptable UNIX-like levels, CDE is infinitely customizable by system administrators and UNIX hackers. You can make far-reaching changes to CDE by switching the CDE default window manager from DTWM to FVWM, for example. You can tell CDE to launch various programs automatically when you log in. You can change the way the keyboard behaves — and so on and so on, ad nauseum.


The good news is that the similarities among versions of CDE far outnumber the differences; after all, it’s supposed to be a common desktop environment. In practice, and discounting any bizarre modifications that an overzealous UNIX system administrator may have made, using one version of CDE is very much like using another.


The following sections give you some idea of how to use the Common Desktop Environment. In the interest of keeping things as simple as possible, we don’t worry about which version of CDE you’re using, and we figure that you’ll make whatever adjustments are necessary to account for the idiosyncrasies of your configuration.




Desktop, here we come!


Bringing up the desktop is much like starting Motif, a subject we cover in the sidebar “How do I start Motif, anyway?” earlier in this chapter. If you’re lucky, your system administrator has set up your computer so that the CDE comes up when you turn on your computer or log in. If not, you have to refer to your local UNIX guru or system documentation to find out which command to run in which directory.


No matter what the start-up details are, the desktop heralds its imminent appearance by making your computer screen flicker like Dr. Frankenstein’s laboratory on a stormy night and then replacing whatever your screen was displaying before with a drab gray background, on top of which appear various tools, toolbars, icons, and programs, depending on how your desktop is configured. You usually see a version of the FrontPanel across the bottom of your computer screen.





Front and center


The FrontPanel is similar to the control center for the desktop. Actually, it’s more like the dashboard of a fancy car, which puts all the car’s doohickeys and thingums within easy reach of the driver. As with all the elements of the desktop, you can customize the FrontPanel. Figure 4-7 shows a typical set of FrontPanel icons, buttons, and other clickable thingies.






Figure 4-7: The FrontPanel puts the desktop front and center.

At the center of the FrontPanel are four buttons, named One, Two, Three, and Four. These buttons let you manage as many as four workspaces. The idea is that the desktop is in reality four times as large as your computer screen; in other words, your computer screen shows only one-quarter of your desktop at a time. Each quarter is a workspace. You can have different icons, program windows, and whatnot set up in each workspace, all of which stay put and reappear just as you left them every time you return to the workspace. For example, you may dedicate one workspace to managing your UNIX environment, one workspace to dealing with all your communications (e-mail, FTP, networking), one workspace to your favorite games, and one workspace to doing work (such as writing the definitive guide to peas and how to eat them). Rename the workspace buttons Looks, Comms, Games, and Peas so that you can remember which workspace is which, and then switch among your workspaces by clicking the buttons. (We recommend switching from Games to Peas whenever your boss comes around the corner.)





Tools you can use


The icons to the left and right of the workspace buttons give you mouse-click access to a typical set of CDE tools. Reading from left to right in Figure 4-8, you see icons for Clock, Group Calendar Manager, File Manager, Terminal Emulator, Mail Tool, Print Manager, Style Manager, Applications Manager, Help Viewer, and Trash.






Figure 4-8: Just popped in to see what condition my condition was in.

You can open each tool or tool set by double-clicking its icon in the FrontPanel. If the icon has a little upward-pointing triangle above it, you can click the triangle to pop up a menu of choices (the menu slides out from behind the FrontPanel like a window shade being drawn upward). Drag to the choice you want, and then release the mouse button to select it. You can close a pop-up (or slide-up) menu by clicking the square in the upper-left corner of the menu and choosing Close or by clicking the triangle again (it turned into a downward-pointing triangle while you weren’t looking). The menu demurely slides down behind the FrontPanel until it disappears. Figure 4-8 shows the menu that appears when you click the triangle above the Applications Manager icon.


All the standard UNIX utilities and programs described in Part III of this book (such as find, diff, ed, vi, and emacs) get zoomy new graphical versions in the CDE, many of which are easier to use than their command-line equivalents (easier, that is, if you’re used to using a mouse to do your computing). In fact, CDE desktops come with so many tools and utilities that an entire book is needed just to describe them all.





Filing without tears


The File Manager looks like the window shown in Figure 4-9, which appears when you double-click the File Manager icon on the FrontPanel.






Figure 4-9: Show me some files, man!

The CDE File Manager is much like the Mac OS Finder or Windows Explorer. You can use the CDE File Manager to browse through your files, launch programs, and, as its name implies, manage your files (open, copy, move, or delete them or have them over for dinner). The File Manager shows some kind of icon for each directory and file on your computer. Directory icons look like file folders; file icons look different depending on which type of file it is. Figure 4-9 shows icons for seven text files, which look like pieces of paper with writing on them (clever, no?). The icon with the runner on it launches a program (in this case, a program named Source Safe 5.0).


The “..(go up)” icon lets you travel up the directory tree toward the root directory. The series of folder icons at the top of the window shows your current location (and hence the directory that contains all the stuff you now see in the File Manager) relative to the root directory. You can jump to any directory in the branch of the tree you’re on by clicking one of these folders. Pictograms (little pictures) on the folders tell you something about the directory’s permissions; for example, a folder showing a pencil with a line through it means that you don’t have write permission in that directory.








You can move files and directories from one location to another by dragging and dropping their icons. Being able to drag and drop in the File Manager means that you can do all kinds of cool and unexpected things. For example, you can drag a text file to the icon for the emacs editor to automatically launch emacs and open the text file you dragged. You can add icons to the FrontPanel by dragging them from the File Manager and dropping them on the FrontPanel’s icon areas.





What’s up, doc?


One of the most convenient, friendly, and ultimately un-UNIX-like features of the CDE is its Help Viewer. The Viewer, as shown in Figure 4-10, is a graphical help- and documentation-viewing program with full-fledged searching and printing capabilities. You can view all the man pages (online documentation, described in detail in Chapter 26) for your version of UNIX in a pleasant, readable format (a giant leap for UNIX-kind, as you know if you ever tried to make extensive use of traditional UNIX man pages) and journey hither and yon by means of an expandable and collapsible outline. The Viewer can even handle context-sensitive help (in other words, make a game attempt to guess exactly what information you need at any given moment so that you don’t have to go hunting for it).






Figure 4-10: The Help Viewer tells you all about itself.




Having it your way


Customize, customize, customize! One of the joys of using the CDE is your ability to change the way your desktop looks and behaves by using the Style Manager (as shown in Figure 4-11). Use up all that pesky extra time by changing the colors of various window elements and text; choosing pretty backdrops to replace your desktop’s monotonous gray background; adding pizzazz and generally making your desktop unusable by choosing decorative fonts, reconfiguring your keyboard, changing what the various buttons on your mouse do; and making a thousand other cunning modifications to your computing environment. Go ahead — indulge yourself. You haven’t lived until you spend an entire afternoon designing a desktop scheme that expresses your innermost desires (especially when you should be doing something else).






Figure 4-11: The Style Manager: Where the fashionable desktop goes for a thorough makeover.










Desktop, there we go!


The easiest way to get yourself out of the desktop is to click the Exit thingum near the workspace buttons on the FrontPanel, which drops you unceremoniously into good old traditional UNIX character mode. You can also lock the desktop (so that only someone who knows your username and password can get to it) by clicking the padlock icon in the center of the FrontPanel.












No comments: