Search the Catalog
Running Linux, 3rd Edition

Running Linux, 3rd Edition

By Matt Welsh, Matthias Kalle Dalheimer & Lar Kaufman
3rd Edition August 1999 (est.)
1-56592-469-X, Order Number: 469X
752 pages (est.), $32.95 (est.)

Appendix B. The GNOME Project

Contents:
What Is GNOME?
A Brief History of the GNOME Project
The GNOME Desktop: A User's Point of View
Some GNOME Applications
GNOME as a Development Platform
Getting and Installing GNOME
The Future of GNOME
How Can You Help with GNOME?

by Miguel de Icaza, Instituto de Ciencias Nucleares, UNAM; Nat Friedman, International GNOME Support; Federico Mena, Red Hat Software; and Elliot Lee, Red Hat Software

B.1 What Is GNOME?

Unix has never been considered an extremely user-friendly operating system. Because it was originally designed by programmers for programmers, the primary interface has long been the command line. Although this is a very powerful interface, it has a very steep learning curve, especially for people who are not acquainted with computers.[1]

[1] This article originally appeared in Linux Magazine and can be found on their web site at http://www.linux-mag.com. It has been minimally edited from the authors' version.

Then, the appearance of the X Window System brought forth a proliferation of GUI toolkits. The result was twofold: Unix programmers suddenly had the ability to create easy-to-use human-friendly software interfaces. But the market was fragmented; programmers were divided into many camps, each using a different GUI toolkit. This fragmentation delayed the development and deployment of a standard graphical interface and powerful graphical applications.

And fragmentation in the Unix world has had other consequences as well; while Unix developers tried to unify their splintered marketplace, the Unix technology and core design - originated in the 1970s - began to stagnate. Meanwhile, other operating systems were keeping up with technological progress in areas which Unix had long ignored.

The user interface is an important component of today's desktop systems, but a full desktop system and its applications need a lot more to provide all the needed consistency and all the features users expect from modern systems. A software development infrastructure must be in place as well.

GNOME, which stands for GNU Network Object Model Environment, is the GNU effort to address these problems. It consists of a set of libraries, component interfaces, and applications. The GNOME project provides Unix-like systems with the technologies that it has lacked for decades. But although GNOME is bringing new technologies to Unix, it is not a research project: the GNOME team develops and implements ideas that have been tried on other systems in the past and have been proven succesful. Of course, the team doesn't mind trying new ideas, but there is a lot of catching up to be done elsewhere for the time being.

B.1.1 The Windowing System Foundation

Integrated operating systems like the MacOS or Microsoft Windows hide the fact that many programs work together to create the desktop. With Linux, it's necessary to know a little bit about how this illusion is created. Under Linux and other Unix-like operating systems, there are essentially three different software packages that work together in order to create a GUI environment.

The lowest level piece of software is the X Window System itself also called X11. X11 is the foundation software that interacts directly with the computer's hardware. It handles the interaction between input devices (keyboard and mouse) and output devices (monitor).

Higher-level applications can draw graphics to the screen and receive input from the keyboard and mouse by just talking to the X Window System. Individual applications don't have to know anything about how the hardware actually works. X is a standard component of most Unix-derivatives nowadays.

X does does this in a network-transparent fashion, which means that applications running under the X system can be running anywhere on the network.

The X Window System does not specify a policy for either the user interface used by each of the applications being displayed or by the decoration frame and window managing features. X actually relays the responsibility for managing windows to a special application called the Window Manager

The Window Manager controls the placement and appearance of windows on the screen. It works in coordination with X and instructs X where and how to draw windows. There are many window managers available that offer different customization options, but they all perform the same basic functions.

This is the way most people use X these days: the basic windowing system, a window manager, and some X applications.

B.1.2 The Role of GNOME

The user interface part of GNOME is built on top of the X foundation, and it consists roughly of:

The GNOME desktop system

This is a set of tools that provides a desktop abstraction to users plus various utility applications for day-to-day work.

The GNOME application framework libraries

These libraries ensure that GNOME applications look and behave consistently.

Productivity GNOME applications

A number of productivity applications have been written as part of the GNOME project and they are distributed as part of the GNOME system.

The GNOME system can work with any window manager, but the desktop experience is enhanced if the window manager is GNOME-compliant. As of this writing, IceWM, FVWM2, Enlightenment and WindowMaker are GNOME compliant.

