Since there are many different packages in the pkgsrc tree you can use a small tool to find the one you are looking for in a short time. For example if you are looking for the ruby package just do

+

# pkg_search ruby

+

and you will get a list of packages containing ruby in their name. If you want to install the ruby-1.9.2pl0 package now, just do

-# pkg_search -v ruby-1.9.2pl0

+

+ # pkg_search -v ruby-1.9.2pl0

+

and you will get the path leading to the package.

### Installing a package

You got two possibilities to install a package. The first one is to install it from source and the second one is to install prebuild binaries. Depending on your cpu and the size of the package its faster installing binaries, but if you want to change some build options you have to install it by source.

If you want to install binaries you only have to use the pkg_radd application. For example to install the xfce4 package just do:

-# pkg_radd xfce4

+

+ # pkg_radd xfce4

+

If you want to install something by source you have to change into the packages directory contained in the pkgsrc tree and execute bmake install clean:

-# cd /usr/pkgsrc/security/openssh && bmake install clean

+

+ # cd /usr/pkgsrc/security/openssh && bmake install clean

+

If you build a package by source you can also change some build options if supported by the package.

-# cd /usr/pkgsrc/security/openssh && bmake show-options

+

+ # cd /usr/pkgsrc/security/openssh && bmake show-options

+

You will get a list of supported options. To change them install the package by:

-# bmake PKG_OPTIONS.<package_name>="-option1 option2" install clean

+

+ # bmake PKG_OPTIONS.<package_name>="-option1 option2" install clean

+

### Removing a package

If you don't need a package anymore and you want to remove it just change into the packages directory and do:

-# bmake deinstall

+

+ # bmake deinstall

+

### Updating packages

From time to time you should update your packages, since there will be newer versions with bugfixes or new functionality. There are several methods to update packages but the best one is to use pkg_rolling-replace. You can install it with pkgsrc. After you've done that you'll only have to:

-# cd /usr && make pkgsrc-update

-# pkg_rolling-replace -u

+

+ # cd /usr && make pkgsrc-update

+ # pkg_rolling-replace -u

## The X Window System

### Installing the Server

The installation of the X Window System contains a few steps. We will start with the most basic one: Installing the X-Server.

To do so you have to execute as root

-# cd /usr/pkgsrc/x11/modular-xorg-server && bmake install clean

+

+ # cd /usr/pkgsrc/x11/modular-xorg-server && bmake install clean

+

or if you want to install it as a binary

-# pkg_radd modular-xorg-server

+

+ # pkg_radd modular-xorg-server

### Installing appropriate drivers

You now need some input drivers and a video driver for your video card.

If you want to install all input and video drivers so you can test them out install the modular-xorg-drivers package

Last package we need contains some useful applications like xterm and startx

-# cd /usr/pkgsrc/meta-pkgs/modular-xorg-apps && bmake install clean

+

+ # cd /usr/pkgsrc/meta-pkgs/modular-xorg-apps && bmake install clean

+

or if you want to install them as binaries

-# pkg_radd modular-xorg-apps

+

+ # pkg_radd modular-xorg-apps

### Configuring X

Since we have installed all necessary packages now we have to configure X so it works like we want it. First execute as root

-# Xorg -configure

-# cp /root/xorg.conf.new /etc/X11/xorg.conf

+

+ # Xorg -configure

+ # cp /root/xorg.conf.new /etc/X11/xorg.conf

+

Now we have a basic configuration file for X.

As normal user now create a file named ~/.xinitrc and write exec xterm in it. Now make it executable

-# chmod +x ~/.xinitrc

+

+ # chmod +x ~/.xinitrc

+

Now you can try to start the X server by doing

-# startx

+

+ # startx

+

as normal user.

If everything works well you should see a white terminal and should be able to mover your mouse. Click into the terminal and test you keyboard layout. Now type exit into the terminal and you will return to TTY. If everything worked well you can continue with installing a desktop environment, if not you have to manually edit /etc/X11/xorg.conf . Also check the X.org documentation and the DragonFly handbook, where you may find a solution to your problem.

@@ -100,9+138,12 @@ KDE stands for K Desktop Environment, its a modern desktop environment, based on

Since the KDE and QT packages are pretty huge you can save much time when using binary packages.

There are 2 different KDE meta-packages available: KDE3 and KDE4 . KDE3 is the older, but more stable release while KDE4 has many new features but also new bugs. So it's on you to decide which one you want to install.

For KDE3 simply do as root

-# pkg_radd kde3

+

+ # pkg_radd kde3

+

For KDE4

-# pkg_radd kde4

+

+ # pkg_radd kde4

Now that you have installed KDE we still need to start it.

As user edit your ~/.xinitrc and comment the exec xterm part out and add exec startkde.

Xfce is a lightweight desktop environment using the GTK+ toolkit (like GNOME) it has less applications than KDE but if your computer isn't that good it's the better choice.

To install Xfce4 simply install the xfce4 and xfce4- meta-packages as root

-# pkg_radd xfce4 && pkg_radd xfce4-extras

+

+ # pkg_radd xfce4 && pkg_radd xfce4-extras

or if you want to compile them yourself

-# cd /usr/pkgsrc/meta-pkgs/xfce4 && bmake install clean

-# cd /usr/pkgsrc/meta-pkgs/xfce4-extras && bmake install clean

+

+ # cd /usr/pkgsrc/meta-pkgs/xfce4 && bmake install clean

+ # cd /usr/pkgsrc/meta-pkgs/xfce4-extras && bmake install clean

+

To test if it works edit your ~/.xinitrc as user, comment the exec xterm part out and add exec startxfce4.

Since Xfce doesnt have its own display manager for a graphical login so you have to install one yourself. You could either install xdm, kdm or gdm. Gdm is the GNOME display manager and also uses the GTK+ toolkit so it's a good choice for Xfce, too.

-Install gdm by executing:

-# pkg_radd gdm

+Install gdm by executing

+

+ # pkg_radd gdm

+

or

-# cd /usr/pkgsrc/x11/gdm && bmake install

+

+ # cd /usr/pkgsrc/x11/gdm && bmake install

+

To start it at boot time you can simply add gdm_enable=”YES” to your /etc/rc.conf

+

+# How to continue?

+Now after you installed the basic desktop you may wish to add additional applications such as a browser like firefox:

+

+ # pkg_radd firefox

+

+You are fully free what to do now and pkgsrc offers a lot of desktop packages you could install. Have fun with your desktop!