Linux Project

Installing and Configuring FreeBSD and KDE

This project walks you through the installation and configuration of FreeBSD 5.0 and KDE 3 on a PC. FreeBSD doesn't baby you as much as most Linux ditributions, so this can be a daunting task. Follow these instructions, however, and you will be on your way to FreeBSD/KDE bliss in no time.

Installing the base FreeBSD 5.0 Operating System

  1. Download FreeBSD iso images from the Internet and burn them to a CD. is a good place to look for iso's.
  2. Place the newly burned CD into the CD-ROM and boot from it.
  3. After the OS boots, an installation selection screen will appear. Use the TAB key to select "Standard" from the menu. Hit "OK" to clear the message screen that pops up.
  4. Now we select the drive we wish to which we wish to install. Choose "ado0" from the menu with the SPACEBAR key.
  5. We want to install FreeBSD onto a clean disk. Save all important data from hard drive before this step! Press the A key to use the entire disk. Next, use the D key to delete any partition that doesn't have "Usused" in the "Desc" field.
  6. Press C to create a "slice" (aka a partition). Clear the field and type "512M" (without quotes). Hit OK. On the next screen change the field from "160" to "130". This creates a swap partition of 512 megabytes.
  7. Now we will create the OS partition. Type C again, but this time just hit ENTER; this will use the remaining disk space. Also, leave the partition type as "160". When this is done, press Q to exit the partition program.
  8. We will now choose the boot manager. Leave this on its default setting by just hitting OK. Also, OK past the next two message screens.
  9. The next screen should look a lot like the partition screen. Here, hit A to use default settings, then press Q to exit.
  10. We now must choose our base package installation. Choose "All" with SPACEBAR, then go to OK. Also press OK when asked about "Ports Collection" and OK past the next screen.
  11. Choose "Install from CD/DVD". Now go grab a cup of coffee; the package installation will take a sec.
  12. When the installation is done hit OK. Press Yes to configure Network Settings.
  13. Say Yes to DHCP and then hit OK.
  14. No to anonymous FTP.
  15. No to NFS Server.
  16. No to NFS Client.
  17. Select No to enable moderate security (your firewall). Choose Yes to configure it yourself.
  18. Select No to system console settings. If you wish to customize your Terminal, select Yes.
  19. Now we configure the time. Select no when asked about UTC. Next choose option 2 for North America, then option 45 for the U.S. Select option 9 for Central time. Finally, say Yes when asked about CDT.
  20. If you want Linux binary compatibility, select Yes.
  21. Now it's time for a another cup of coffee.
  22. When the next set of packages is installed, you will be asked about a mouse. Say Yes to having a none USB mouse.
  23. Select option 2 to test your mouse daemon. If you see a cursor move around your good to go. After testing you mouse click OK.
  24. Next, select No for X server configuration. We will do this later.
  25. Say Yes to browse packages. Go to the "All" option and hit ENTER. Now, use the SPACEBAR to select the packages you want. It is the safest to install all of the packages even though this takes a while. When done selecting, hit ENTER. When you return to the package menu screen, choose "Install" from the bottom of the screen and then say OK.
  27. Now you have the option of adding user accounts. The add user screen is pretty simple. Add as many users as you need. When done adding users, go to Exit.
  28. Set the root password. Remeber this, it is needed to configure X11 and KDE in the next section.
  29. On the next screen hit No, then exit the installer and reboot the system. Congrats! you now have FreeBSD on your system.
Configuring X and running KDE

This next section involves setting up your X server and having KDE start up automaticly when X-Windows is started (when "startx is type after login at the command line).

  1. Since we skipped the X configuration in the FreeBSD Install, we will configure it now. Login as root and type "XFree86 -configure" (without the quotes). This will take a sec and there is no visual feedback.
  2. When the program is done probing your hardware, we must test the new config file. The XFree86 program placed a new config file in the /root directory called "XF86Config.New". Type "XFree86 -xf86config /root/XF86Config.New" If you see a grey screen with an "x" as your cursor, your new config file works. Type CTRL + ALT + BACKSPACE to kill the X server and return to the terminal.
  3. Now we will edit the XF86Config.New file to tune it to our needs. Bring up the file in a text editor (i.e. emacs or vi). When the file is open, scroll down to 'Section "Monitor"'. We will add our monitor's display frequencies. If you are using a Dell monitor in one of the computer labs, add the following sections directly under the "ModelName" line:

    HorizSync 30.0 - 85.0
    VertRefresh 50.0 - 160.0
    Option "dpms"

  4. Now we must add our desired color depths and resolutions. Scroll down to the "Screen Section" Right under the "Monitor" line, add the folowing:

    DefaultDepth 24

    This tells the X server to start with a 24-bit color depth. Next scroll down to the last section of the file. There should be a long list of Depths; find 24. Under the "Depth 24" line, add:

  5. Modes "1024x768"

    This tells the X server that the resolution of 1024x768 is legal for the 24-bit color depth.

  6. Save the file and exit the editor. Test the file again using the same command as above. If you get the grey screen with the X, everthing is good.
  7. Next we will copy the newly tuned file to the place X11 looks for its configuration. Type "cp /root/ /etc/X11/XF86Config". Now type "startx" X Windows should start up and you should see some terminal windows open up. Type "exit" into the one at the far left.
  8. Now we must edit the script startx uses to start X Windows so KDE will load at X Windows start up. Open the file "/usr/X11R6/lib/X11/xinit/xinitrc" up in an editor. Replace "twm &" with "kwm &". This tells X Windows to use the KDE window manager instead of the default twm window manager. Next, comment out all lines below "kwm &" by inserting "#" in front of them. At the end of the commented lines, add "startkde". Save the file and exit.
  9. Type startx, X Windows should load directly into KDE. Congrats, your here. Have fun!
When the project was over, the following XF86Config and xinitrc worked for us: