Jhbuild

Jhbuild is a tool used to build the whole GNOME desktop from the git source, however, it can be used to build other projects creating a moduleset for it.

Useful resources

Installation

  mkdir -p ~/checkout/gnome2

  cd ~/checkout/gnome2
  git clone git://git.gnome.org/jhbuild

  cd jhbuild
  ./autogen.sh
  make
  make install

  ls modulesets/

  cp sample.jhbuildrc ~/.jhbuildrc
  vim ~/.jhbuildrc

  sudo mkdir -p /opt/gnome2
  sudo chown username:usergroup /opt/gnome2

  jhbuild --help

export PATH=$PATH:~/.local/bin

  jhbuild sanitycheck

  jhbuild bootstrap

  jhbuild build

  jhbuild build gtk+

Running the Code

Now that jhbuild has built your software, you will want to run it! There are several ways to do this. If you are working with a single program, the easiest way is to have jhbuild launch a shell that has all the necessary environment variables set. For instance, to run nautilus:

  jhbuild build nautilus
  jhbuild shell
  which nautilus (should give "/opt/gnome2/bin/nautilus")
  nautilus

If you want to run an entire gnome desktop, you'll need define a jhbuild session and launch it from gdm (or, alternatively, you can launch your custom session from vnc.) You should create a dedicated user account for this, or your normal working desktop may become unstable. First, create a file called "/usr/bin/jhbuild-session", with this in it (and /etc/jhbuild.conf would be a link to your ~/.jhbuildrc):

  #!/bin/sh
  exec jhbuild --file=/etc/jhbuild.conf run gnome-session

and make it executable

  sudo chmod a+x /usr/bin/jhbuild-session

Then, as root, create a file called "/usr/share/xsessions/jhbuild.desktop", with this in it:

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

Now, when you log in using gdm, "Jhbuild GNOME" should be listed as one of the choices.

For remote development, you can also use vnc. Modify your ~/.vnc/xstartup file like so:

  #!/bin/sh
  [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
  [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
  xsetroot -solid grey
  vncconfig -iconic &
  jhbuild-session &
  #gnome-session &

Examples of use


CategoryJhbuild CategoryProject

Jhbuild (last edited 2009-07-02 09:44:02 by EmmanueleBassi)