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: 

Create ~/.wgetrc file. If an HTTP proxy is used to access FTP sites, add a line like the following to the file:

ftp_proxy = http://hostname:port/

If passive FTP connections are required (sometimes needed with NAT firewalls), add the following line:

passive_ftp = on
Q: 

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

A: 

CCache can speed up compilations, as it caches compilation results. CCache is available with most distributions.

Set the cache size with the following command:

ccache -M 2G

(where 2G is the size the cache). Create symlinks to CCache for the compiler in ~/bin:

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

It is possible to check the status of the cache including 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 Zenity >= 2.9 is 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 required 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 installing distribution packages, and if applicable for your distribution, install the corresponding “dev” or “devel” packages. A list of package names for different distributions is maintained on the GNOME wiki.

Q: 

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

A: 

Two options:

  1. Without JHBuild HAL and D-Bus. This method requires support from the display manager (e.g. GDM, KDM, XDM). Create a ~/.xsession file, with the following contents:

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

    Set the ~/.xsession file to be executable. At log in, set the session to custom. If the display manager does not have a custom option, refer to answer Section 7 ― Frequently Asked Questions below.

  2. With JHBuild HAL and D-Bus. HAL and D-Bus are daemons provided with your distribution. They are most likely already running, but may be unusable by the GNOME development version as they are too old or incompatible.

    Create a session script that is run when you log in using a display manager (e.g. GDM, KDM, XDM). The session script starts hal and d-bus from the JHBuild installation in addition to the system-wide versions.

    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

    Adjust the variable GNOME to your local settings. Uncomment the XDG_ lines for system-wide program menus in addition to the menus from the JHBuild GNOME. Save the script as /usr/bin/gnome-jhbuild-session or any other name of your choosing. Set the file to be executable.

    As the script starts system daemons, root privileges are required obtained via sudo. The script requires sudo to be configured so it doesn't prompt for a password. Run visudo as root and enter the following, changing username and paths as appropriate:

    # Cmnd alias specification
    Cmnd_Alias  GNOME =  /opt/gnome2/bin/dbus-daemon, \
                         /opt/gnome2/sbin/hald
    
    # User privilege specification
    gnometester  ALL = NOPASSWD: GNOME

    To add a new session entry in the display manager, create /usr/share/xsessions/gnomesvn.desktop and enter:

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

    Restart gdm and log into your JHBuild GNOME. Select the JHBuild session before entering the login credentials. Using separate user account is recommended 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 JHBuild GNOME?

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.

As communication is over a UNIX domain socket, the easiest way 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.