JHBuild und GNOME
This section provides guidance on building, installing and running GNOME.
3.1. GNOME erstellen
Um GNOME zu erstellen, werden einige Entwicklerpakete benötigt. Diese sind:
-
XML-DTD und XSLT-Stilvorlagen von DocBook. Diese müssen im XML-Katalog registriert sein (/etc/xml/catalog).
-
X-Bibliotheken
-
libsmbclient aus Samba (wird zum Durchsuchen von Windows-Netzwerken verwendet).
-
libbz2 aus bzip2.
-
libpng, libjpeg und libtiff (verwendet zum Laden von Bildern).
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.
3.2. Ausführung einer einzelnen GNOME-Anwendung
This section details how to run a single GNOME application. The application will run within the current desktop environment. To run the application within the complete JHBuild GNOME see Abschnitt 3.3 ― Ausführung der GNOME-Arbeitsumgebung.
Starten Sie eine JHBuild-Shell. In der JHBuild-Shell sind bereits alle nötigen Umgebungsvariablen gesetzt.
$jhbuild shell
Überprüfen Sie, ob die richtige Anwendung ausgeführt wird. Zum Beispiel:
$which gedit /opt/gnome/bin/gedit
Die Anwendung ausführen:
$gedit &
Alternativ rufen Sie die Anwendung dem Befehl run auf:
$jhbuild run gedit
3.3. Ausführung der GNOME-Arbeitsumgebung
Create a new user account to run the JHBuild GNOME. Running JHBuild GNOME using different user account is recommended to avoid problems caused by user settings stored in the home directory. This manual refers to the new account as gnomedev.
Setup JHBuild on the new gnomedev account. Copy or soft-link ~/.jhbuildrc and ~/.local/bin/jhbuild to gnomedev home directory.
Öffnen Sie ein Terminal als Benutzer gnomedev. Fügen Sie ~/.local/bin dauerhaft zur Variable PATH hinzu, führen Sie folgenden Befehl aus:
$ echo PATH=$PATH:~/.local/bin >> ~/.bashrc
Testen Sie, ob JHBuild funktioniert:
$ jhbuild run pkg-config gtk+-2.0 --modversion 2.20.1
There are two different methods to run JHBuild GNOME:
- Eingebettetes Fenster (empfohlen).
- Anmeldefenster.
3.3.1. GNOME für die Ausführung in einem eingebetteten Fenster einrichten
Erstellen und installieren Sie JHBuild GNOME.
Install the Xephyr application. On Fedora the system package is called xorg-x11-server-Xephyr, on Ubuntu and Debian the system package is called xserver-xephyr.
Testen Sie, ob Xephyr funktioniert:
$Xephyr -ac -screen 800x600 :1 2> /dev/null &
If successful, a window with black background will be displayed. Close the Xephyr window.
Enable system services. JHBuild GNOME will use the /usr/bin system D-Bus daemon and the system services within /usr/share/dbus-1/system-services/. JHBuild GNOME will use the JHBuild session D-Bus daemon and the services within /opt/gnome/share/dbus-1/services/. Replace /opt/gnome with GNOME install prefix in the command below:
$rm -rf /opt/gnome/var/run/dbus $ln -s /var/run/dbus /opt/gnome/var/run/dbus $rm -rf /opt/gnome/var/lib/dbus/machine-id $ln -s /var/lib/dbus/machine-id /opt/gnome/var/lib/dbus/machine-id
Create a GNOME startup script at ~/.local/bin/gnome-jhbuild-xephyr-session with the following, replacing /opt/gnome with GNOME install prefix:
#!/bin/sh
GNOME=/opt/gnome
GDK_USE_XFT=1
XDG_DATA_DIRS=$XDG_DATA_DIRS:$GNOME/share
XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:$GNOME/etc/xdg
jhbuild run gnome-session
Machen Sie die Datei ~/.local/bin/gnome-jhbuild-xephyr-session ausführbar:
$chmod u+x ~/.local/bin/gnome-jhbuild-xephyr-session
3.3.2. Ausführung von GNOME in einem eingebetteten Fenster
Öffnen Sie ein Terminal als Benutzer gnomedev.
Rufen Sie Xephyr auf:
#Xephyr -ac -screen 800x600 :1 2> /dev/null &
Setzen Sie die Umgebungsvariable DISPLAY:
#export DISPLAY=:1
Starten Sie GNOME:
#gnome-jhbuild-xephyr-session
Falls erfolgreich, wird das JHBuild-GNOME in einem Xephyr-Fenster angezeigt. Falls nicht, überprüfen Sie die Ausgaben des Terminalfensters.
3.3.3. GNOME für den Start über das Anmeldefenster einrichten
Erstellen und installieren Sie JHBuild GNOME.
Enable system services. JHBuild GNOME will use the /usr/bin system D-Bus daemon and the system services within /usr/share/dbus-1/system-services/. JHBuild GNOME will use the JHBuild session D-Bus daemon and the services within /opt/gnome/share/dbus-1/services/. Replace /opt/gnome with GNOME install prefix in the command below:
$rm -rf /opt/gnome/var/run/dbus $ln -s /var/run/dbus /opt/gnome/var/run/dbus $rm -rf /opt/gnome/var/lib/dbus/machine-id $ln -s /var/lib/dbus/machine-id /opt/gnome/var/lib/dbus/machine-id
Create a GNOME startup script at /usr/bin/gnome-jhbuild-session with the following, replacing /opt/gnome with GNOME install prefix:
#!/bin/sh
GNOME=/opt/gnome
GDK_USE_XFT=1
XDG_DATA_DIRS=$XDG_DATA_DIRS:$GNOME/share
XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:$GNOME/etc/xdg
jhbuild run gnome-session
Machen Sie die Datei /usr/bin/gnome-jhbuild-session ausführbar:
$chmod a+x /usr/bin/gnome-jhbuild-session
Um einen neuen Sitzungseintrag für das Anmeldefenster anzulegen, erstellen Sie die Datei /usr/share/xsessions/gnome-jhbuild.desktop und geben Sie ein:
[Desktop Entry] Name=GNOME (JHBuild) Comment=This session logs you into GNOME testing session TryExec=/usr/bin/gnome-jhbuild-session Exec=/usr/bin/gnome-jhbuild-session Icon= Type=Application
Starten Sie gdm neu.
3.3.4. GNOME über das Anmeldefenster ausführen
To run the JHBuild GNOME, select the GNOME (JHBuild) session at the display manager before entering gnomedev login credentials. If successful, JHBuild GNOME will be displayed. If unsuccessful, check the log within the ~gnomedev/.xsession-errors file.