at root command line
# pkg_add -r gnome2
This will download the latest GNOME 2.22 packages from the FreeBSD FTP site, and proceed to install them on your system.
Up-to-date GNOME packages for i386 and amd64 for all supported versions of FreeBSD are also available from the
GNOME Tinderbox.
To build GNOME 2.22, you must first obtain the latest ports tree skeleton. This is most easily accomplished with portsnap(8) or
cvsup. Then:
# cd /usr/ports/x11/gnome2
# make clean
# make install clean
You still need to
enable the GNOME services to run e.g. the
graphical login automatically on system startup.
In order to make the most of your new GNOME Desktop, you will want to start all of the GNOME-related services at boot-time. If you wish to take full advantage of GNOME, add the following to /etc/rc.conf:
gnome_enable="YES"
This will enable services such as GDM, HAL, D-BUS, and Avahi on system startup. If you do not want to run all of these services, you should forgo the
gnome_enable property, and manually enable the services you want.
If you do not want to reboot immediately after the installation, you can invoke the following commands:
# /usr/local/etc/rc.d/dbus start
# /usr/local/etc/rc.d/avahi-daemon.sh start
# /usr/local/etc/rc.d/avahi-dnsconfd.sh start
# /usr/local/etc/rc.d/hald start
# /usr/local/etc/rc.d/gdm start
To start GNOME 2.22 under X without using GDM, add the following line to ~/.xsession or ~/.xinitrc, as appropriate (see startx(1)):
exec gnome-session
source:
FreeBSD GNOME Project: GNOME 2.22 FAQ