GNUstep Build Guide for Unix Systems

A basic system

Mr. Dennis Leeuw

Pieter Bothstraat 32
3531 GZ

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Table of Contents
Document description
I. About GNUstep
1. Objective-C
2. GNUstep Terminology
3. GNUstep Filesystem Layout
II. Building GNUstep and friends
4. The GNUstep sources
5. Building GNUstep
The Makefile System
The Foundation
The AppKit
The Backend
6. Building Extensions
7. Basic Tools
8. Developer Tools
Project Center
III. GNUstep Configuration
9. Basic Configuration
The defaults command
Changing the backend
Application Settings
10. GNUstep services
Boot script
X startup script
11. Changing the Look
Look and Feel
A. Build from source
Tips while installing
Build ffcall
List of Tables
1. Credits
11-1. System Font Defaults
11-2. Color names
11-3. GNUstep color keys
List of Examples
9-1. List all defaults features
9-2. List all available domains
9-3. GSBackend system
9-4. GSBackend application
9-5. Local Time Zone
9-6. NSLanguages
9-7. NSMeasurementUnit
9-8. GSWorkspaceApplication
9-9. NSPreviewApp
10-1. NSHost
10-2. GSOldClipboard
11-1. GSX11HandlesWindowDecorations
11-2. GSFontAntiAlias
11-3. GSFontMask
11-4. GSXEnableFontSet
11-5. Change color keys
11-6. GraphicCompositing
11-7. GSBrowserCellFontify
11-8. GSFileBrowserHideDotFiles
11-9. GSUseFreedesktopThumbnails
11-10. UseWindowMakerIcons
11-11. GSAppOwnsMiniwindow
11-12. GSUseWMTaskBar
11-13. GSSavePanelShowProgress

Document description


This guide will try to guide you through the installation process of building GNUstep from source code. I only have GNU/Linux systems, so it might be that some things are GNU/Linux related.

Some things are just assumed to be there, like a working system and the X-windows system (X11R6). If you work your way through the document from start to finish, you should end up with a working system. No guarantees are made ofcourse. If you find things to be different on your system, please let me know.


Writing a guide is not a one man job. First of all there needs to be a subject to write about, then there is the need to gather information and after that bugs, omissions, etc. are found in the work. The list tries to thank the people that helped me writing this guide. It is far from complete, but the best I could do. If you feel you should be on the list, but are not let me know.

Table 1. Credits

Adam FedorThe ex-maintainer of the GNUstep project and one that was always willing to answer my sometimes plain stupid questions.
Richard Frith-MacdonaldHe is a genius, what else can I say. Thanks.
Nicola PeroGood programmers guides, and hell why did you write So much time is lost with that addictive game. And his tremendous work on gnustep-make.
David Nelsonfor his valuable input on the Build Guide.
Martin BrecherFor finding a lot of bugs in the Build Guide. Thanks Martin you have been, and still are a big help. And he also craeted the German translation available at
Stefan BoehringerFor helping with the use of correct English.
Peter CooperThank you for nit-picking the Guide. Great help.
Gerold RupprechtFor correcting a lot of mistakes and making the English more clear.
Chris B. VetterFor the FreeBSD additions. And his help with the German translation by Martin Brecher.
Ben LindseySolaris 8 notes
Helge HessFor his notes on a more userfriendly guide.
Jef TeunissenTechnical contributions
Fred Kiefernsmapping.strings stuff, answered all my questions concerning fonts and menus. Thanks for cairo!
Adrian RobertExplained the way the new NSColorList works
Truls BeckenFor his good comments on the version 2.0.0 release regarding the use of deprecated variables.

Microsoft and Windows are trademarks of Microsoft, Inc., registered in the U.S. and other countries.

Apple, Mac and Mac OS are trademarks of Apple, Inc., registered in the U.S. and other countries.

Enterprise Objects, Enterprise Objects Framework, NeXT, NextStep, Objective-C and OpenStep are trademarks of NeXT Software, Inc., registered in the U.S. and other countries.

I. About GNUstep

GNUstep is a collection of objects, written in Objective-C, that provides a developer with the environment to create programs (tools and applications). It is a platform (operating system) independend development environment.

GNUstep is not a desktop environment, but everything is there to create one.

GNUstep highlights

  • Consistency. A major benefit of the GNUstep system is the consistency in the user interface. When a user starts an application he or she will feel comfotable real soon.

  • Crossplatform. GNUstep applications can be used on various platforms: Linux, MacOSX, Windows, Solaris, BSD and more. This creates platform independency. You do not have to worry about the actual operating system.

