Frequently Asked Questions

General JHBuild Questions

Q: 

The wget command can't download any tarballs. How do I get it to work with my firewall?

A: 

This can be fixed by creating or editing a ~/.wgetrc file. If you need to go through an HTTP proxy to access FTP sites, add a line like the following to the file:

ftp_proxy = http://hostname:port/

If you just need to use passive FTP connections (sometimes needed with NAT firewalls), add the following line:

passive_ftp = on

This will fix all uses of the wget command.

Q: 

Building stuff is slow. Is there any way I can speed it up?

A: 

Other than buying a faster CPU, hard disk or getting more memory, you might want to install CCache, which can cache compilation results for you. It is available with most distributions.

After installing CCache, set the cache size with the following command:

ccache -M 2G

(replace 2G with the size you want for your cache). Then create symlinks to CCache for your compiler in ~/bin:

cd ~/bin
for cmd in cc gcc c++ g++; do
  ln -s /usr/bin/ccache $cmd
done

You can check the status of your cache (such as cache hit rates) with the following command:

ccache -s
Q: 

Is there a better way to monitor the status of the build than looking at terminal window?

A: 

If you have Zenity >= 2.9 installed on your system, JHBuild will display an icon in the system tray. The icon will display the current build stage, and the tooltip will show the last message from JHBuild.

The icon will also pop up a balloon on error.

Building GNOME

Q: 

What other prerequisites are needed to build GNOME with JHBuild?

A: 

Some of the packages you will need on your system include:

  • DocBook XML DTD and XSLT stylesheets. These need to be registered in the XML catalog (/etc/xml/catalog).

  • X libraries

  • fam or gamin (used by gnome-vfs for file monitoring).

  • libsmbclient from Samba (used for browsing Windows networks).

  • libbz2 from bzip2.

  • libpng, libjpeg and libtiff (used for image loading).

If you are installing distro packages, you may need to install corresponding "dev" or "devel" packages. Note that this list is just a starting point - not a comprehensive list.

Q: 

I've built GNOME with JHBuild. How do I run it?

A: 

(a) You will want to create a ~/.xsession file, which is run by the display manager when you log in. This file should look something like this:

#!/bin/sh
exec jhbuild run gnome-session

Finally, you should make sure that the ~/.xsession file is executable.

(b) Use a more sophisticated session script that is run when you log in using a graphical login manager (gdm /kdm/xdm). The problem with D-Bus and HAL is that these daemons come with your distribution and are most likely already running, but may be unusable by the Gnome development version (i.e. they are too old or incompatible). The session script just starts hal and d-bus from the jhbuild installation in addition to the system-wide versions. Put the following script as e.g. /usr/bin/gnomesvn-session and make sure you adjust GNOME to your local settings:

GNOME=/opt/gnome2
 
GDK_USE_XFT=1
#XDG_DATA_DIRS=$XDG_DATA_DIRS:$GNOME/share
#XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:$GNOME/etc/xdg

DBUS_LAUNCH="$GNOME/bin/dbus-launch --exit-with-session"
 
sudo su -c "$GNOME/bin/dbus-daemon --system; \
                   $GNOME/sbin/hald"
 
jhbuild run $DBUS_LAUNCH gnome-session

Uncomment the XDG_ lines if you want the system-wide program menus from your distribution in addition to the entries from the jhbuild GNOME. Make sure the file is executable:

chmod a+x /usr/bin/gnomesvn-session

Because you need to start system daemons, you will need root privileges which are obtained by sudo. Note that you need to configure sudo so that it won't ask for a password! Run visudo as root and enter (don't forget to change your username and the paths):

# Cmnd alias specification
Cmnd_Alias  GNOME =  /opt/gnome2/bin/dbus-daemon, \
                     /opt/gnome2/sbin/hald

# User privilege specification
gnometester  ALL = NOPASSWD: GNOME

In order to get a new session entry in the login manager, create /usr/share/xsessions/gnomesvn.desktop and put this or something similar:

[Desktop Entry]
Encoding=UTF-8
Name=Gnome svn (jhbuild)
Comment=This session logs you into Gnome testing session
Exec=/usr/bin/gnomesvn-session
Icon=
Type=Application

Now you can restart gdm and log into your jhbuild GNOME. Make sure you select the jhbuild session before entering the login credentials. Advice: Use a separate user account for testing!

Q: 

I built GNOME using JHBuild with prefix set to /usr, and now my system is broken. What should I do?

A: 

Don't set prefix to /usr.

Q: 

How do I get gnome-volume-manager to work when running in a prefix?

A: 

The gnome-volume-manager program reacts to messages from hald over the system message bus, which must be running as root. Assuming that your distribution comes with HAL, the main problem is getting gnome-volume-manager to talk to the system message bus.

Since communication is done over a UNIX domain socket, the easiest way to do this is to create a symlink from /var/run/dbus to $prefix/var/run/dbus:

mkdir -p $prefix/var/run
cd $prefix/var/run
ln -s /var/run/dbus dbus

You may also have trouble building HAL with JHBuild, since it tries to install some things outside of its build root. Running make -k install in the hal directory might help here.