GNOME is part of the GNU project. GNU stands for "GNU's not Unix" (it's a recursive acronym) and was a project begun in 1984 with the goal of creating a freely-redistributable Unix-like operating environment.

Aside from providing users with a friendly desktop and various productivity applications, GNOME addresses several important deficiencies encountered by Unix programmers:

  • Lack of a framework for writing consistent and easy-to-use GUI applications

  • Lack of inter-application communication standards

  • Lack of a standard for writing interoperable, re-useable software components

  • Lack of a standard printing architecture and high-quality imaging model

Before we explore how GNOME works its magic to solve these problems, a brief history of the project is in order.

B.2 A Brief History of the GNOME Project

Before the GNOME project as we know it was created, there were two earlier projects, the "libapp" project and the "old-GNOME" project. libapp was intended to supply programmers with a standardized method of storing, using, and retrieving various bits of information about the system and the user preferences; it was a library that anyone could use. On the other hand, Old-GNOME was aimed at providing Unix with a standard software component model, allowing programs to be used as components within other programs.

When the KDE project (see Section 11.3, "The K Desktop Environment" in Chapter 11, Customizing Your X Environment) emerged as a serious attempt to create a usable desktop environment for Unix, a number of people became worried about its licensing. The KDE team had chosen to build their project on top of the Qt GUI tool kit, which at that time was not truly free software. Although Qt has since changed its licensing terms and now qualifies as free software, at that time many people felt its use represented a step backwards for software freedom. This led to the emergence of the GNOME project as an attempt to develop a completely free desktop environment based on the original old-GNOME and libapp ideas.

Another important goal of the GNOME project was to make sure that the work done on any foundation libraries could be used from every programming language in Unix. To successfully create this standard, it was essential that every programmer had access to these technologies, no matter the choice of programming language.

The people on the original GNOME team had a good mix of backgrounds revolving around free software issues, graphics, and programming language design. The original team included the programmers who worked on the GNU Image Manipulation Program (the GIMP), Peter Mattis and Spencer Kimball. Richard Stallman, the founder of the GNU project, was involved, as were Erik Troan and Mark Ewing of Red Hat Software. Additionally, there were significant contributions from the members of the Free Software and GUILE mailing lists. (GUILE is GNU's Unique Intelligent Language for Extensions, a programming language that can be embedded in other programs to make them extensible through scripting. GUILE was one of the first scripting languages that could be used with GNOME.)

Since the project's inception, there have been regular releases of the GNOME source code base. After 18 months of development, GNOME 1.0 was officially released in March 1999. Updates and bug fixes are already being released on a continual basis, and as of this writing, the GNOME 1.0 series is at version 1.0.10.

GNOME 1.0 is a significant milestone in the history of the project because it represents a contract between the GNOME development team, independent software developers, and users everywhere. Release 1.0 provides a stable Application Programming Interface (API), on top of which new applications can be developed. Independent developers can take advantage of all the functions available in the libraries while feeling assured that their applications will continue to work in the future.

B.3 The GNOME Desktop: A User's Point of View

GNOME gives users an intuitive desktop metaphor, a file manager, an easy way to launch applications installed on the system, and built-in support for themes, which allow users to change the aesthetic characteristics of their desktop and applications. For example, the "steel" theme makes the desktop and applications appear to be made of steel, and a "wooden" theme makes them appear to be made of wood. Various desktop productivity tools such as a calendar, calculator, address book and spreadsheet are also included. The user can easily change the look of their applications by using the GNOME control center. Most GNOME distributions include numerous pre-designed desktop themes. Many other contributed themes can be found at http://gtk.themes.org, a web site dedicated to themes.

The GNOME desktop provides a number of powerful shortcuts that make it easy to interact with the computer. One of these is support for drag and drop: a file can be dropped onto the desktop to create a shortcut to it; a picture can be dropped onto the desktop setup program to change the desktop background; a color can be dragged from the color selector to the panel to change its background; and documents can be dragged onto the printer icon to print them.

Another key feature is GNOME's support for session management, which allows GNOME to remember the state of the desktop between logins. So, when users log in, they see the same desktop and running applications that were in use when they last logged off. In addition, GNOME applications can work together, by sharing a common clipboard, for example.

B.4 Some GNOME Applications

An increasing number of GNOME-compliant applications have become available. Some of the most popular include:

DIA

An application for creating all sorts of sophisticated diagrams.

The GIMP

The GNU Image Manipulation Program (the project that started it all), described in Chapter 9, Editors, Text Tools, Graphics, and Printing. The GIMP is a powerful image editing and painting application. It performs common image manipulation functions such as painting, color correction, and cropping. It also supports advanced features such as layers and selections and is extensible via a sophisticated plug-in system. The plug-ins are separate programs that provide specialized image manipulation functions or special effects.

Gnumeric

A powerful spreadsheet application. Gnumeric has all the features you would expect from any commercial offering but is free software. An exceptionally useful feature of Gnumeric is its ability to import and export Microsoft Excel files. For more information, check out http:/www.gnome.org/gnumeric.

Guppi

A basic graphics application. This is also the tool that Gnumeric uses to plot graphics.

AbiWord

A full-featured word processor that uses the GNOME libraries as its engine and in the future will take full advantage of all of GNOME's component technology. This means users will be able to link and embed spreadsheets from Gnumeric or graphics from the GIMP into AbiWord documents or link AbiWord documents back into those programs.

B.5 GNOME as a Development Platform

While GNOME can certainly make Unix-based operating systems more palatable to ordinary users, the GNOME team devotes a lot of energy to making GNOME fun to hack on, too.

From the developer's perspective, GNOME is made up of a set of core libraries, an infrastructure for component programming, and a set of reusable language-neutral components.

B.5.1 The GNOME Foundation Libraries

Many powerful features work across all GNOME applications in a standardized way, thanks to these libraries.

B.5.1.1 GTK+ (GIMP toolkit)

GTK+ is GNOME's object oriented graphics toolkit. It was originally designed by the GIMP programmers to simplify their work in building the GIMP. GTK+ was chosen for GNOME primarily because it implemented an object system rich in functionality and it already had interface bindings for a wide range of programming languages. This meant that GTK+ already went a long way towards achieving GNOME's goal of programming language neutrality. For more information, see http://www.gtk.org.

Guidelines have been developed that specify the method for adding new language bindings (wrappers) for the GTK+/GNOME libraries. Developers following these guidelines have contributed support for a number of languages, including C++, Objective-C, TOM, PERL, Python, GUILE, ADA, and others. Other bindings are in various stages of development, which is understandable, considering the large number of libraries that make up GNOME.

GTK+'s object system is very elegant in its design and allows for classical single-inheritance, dynamic creation of new methods and classes, and a signal mechanism that dynamically attaches signal handlers to events that occur in the user interface (e.g., a mouse click).

Another reason for choosing GTK+ is that it advances the second goal of the project - to create an intuitive desktop metaphor. It does this by providing support for two drag-and-drop protocols - Xdnd (X Drag and Drop) and Motif DnD. This makes it possible to drag and drop objects between programs written in GNOME (like the desktop), and programs that were written using other tools (like Netscape). Because all this is handled by GTK+, application writers get this functionality for free.

B.5.1.2 Imlib

This is an imaging library and engine that provides for fast loading, saving, and displaying of images. Imlib provides sophisticated image caching and color-management functions which operate efficiently even on low-end displays or 8-bit video cards. Due to limitations in X's color management scheme, developers writing directly to the X Window System libraries and artists creating icons or images for X need to be concerned about how many colors a given image might use. Imlib frees them from these worries by providing automatic color reduction and dithering facilities.

B.5.1.3 XML/DOM libraries

The WWW Consortium (the organization that ratifies standards for the World Wide Web) recently introduced two new standards: XML and DOM. XML is the eXtensible Mark-up Language, which can be used to describe and create other mark-up languages such as HTML. With a well-written XML library in-place, GNOME developers can very easily add support to their applications for portably loading and saving structured data. DOM (Document Object Model) is a model that describes how applications can modify chunks of data in an XML document. Implementing these standards as a GNOME library makes it easier for programmers to write XML/DOM aware applications.

B.5.1.4 The Canvas/Libart engines

The Canvas is an engine for creating structured graphics that allows programmers to easily create interactive graphics displays. Its features include unlimited scrolling and completely flicker-free operation. The programmer simply creates a canvas item (stock items include text, images, polygons, and Gtk widgets) and specifies its location. The Canvas handles the rest.

The Canvas is designed to be an extensible, but generic, display engine. The Gnumeric spreadsheet application, for example, uses the Canvas to display the spreadsheet but provides its own custom extensions. Applications like the GNOME calendar and the Midnight Commander file manager use the basic functionality of the canvas in their displays.

Libart is a vector manipulation and rendering engine that uses anti-aliasing and alpha-compositing. The canvas is built upon Libart, which it uses to render its objects into an RGB buffer. Libart makes it easy for the canvas to create anti-aliased, alpha-composited output. Libart provides a superset of the PostScript imaging model for extremely high-quality output.

B.5.1.5 The Bonobo component and document model

Bonobo is the name of the GNOME project to create a component model and a standard for the interactions between the components of a compound document.

It's a framework similar in concept to Microsoft's Object Linking and Embedding (OLE). Bonobo allows programmers to create reusable software component objects (similar to Active X Controls). It is also a document model that defines a system where these objects can seamlessly interact within shared container documents (Similar to Linking and Embedding).

To use an example that many people are familiar with, in Microsoft Office, an Excel document can be embedded within a Word document. The Word document in this case is a container document. It contains both the Word data and the Excel data. However, clicking on the Excel data allows you to work on it as though you were working in Excel, even though it is embedded in the Word document. The Excel application functions as a piece of component software, creating the illusion that the user is only interacting with one application.

Bonobo is a set of CORBA interfaces that are necessary for component design and interaction. The Bonobo interfaces are both language- and toolkit-independent, and Bonobo components can be both written and used in any language. The reference implementation of Bonobo is based on the Gtk object system and maps CORBA interfaces to Gtk objects which can be easily manipulated by the application author.

Note that while many programmers associate OLE with great complexity, much of that is due to the way Microsoft was forced to design OLE so that it would work well with Windows. While sharing much of the same functionality as OLE, Bonobo is inherently a much simpler system to understand and design software with.

B.5.2 The Common Object Request Broker Architecture (CORBA)

Unix has long been praised for making it easy for users to take a bunch of small filter programs (like grep and sed) and tie them together using pipes to compose a more complex, makeshift application. Sadly, pipes and filters do not scale to more complex applications (especially graphical applications). GNOME is an environment in which software objects can talk to each other (even over networks) in a standard fashion without knowing anything about each other. This is made possible by GNOME's CORBA foundation.

CORBA is a software system based on completely open standards, specifying methods for software objects to interact with each other. These objects speak to each other through an Object Request Broker (ORB), which directs traffic between all of the different pieces of software. The CORBA standard specifies the functionality that an ORB must provide to client programs that make requests of it. The objects don't need to know anything about each other; they can be programs that can be written in different languages and perform different functions, and they can even be located on different machines. As long as they communicate through the ORB, they can all speak to each other.

CORBA is woven throughout GNOME and provides application developers with a rich set of services. Among them are:

A general IPC mechanism (Inter-Process Communication)

In the past, it was quite common in a Unix environment for programmers to invent a customized protocol in order for two applications to communicate. Needless to say, the situation did not do much to encourage software reuse or interoperability. Now, whenever GNOME applications need to communicate, they can just use CORBA.

A means of exporting an application's internal engine

Many applications in GNOME export their internal functionality to the outside world. This allows other programs - both GNOME and non-GNOME - to use the services exported by an application, making these applications especially accessible to scripting languages. In particular, exporting makes these applications accessible to scripting languages so that advanced users can write scripts that automate common tasks. In the not-too-distant future, the user will be able to write a Python script to manipulate a Gnumeric spreadsheet, perform customized spell checking, or automate repetitive presentation creation tasks. This is similar to the functionality that Microsoft's Visual Basic provides Microsoft Office under Windows. The Guppi graphics application, the file manager, and the Gnumeric spreadsheet are currently scriptable in this fashion.

A method for creating re-usable, interoperable software components

As previously mentioned, the Bonobo component and document model expands upon the services CORBA offers, creating a framework that offers both programmers and users a very high level of flexibility.

CORBA is a series of specifications for designing Object Request Brokers (ORBs), but it is not an actual piece of software. Many ORBs have been written to the CORBA specification, but they are all implemented differently, and not all of those ORBs suit every software project's needs. The GNOME team spent a long time searching for a suitable CORBA implementation. It required an ORB that supported C language bindings and that was both thin and fast. Eventually, a decision was made to write a CORBA ORB from scratch. Dick Porter, Elliot Lee (while working for Red Hat Labs), and Andrew Veliath wrote an all new high-performance CORBA ORB named ORBit. ORBit finally provides the plumbing that allows you to deploy CORBA throghout GNOME. It is described at http://www.labs.redhat.com/orbit.

B.5.3 Programming Tools

As the GNOME system matures, new development tools are emerging to aid developers in designing GUI applications. Of particular interest is Damon Chaplin's Glade. Glade greatly simplifies the creation of complex UIs in much the same way that NeXT's Interface Builder simplifies this task under NeXTStep.

Databases can now be accessed in a uniform fashion through GNOME DB, which is a modified CORBA interface to various databases. GNOME DB also includes a designer front-end. This project is being managed by Michael Lausch, who handles the back-end and CORBA elements, and Rodrigo Moya, who is writing the GUI-builder code.

B.5.4 The GNOME Printing Architecture

The free software community, and Unix in general, have long lacked a standard printing architecture and high-quality imaging model. GNOME provides a sophisticated printing engine intended to standardize the way applications print.

GNOME-print (http://www.levien.com/gnome/print-arch.html) is the implementation of GNOME's printing architecture. It consists of a pluggable rendering engine and a set of standard widgets and dialog boxes for selecting and configuring printers. In addition, GNOME-print is responsible for managing outline fonts and contains scripts that automatically find fonts already installed on the system.

The GNOME-print imaging model is based upon the PostScript imaging model. Basic operations include vector and bezier path construction, stroking, filling, clipping, text printing (using Type1 fonts, with TrueType to follow shortly), and image printing.

At the time of this writing, GNOME-print generates only PostScript output. However, the design of the imaging model is closely linked to the rendering engine for the Canvas, and it is expected that these two modules will soon be interoperable. In particular, it will be possible to print into a Canvas, which is useful for providing a high quality print preview, and it will also be possible to print the contents of a Canvas. This feature should simplify the design of applications that use the Canvas, as very little extra code will be needed to support printing.

The GNOME-print engine will also be used to render printed pages directly without going through an intermediate PostScript step. This is especially exciting because it will allow high quality, high performance printing of complex pages to color inkjet printers. Complex pages could include transparency, gradients, and other elements considered tricky in the traditional PostScript imaging model.

B.6 Getting and Installing GNOME

Tested source code releases of GNOME are available at ftp://ftp.gnome.org/pub/GNOME.

It is also possible to get the very latest GNOME developments from the anonymous CVS servers. Check the GNOME web page at http://www.gnome.org for details on how to pull the latest version straight from the CVS servers.

Fast-breaking news about GNOME is also posted to the GNOME web site, along with documents to get you started on installing GNOME and developing GNOME applications. If you are in need of assistance, check out the GNOME FAQ.

B.7 The Future of GNOME

The GNOME system is constantly being updated, fixed, and improved. Following the lead of other free software projects such as Linux, the GNOME team maintains two branches of the GNOME software. New technologies are distributed in a development branch which developers can use and experiment with. As the technologies mature and the software becomes more stable, the code is released with the stable branch, which is targeted at deployed systems.

The evolution of GNOME is not decided by one person or a comittee: GNOME evolves in the direction that the GNOME programmers consider important or interesting. And you can be one of those programmers; the GNOME team welcomes your code, patches, opinions, and help.

B.8 How Can You Help with GNOME?

The GNOME project welcomes people who want to assist in creating the best possible Open Source desktop environment. There are opportunities for all kinds of talent to be utilized. Programmers can help writing programs and reviewing existing code or updating or maintain the programs. Language teams can make sure that the GNOME system contains up-to-date translations for their languages. Other people can contribute to the project in many ways: helping other GNOME users; getting proprietary-based business to realize the importance of free software; documenting the system; and communicating to other people what is GNOME all about.

If you would like more information on how you can help out, please email webmaster@gnome.org.

Back to: Sample Chapter Index


oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies | Privacy Policy

© 2001, O'Reilly & Associates, Inc.