Chapter 1. Objective-C

Objective-C is an object oriented programming language. It is not a standardized language, that is, there is no official standard that describes Objective-C. Brad J. Cox developed the original Objective-C language, by adding SmallTalk-80 extensions to C.

Objective-C is ANSI C with a relatively small set of smalltalk-like object oriented syntax grafted on to it. It is considered to be the most dynamic of the C based OO languages.

The Objective-C runtime is part of the GNU C compiler (gcc). And also part of the NeXT and Mac OS X compilers.

Dennis Gladding wrote the first GNU version in 1992, shortly followed by the second version by Richard Stallman. In 1993 the next version appeared written by Kresten Thorup who also used this version for the actual NeXT implementation. Later versions where maintained by Ovidiu Predescu and currently (2001) Stan Shebs of Apple Computer Inc. is the responsible person.

Objective-C highligts


A protocol declares the methods which should be implemented on a class which defines a given protocol. Since Objective-C lacks multiple inheritance, we can use Protocols to make up for this.


Categories allow you to add or repair functionality of a given class without having access to its source code. Whenever an object of the type you added the category to is instantiated within your program, it has the extra methods you added to it.

Chapter 2. GNUstep Terminology

By being such a totaly different system, there are some terms that are new and specific to GNUstep.

Tool. The destinction between Tools and Applications is that Tools are in your PATH environment variable, which means you can start them from the commandline. Tools are most often non-graphical programs, like commandline applications and daemons and can be found in the Tools/ directory.

Bundle. A bundle is a collection of resources making up a discrete package for use. There are currently three types of bundles: applications, frameworks and loadable bundles.

Application. An Application is a program with resources. Since graphical programs have a lot of resources like icons and the like, it would be most convenient to have everything in one place. To have a single directory that holds everything that belongs to that program. This is what an Application in the GNUstep terminology is, it is a directory with an executable and all its resources.

Framework. A framework is a dynamic shared library with all its resources; including header files, documentation. It could even contain several different versions of a library for e.g. backwards compatibility.

Loadable bundle. A loadable bundle is a kind of plug-in. There are two types of loadable bundles, namely plug-ins and palettes. The plug-in is noramlly refered to as a bundle, which can make it a bit complex. A plug-in is a bundle that can be loaded by an application to provide additional functionality, while a palette is a plug-in for GORM, the interface builder. A palette is used to extend GORM with custom UI objects. Palettes have a .palette extension.

Chapter 3. GNUstep Filesystem Layout

Data, programs and libraries can be installed on a system in four different ways. First there is the stuff installed/ supplied by a vendor, second are the things that are installed by the local system administrator, third is the data that is shared over a network and last there is the user that can install his or her own applications, data and the like.

When you start an application there is an order of preference. If a user has installed a program in his or her home directory, and the vendor has installed the same program, but an older version, the user of course wants his version to be started. To make that happen there is a search order. This definition says that everything installed in the User domain has precedence over the Network domain, which in turn has precendence over the Local domain, which has precedence over the System domain.

GNUstep can be build to adhere to different filesystem architectures. The default is to place everything that is GNUstep related under the /usr/GNUstep directory. But it can also be told to use to the FHS layout, the Mac OS X layout, NeXT layout or even your own filesystem layout. This document will use the default. If you want to do it another way, use ./configure --help on gnustep-make and see the --with-layout option on how to integrate GNUstep within your filesystem layout.

The different installation domains can be addressed by using SYSTEM, LOCAL, NETWORK and USER, when e.g. using GNUSTEP_INSTALLATION_DOMAIN:


II. Building GNUstep and friends

This first part is about building your environment from sources. It discusses the different packages that make up GNUstep and a basic application set to help you start with the programming environment.

Chapter 4. The GNUstep sources

GNUstep can be build in various ways. The easiest is to use the GNUstep-Startup script, which can be found at If you go that route, you can stop reading now.

Those that want to do it by hand with the same result can use the source packages located at the same location. This guide is aimed at those people.

And the last option is to use SVN for part or all of the parts described in this Guide. The SVN servers and the way to checkout the different parts is described here also, but remember... SVN has all the newest features, including the broken ones!


The GNUstep sources (the core part) are numbered X.Y.Z, where X is the major number, Y the minor and Z the bugfix-release.

If the minor number changes it means there are changes that influence the system in such a way that you should recompile everything that depends on it. So if the gnustep-gui minor version changes, you should also recompile all your applications. The bugfix-release number is set to 0, so be prepared to find some bugs and other stuff.

The higher the bugfix-release number the more stable the package gets.

Chapter 5. Building GNUstep

By default GNUstep is built into /usr/GNUstep. We will follow this procedure. Be sure you build GNUstep as root. That means configure, make and make install should be run as root.

The Makefile System

This package sets up the GNUstep directory tree, sets some environment variables and contains scripts for all other packages installed hereafter.



A shell, GCC objc compiler and runtime , GNU make, ar, ranlib, install, ln, chown, grep, libc, sed, awk, yacc, bison, flex, lex, strip, tar


latex2html, rpm

To be able to use the --enable-native-objc-exceptions option, you need the more newer GCC versions, I build this with gcc 4.1.2 on Debian.

I have also choosen to put the GNUstep.conf configuration file in the Local/Configuration directory. This way I try to maintain everything that I (might) change myself within a single directory, which is easier when doing backups.

Change to your own preferences.

Building the Makefile system

./configure --prefix=/usr/GNUstep --enable-native-objc-exceptions --with-layout=gnustep --with-config-file=/usr/GNUstep/Local/Configuration/GNUstep.conf
make install

GNUstep requires a couple of environment settings, since it is an abstract from the actual operating system. To set the settings one has to source the GNUstep shell script. There are two different versions. One based on the Bourne Shells and one for the C based shells.

To setup your system and to be able to e.g. compile software you have source this script. Assuming GNUstep is build within it's default directory the commands to accomplish the sourcing are:

Bourne and Korn type shells. Shells like bash, ash, sh, ksh:

. /usr/GNUstep/System/Library/Makefiles/

C type shells. Shells like csh, tcsh:

source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh

The Foundation

It provides functionality that aims to implement the non-graphical portion of the OpenStep standard (the Foundation library).



gnustep-make, libffi, libssl, libxml2, libxslt, libz, libcrypto, libpthread


iconv (BSD), gmp

For foreign function calls we use the libffi as provided by the GCC compiler. You can also use ffcall, but should then remove the --enable-libffi parameter.

Building the Foundation


Make sure that /proc is enabled and mounted due to overcome a bug in libkvm(3)

./configure --enable-libffi --with-default-config=/usr/GNUstep/Local/Configuration/GNUstep.conf
make install

The AppKit

It is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon the OpenStep specification as released by NeXT Software, Inc. The library does not completely conform to the specification and has been enhanced in a number of ways to take advantage of the GNU system. These classes include graphical objects such as buttons, text fields, popup lists, browser lists, and windows; there are also many associated classes for handling events, colors, fonts, pasteboards and images.



gnustep-base, libtiff, libpng, libjpeg, libungif, libgcrypt, libgnutls


libaspell, cups, audiofile, libgif


For BSD use portaudio from CVS, the one in ports is too old plus, if you install portaudio from source you will have to modify config.make:

  • add -lpthread to ADDITIONAL_DEPENDS

  • set BUILD_GSND to yes

Building the AppKit

make install

When you get the following error:

Making all for service example...
./shared_obj/ix86/linux-gnu/gnu-gnu-gnu/make_services: error while loading
shared libraries: cannot open shared object file: No
such file or directory
make[2]: *** [example.service/Resources/Info-gnustep.plist] Error 1
make[1]: *** [example.all.service.variables] Error 2
make[1]: Leaving directory `/usr/src/gnustep-gui-0.7.0/Tools'
make: *** [internal-all] Error 2

The Backend

GNUstep can run on a variaty of systems with a variaty of display engines. To accompany all those systems the GNUstep developers where smart enough to invent a system called a backend. This means that you only have to install the backend that you need for your displaying engine, which keeps things lean and mean. And it makes it easier to port a GNUstep system to a new displaying engine.

Of course it is also possible to install different bundles on your system (as long as the different displaying engines are also installed on your system). Then one can choose which backend to use. This can be done for the entire system or for a single application.

There are currently backends for libx, libart, cairo or Microsoft® Windows®. Within this document will only use cairo as our backend.

Dependencies Cairo


gnustep-gui, libICE, libSM, libX11, libXau, libXdmcp, libXext, libXi, libXmu, libXt, libGL, libXft, libXrender, libXt, libexpat, libfontconfig, libfreetype, libcairo


To be able to use cairo as the backend for GNUstep, please make sure that you have atleast version 1.4.10 of cairo installed.

Building the Cairo backend

./configure --enable-server=x11 --enable-graphics=cairo --with-name=cairo
make install

Chapter 6. Building Extensions

The following parts are options, but enhance GNUstep or are so important to applications that they are considered a vital part of GNUstep. You are free to skip some parts or this entire section, but we advise you not to.


GNUstep Renaissance allows you to describe your user interfaces (that is, the windows in your application, and the buttons, boxes, textfields, etc in the windows) in simple and intuitive XML files, using an open, standard format describing the logic of the interface. GNUstep Renaissance can then, at run time, generate the user interfaces (using the native host OpenStep-like libraries) by reading the XML files. The connections between the objects created from the XML files, and the other objects in the application are done via outlets (as traditionally in OpenStep); a new quick and intuitive syntax has been developed to make creating outlets as easy as possible.

Building Renaissance


Chapter 7. Basic Tools


The GNUstep Workspace Manager of which the most visible part is the filebrowser.






Building GWorkspace

To build GWorkspacebuild:

cd Apps_wrappers
cp -a * /path/to/Applications

Chapter 8. Developer Tools


The GNUstep Interface Builder.

Building GORM


III. GNUstep Configuration

This second part is about setting up GNUstep. Bootscripts, user environment scripts, but also how you can change the look of GNUstep are discussed.

Chapter 9. Basic Configuration

This chapter describes the basic settings for the GNUstep system and introduces the use of the defaults command. GNUstep uses a per user configuration file called ~/GNUstep/Defaults/.GNUstepDefaults. Since these settings are per user the changes you make should be made per user too.

Most default settings will work most people. The first four sections are a must read, the rest can be done now, or later when needed.

The defaults command

The defaults command is used to set or change your settings. If you are on a multi-user system it is only possible to change the settings for your account, or with the -u <username> option the settings of a user for which you have write access to his or her database.

The defaults database is stored in a non-binary format in Defaults/.GNUstepDefaults in the user domain, which usually is ~/GNUstep. It is thus not possible through the defaults command to set a default for all users on a system.

The generic syntax for defaults is:

defaults function domain key value

function. A function can be read, write or delete.

domain. The domain used with the defaults command is a section within the defaults database that you want to alter. This can be settings for a certain application or the NSGlobalDomain for a generic setting affecting all the applications.

key. The key is a certain setting you want to address.

value. The value is the setting you want to give to a key.

A couple of useful examples:

Example 9-1. List all defaults features

defaults help

Example 9-2. List all available domains

defaults domains

Changing the backend

GNUstep can run on a variaty of systems with a variaty of display engines. To accompany all those systems the GNUstep developers where smart enough to invent a system called a backend. This means that you only have to install the backend that you need for your displaying engine, which keeps things lean and mean. And it makes it easier to port a GNUstep system to a new displaying engine.

Of course it is also possible to install different bundles on your system (as long as the different displaying engines are also installed on your system). Then one can choose which backend to use. This can be done for the entire system or for a single application.

There are currently backends for libx, libart, cairo or Microsoft® Windows®. Within this document will only use cairo as our backend.

Setting the system default backend

To set the system to use a certain backend as a default use:

Example 9-3. GSBackend system

defaults write NSGlobalDomain GSBackend libgnustep-back

The default setting is libgnustep-back.

Dependend on how gnustep-back was configured there are different names for the backend. If you e.g. used --with-name=cairo you should use libgnustep-cairo as the name for the backend.

Setting the backend per application

If you want to change the backend for a certain application and you have more then one backend installed, you can set the backend like this:

Example 9-4. GSBackend application

defaults write ApplicationName GSBackend libgnustep-back

The default setting is identical to the backend set in NSGlobalDomain.


Localization means that the system is set to use your native language, currency, metric system, time zone, etc.

The major part of the localization can be done within the Library/Libraries/Resources/gnustep-base/Languages/ directory from the system domain. Within that directory you will find a file per English name of a certain language. Adjusting the file for your language gives you the opportunity to almost completely localize your system.

Local Time Zone

GNUstep comes with its own time zone files, this might seem redundant, but it isn't. GNUstep runs on a lot of different systems with a lot of different ways of handling time. With GNUstep provided time zone solution, this problem is solved without the need of adding code for every possible system in the universe to the code base.

The time zone files are located in the system domain under the Library/Libraries/Resources/gnustep-base/NSTimeZones/ directory, with all needed documention and code available. The real zones are in a subdirectory called zones/.

Example 9-5. Local Time Zone

defaults write NSGlobalDomain "Local Time Zone" Europe/Amsterdam

as you can see the entire path is not needed just the file Europe/Amsterdam within the zones/ directory.

Language settings

To set the system to use your local language use the NSLanguages key. If the system and/ or an application is able to use your language it will do so. If it can not then it will use the default.

You could also specify a string of languages where you decide what language should be used next. When you for instance specify Dutch,English the system will first try the Dutch translation, then English and then the default.

To setup your system to use a certain language use:

Example 9-6. NSLanguages

defaults write NSGlobalDomain NSLanguages "(Dutch,English)"
By replacing the NSGlobalDomain with the name of an application, you could specify per application which language order it should use.

Creating your local language support

If you want to change an application to support your language you can find within Resources/ directory of the Application a .lproj file. If you copy e.g. the English.lproj directory to the English name of your language e.g Dutch.lproj. You then have to adjust the Localizeable.strings file and start Gorm to adjust the .gorm file.

Metrics used

The NSMeasurementUnit is a string describing the measurement unit for rulers. The default is Centimeters. Other possible values are Inches, Points, and Picas.

Example 9-7. NSMeasurementUnit

defaults write NSGlobalDomain NSMeasurementUnit Points

Application Settings

Setting the Workspace application

The NSWorkspace needs an application to connect to when some operations require an external application. The application called by NSWorkspace can be set through the GSWorkspaceApplication setting. Default this is set to GWorkspace.

Example 9-8. GSWorkspaceApplication

defaults write NSGlobalDomain GSWorkspaceApplication GWorkspace

Default PostScript previewer for printing

The default application that the NSPrintOperation uses to preview PostScript® files is controlled by NSPreviewApp. This defaults to gv, unless there is already an application registed as a viewer of PostScript® files.

Example 9-9. NSPreviewApp

defaults write NSGlobalDomain NSPreviewApp gv

Default Bundles

A bundle is a collection of resources making up a discrete package for use. There are currently three types of bundles: applications, frameworks and loadable bundles.

A loadable bundle is a kind of plug-in. There are two types of loadable bundles, namely plug-ins and palettes. The plug-in is noramlly refered to as a bundle, which can make it a bit complex. A plug-in is a bundle that can be loaded by an application to provide additional functionality, while a palette is a plug-in for GORM, the interface builder. A palette is used to extend GORM with custom UI objects. Palettes have a .palette extension.

The GSAppKitUserBundles contains an array of bundles. These bundles will be loaded into each application at startup. The most useful function is to load "theme" bundles.

Chapter 10. GNUstep services

GNUstep knows two kinds of services: the ones that are started at boot time and the once that are used per user session. The boot service is gdomap, and the once used per user are gdnc and gpbs.

Since it is very hard to supply scripts that work on every system. I will supply you with some example scripts, that should work on almost any system. But your milage may vary.


The gdomap daemon is used by GNUstep programs to look up distributed objects of processes running on the local machine as well as across the network. This way applications can talk to one another. The gdomap process uses the with IANA registered port 538.

To get a complete overview of the options available for gdomap use:

gdomap --help

gdomap probes the network for other hosts running gdomap. This might pose a security risk, and creates some additional network use. If you want to be used only for localhost, start gdomap as:

gdomap -p
This prevents gdomap from polling other hosts. One could also use the -c poll-filename option to provide gdomap with a list of systems it can poll, or use the -a net-filename to provide gdomap with a list of addresses and network masks.

The poll-filename should contain one IP address per line in the normal dotted format.

The net-filename should contain per line an IP address, a mask and a broadcast address in dotted format, seperated by a spaces. The broadcast address is optional and might be left out.

Boot script

Create the following script in the Makefiles directory e.g. /usr/GNUstep/System/Library/Makefiles with the name

# (c) 2003 Dennis Leeuw
# License: GPL version 2 or any newer version
# If GNUstep is not installed in the default place (/usr/GNUstep)
# set this variable to the GNUstep Makefile directory
# e.g. /usr/GNUstep/System/Library/Makefiles
echo -n "GNUstep services: "
# Make sure GNUSTEP_MAKEFILES is set to something
if [ "x$GNUSTEP_MAKEFILES" = "x" ]; then
        if [ -d /usr/GNUstep/System/Library/Makefiles ]; then
	                echo "GNUstep is not installed"
	                exit 1
# Make sure GNUSTEP_MAKEFILES contains
# And source it if available
if [ -x $GNUSTEP_MAKEFILES/ ]; then
        echo " not found in $GNUSTEP_MAKEFILES"
        exit 1
# Do what is requested
case $1 in
               echo -n "gdomap "
                echo "started."
                exit 0
                echo -n "gdomap "
                killall gdomap
                $0 stop; $0 start;
                # Assume start
                $0 start
                echo " [start|stop]"
Create a symbolic link to your bootscript directory when you use System V style init-scripts, or add the script to your bootscript for BSD-style init-scripts.


gdnc is the distributed notification server - it provides support for the NSDistributedNotificationCenter class. This allows applications to send notifications that are visible to other applications - for example a notification that an app has started up or shut down. Every user must have its own private instance running.

Normally gdnc is started without options and as soon as the user logs in.

To attach gdnc to a remote session it can be started as

gdnc [-NXHost hostname]


gpbs is the pasteboard server. The gpbs daemon serves as a clipboard/pasteboard for GNUstep programs, handling the copying, cutting and pasting of objects as well as drag and drop operations between applications. It is also used by the 'services' facility.

Normally gpbs is started without options as soon as the user logs in. gpbs is a user process.

To attach gpbs to a remote session it can be started as

gpbs [-NSHost hostname]

To get help on the gpbs usage use:

gpbs [--help]

If the pasteboard server is running on another host as the application, the NSHost can be set. NSHost is used by the NSPasteboard to find the host that the pastboard server (gpbs) is running on.

Example 10-1. NSHost

defaults write NSGlobalDomain NSHost localhost

If you are running an old X environment you may need the GSOldClipboard feature. This feature swaps the PRIMARY for selection and CLIPBOARD for pasteboard to the old behaviour of PRIMARY for the pasteboard and CLIPBOARD for the selection.

The default setting is NO.

Example 10-2. GSOldClipboard

defaults write NSGlobalDomain GSOldClipboard YES

X startup script

Create the following script in the Makefiles directory e.g. /usr/GNUstep/System/Library/Makefiles with the name

# (c) 2003 Dennis Leeuw
# License: GPL version 2 or any newer version
# If GNUstep is not installed in the default place (/usr/GNUstep)
# set this variable to the GNUstep Makefile directory
# e.g. /usr/GNUstep/System/Library/Makefiles
# Make sure GNUSTEP_MAKEFILES is set to something
if [ "x$GNUSTEP_MAKEFILES" = "x" ]; then
        if [ -d /usr/GNUstep/System/Library/Makefiles ]; then
	                echo "GNUstep is not installed"
	                exit 1
# Make sure GNUSTEP_MAKEFILES contains
# And source if available
if [ -x $GNUSTEP_MAKEFILES/ ]; then
        echo " not found in $GNUSTEP_MAKEFILES"
        exit 1
# Start the services
Run this script whenever X is started. Dependend on your setup this could be in your ~/.xinitrc or in your Xsession startup files.

Chapter 11. Changing the Look

This chapter introduces advanced ways of adjusting the GNUstep look. When you are new to GNUstep you can safely skip this chapter.

Look and Feel


GNUstep can handle the window decorations itself, without a window manager doing it. This way you get a real GNUstep look-and-feel.

Example 11-1. GSX11HandlesWindowDecorations

defaults write NSGlobalDomain GSX11HandlesWindowDecorations NO

NSInterfaceStyleDefault can be used to change the interface style. This is described somewhere... [META]

Styles: NSNextStepInterfaceStyle, NSMacintoshInterfaceStyl, NSWindows95InterfaceStyle, GSWindowMakerInterfaceStyle

Default: NSNoInterfaceStyle

An interface style specific to menu operation. If not set the NSInterfaceStyleDefault value is used.


GNUstep can make use of the by the system supplied fonts, e.g. de fonts already installed on Windows®, or the ones supplied by X11, or GNUstep could use the specific fonts located in the Library/Fonts/ directories.

Every font key, like NSBoldFont, also has a size element, NSBoldFontSize. Within the following table the size component is mentioned in the Size column. If there is no setting for a certain key it defaults to the value corresponding with the key mentioned in the Value or Size column.

Table 11-1. System Font Defaults

An exception to the rule is NSSmallFontSize, which only has a size, which per default is set to 9.

Anti-Aliased Fonts

Anti-aliased fonts are per default set to YES for GNUstep. It can be controlled through the GSFontAntiAlias setting.

If X11 has the XFT extension the X11 backend will use anti-aliased fonts. If you get an error message saying that the Helvetica font is not found, try setting GSFontAntiAlias to NO.

The libart backend text uses anti-aliased text at small sizes (9-16 pixels).

Example 11-2. GSFontAntiAlias

defaults write NSGlobalDomain GSFontAntiAlias YES

Font mask for X11

Normally all fonts available in the X-server will be used with GNUstep, the default for GSFontMask is thus "*". If there are enormous amounts of fonts installed it might happen that the font_cacher is having problems with the X-server. To solve that problem you could select a mask of fonts to be used, e.g. "*-iso8859-1" so only the ISO Western fonts are loaded.

Example 11-3. GSFontMask

defaults write NSGlobalDomain GSFontMask "*-iso8859-1"

Multi-byte and Unicode support

To enable Multi-byte/Unicode support, which is useful for many East Asian languages set the GSXEnableFontSet to YES. It's default value is NO since the backend is somewhat slower with GSXEnableFontSet enabled.

Example 11-4. GSXEnableFontSet

defaults write NSGlobalDomain GSXEnableFontSet YES

GNUstep color system

Internally GNUstep uses names to address colors. These names are defined in externs.m and NSColor.m. The system grey scales are described in externs.m which is used and completed by NSColor.m to result in the following table:

Table 11-2. Color names

ColornameRed valueGreen valueBlue ValueAlpha Value

The first time a GNUstep application is started a system color file called System.clr is created in the user domain directory under the /Library/Colors/ directory. This is a binary file, and thus not easily adjustable. To change the system colors one needs the defaults command.

The values of Red, Green and Blue are not X11 RGB values, those have to be calculate using a formula of decimal-color-value devided by 255. A value of #505075 (as used by webpages) is hexadecimal, which means you have 80 decimal for red, 80 for green and 117 for blue. Which results in the following values:

Red = 80/255 = 0.313

Green = 80/255 = 0.313

Blue = 117/255 = 0.418

If you would like to change the colors of your system, you need to calculate the values for the keys defined in the system. The following keys are defined and can be used to change the GNUstep-looks:

Table 11-3. GNUstep color keys

controlBackgroundColorThe color used for buttons, sliders, and the background of non-filled browser space.lightGray
selectedMenuItemColorThe color for a selected menu item.white
selectedMenuItemTextColorThe color of the text on a selected menu
controlColor lightGray
controlHighlightColor lightGray
controlLightHighlightColor white
controlShadowColorThe shadow color around buttonsdarkGrey
controlDarkShadowColor black
controlTextColor black
disabledControlTextColor darkGray
gridColor gray
headerColor lightGray
headerTextColor black
highlightColor white
keyboardFocusIndicatorColor black
knobColor lightGray
scrollBarColor gray
selectedControlColor white
selectedControlTextColor black
selectedKnobColor lightGrey
selectedTextBackgroundColor lightGrey
selectedTextColor black
shadowColor black
textBackgroundColor white
textColor black
windowBackgroundColor lightGray
windowFrameColor black
windowFrameTextColor white

To change the keys use:

Example 11-5. Change color keys

defaults write NSGlobalDomain controlBackgroundColor "0.313 0.313 0.418"

Alpha channel

For the Xlib backend GNUstep uses various tricks to get alpha colors working. This trickery may slow down the drawing of images. So if you use a very slow machine you might want to turn this off.

This is an Xlib backend only setting:

Example 11-6. GraphicCompositing

defaults write NSGlobalDomain GraphicCompositing NO
The default is YES.

Application color names

Within an application it is possible to use ones own list of named colors. This list is loaded by NSColorList and can be created as an ASCII configuration file with the .scr extension. Such a file might look like this:

0 1.000 0.980 0.980 1.0 snow
0 0.972 0.972 1.000 1.0 ghost white
0 0.972 0.972 1.000 1.0 GhostWhite
The first line tells the system the amount of colors it can expect. In this case 3 new entries.

The first element of a line describes the type of color that is defined. In this case the 0 says RGB+Alpha since that is currently the only supported one.

The next three elements are the Red, Green, and Blue values.

The 1.0 entry is the value for alpha.

And finally there is the name that is given to the color entry.

Setting the colors per channel

NSColorsPerChannel defines the maximum number of colors to display. The default value is ???. This option is only available when using an X11 backend.

On pseudo-color displays this would limit the amount of colors available.

On true-color displays it limits the amount of red, green and blue ranges.

Displaying Files

Displaying directories

To make directory names stand out compared to filenames one can set the boolean value of GSBrowserCellFontify to YES. Per default this setting is set to NO, which means that the font used for filenames and directory names in e.g. the filebrowser are drawn in a non-bold font. To set the behaviour so that directories are drawn in a bold font use:

Example 11-7. GSBrowserCellFontify

defaults write NSGlobalDomain GSBrowserCellFontify YES

Hide dot-files

Per default files starting with a dot ('.') are not hidden. On Unix-like systems this might clutter the users home directory. The GSFileBrowserHideDotFiles setting changes this for the save and open panels.

The setting is a boolean, default set to NO. To change this use:

Example 11-8. GSFileBrowserHideDotFiles

defaults write NSGlobalDomain GSFileBrowserHideDotFiles YES


There are two things within this documentation that are refered to as icons. The first one is the square picture that represents an application, and the second one is any image used within the GNUstep interface.

To make the distinction clear the squares representing applications will be addressed as application icons, where all other GNUstep images are refered to as icons.

You may change most icons, by editing the nsmapping.strings file. This file can be found in the system domain under the Library/Images/ directory. To change your personal settings use the Library/Images/nsmappings.strings file which is in the user domain.

The syntaxt of the file looks like this:

/* Examples */
NSSwitch = common_SwitchOff;
NSHighlightedSwitch = common_SwitchOn;
NSRadioButton = common_RadioOff;
The lefthand part is the OpenStep® name, and the left hand part is the filename without the extension. The images must be found in the same directory as the nsmapping.strings file.

Freedesktop icons

GNUstep makes it possible to use the Freedesktop thumbnail files as icons for the desktop, instead of the icons provided by GNUstep.

The GSUseFreedesktopThumbnails contains a boolean value which per default is set to NO. If you change this setting and the images are not found, the GNUstep provided ones are used.

Example 11-9. GSUseFreedesktopThumbnails

defaults write NSGlobalDomain GSUseFreedesktopThumbnails YES

Window Maker Dock

To make GNUstep applications dockable in Window Maker UseWindowMakerIcons should be set to YES (the default). If Window Maker isn't used this setting has no effect.

If the UseWindowMakerIcons is NO the application icon window is provided by the application itself, instead of being provided by Window Maker

Example 11-10. UseWindowMakerIcons

defaults write NSGlobalDomain UseWindowMakerIcons YES


A minimized window within GNUstep terminology is refered to as a MiniWindow, since it is an actual miniturized display of the contents of a full size window. MiniWindows are normally displayed on the bottom of the screen next to the application icons.

Per default GNUstep handles the miniaturization of MiniWindows itself. This is equivalent to setting GSAppOwnsMiniwindow to YES.

However if you want the window manager to control the behaviour of the iconification of the application window you should change the value to NO.

Example 11-11. GSAppOwnsMiniwindow

defaults write NSGlobalDomain GSAppOwnsMiniwindow NO

MiniWindow on taskbar

The setting of GSUseWMTaskBar is only useful for the Windows® backend, since is affects the placement of MiniWindows on the taskbar.

If set to YES, the backend assumes that MiniWindows are displayed in a task bar. In this case, the application icon is not shown and the main menu behavior is changed so it is not ordered out, but minimized, so clicking on the minimized menu will activate the application.

Example 11-12. GSUseWMTaskBar

defaults write NSGlobalDomain GSUseWMTaskBar YES

Progress Panel for Save and Open

On slow systems it might be handy to see a progress bar when the system is reading the contents of a large directory. This way the user knows that nothing is wrong.

The GSSavePanelShowProgress can be used to enable this behaviour for both the Save Panel as the Open Panel. Per default the setting is NO.

Example 11-13. GSSavePanelShowProgress

defaults write NSGlobalDomain GSSavePanelShowProgress YES

Appendix A. Build from source

Tips while installing

Be sure to have atleast /usr/local/lib and /usr/X11R6/lib in your /etc/ before you continue.

The general procedure to compile most software programs is to use:

make install

Make sure you use GNU make for this. That means that on e.g. FreeBSD you'll have to substitute the make command with gmake. I don't know much about other compilers than gcc, so I guess you are on your own on that one. Let me know if you have good tips.

I always like to keep track about what a program installs and where, so I always do (I assume sources go under /usr/src):

mkdir -p /var/adm/[programname]
touch /usr/src/test
make install
find / -cnewer /usr/src/test | grep -v /proc | grep -v /var | grep -v /usr/src > /var/adm/[programname]/filelist

Now I have a complete list of all installed files, which saves me trouble in generating packages, but also when removing the program, before upgrading or if something was build wrong (which happens).

Build ffcall

This is a collection of four libraries which can be used to build foreign function call interfaces in embedded interpreters. The four packages are:

  • avcall - calling C functions with variable arguments

  • vacall - C functions accepting variable argument prototypes

  • trampoline - closures as first-class C functions

  • callback - closures with variable arguments as first-class C functions (a reentrant combination of vacall and trampoline)

Download URL



make install