" Dont judge those who try and fail, judge those who fail to try "

Beginning KDevelop Programming Version 3.x

Chapter One :- Introducing KDevelop Chapter Two :- The KDE Application Chapter Three :- Common Widgets Chapter Four :- Containers And Views Chapter Five :- Database Programming With MySQL Chapter Six :- Input And Display Chapter Seven :- KDE Display Widgets Chapter Eight :- KDE Buttons And Input Chapter Nine :- KDE Containers And Views Chapter Ten :- Custom Widgets Chapter Eleven :- Events Chapter Twelve :- Drawing Chapter Thirteen :- Global Information and Configuration Files

Appendices

Appendix A :- Upgrading KDevelop

Downloads

PDF

Beginning KDevelop Programming ( 12.3 mb )

ZIP

Chapter One Source ( 1.2mb ) Chapter Two Source ( 3.8 mb ) Chapter Three Source ( 6.9 mb ) Chapter Four Source ( 6.4 mb ) Chapter Five Source ( 6.6 mb ) Chapter Six Source ( 3.6 mb ) Chapter Seven Source ( 2.2 mb ) Chapter Eight Source ( 2.2 mb ) Chapter Nine Source ( 1.1 mb ) Chapter Ten Source ( 5.3 mb ) Chapter Eleven Source ( 1.6 mb ) Chapter Twelve Source ( 5.2 mb ) Chapter Thirteen Source ( 3.8 mb )

Contributions

Contributors Page

Contacts

Author

[email protected]

Page Designer

[email protected]

The FreeBSD Mascot - Used With Permission

Introduction

If you have ever been interested in developing applications for Unix/Linux, but didn't know where to start in terms of getting your environment set up, then this article is for you. To that ends, the intent of this article is to describe how to do so by using a popular flavor of Unix-like operating systems, called FreeBSD, and at the same time familiarize you with some of the basics.

Conventions

This article will take advantage of the usage of screenshots - where applicable - to assist in the explanation of certain steps. In an effort to avoid having a mile long article, any screenshots will be denoted by an icon and can be viewed in a popup window by clicking it. Should you prefer to have inline screenshots, please make use of the accompanying PDF file for this article.

Obtaining FreeBSD

Click for a Screenshot General Screenshot

The intent of this article is to provide you with a clear-cut path that starts with nothing to having a fully graphical development environment similar to Windows and with a powerful IDE for developing applications on for Unix/Linux. By the time we're through you should have something akin to the screenshots featured above this paragraph.

FreeBSD is considered free software and licensed under the BSD License. As such, it costs nothing to obtain, use, and modify as you see fit, for whatever purpose commercial or otherwise. At the time of this writing, the latest version of FreeBSD is 6.1. This is the version the article assumes the reader will be using.

You can obtain it either by downloading the source, downloading a CD image, or purchasing the CD via a retailer. The benefit of the last option is that profits from the purchase help fund the project, but it is not required. For the sake of this article, we will assume you have downloaded the CD image and burned it to CD or purchased the CD.

To download, visit www.freebsd.org/where.html[^]. In all likelihood you'll want the i386 ISO download if you are running a 32-bit x86 processor. If you happen to be running a 64-bit AMD or Intel processor you'll want amd64 or ia64 respectively. For your convenience, if you are running a 32-bit x86 processor here is a direct link to download the CD image for disc 1 (505 MB) for version 6.1.

To get everything up and running we will only need disc 1, as we will download the rest of the software we need for the latest versions.

Installing FreeBSD

Note: Please be aware that if you plan to dual boot two operating systems, the installation for FreeBSD has the ability to wipe out the entire hard disk. Therefore, do not jump ahead, and this material is presented to you for use at your own risk. I assume no liability for those people who have to sue everyone. If you are concerned about data loss either perform a back up or consider using a different machine or virtual machine.

Note: It is important that you know that unlike in Microsoft Windows, everything in the Unix/Linux world is case sensitive, and I mean everything.

Note: You'll want to reserve at least 5GB for the hard drive and/or partition (of course the more the merrier) for the installation of FreeBSD and the graphical environment and development tools. FreeBSD can be installed with a lot less room, but we will accept a lof of defaults during the installation to smooth out the flow of this article.

Click for a Screenshot Boot Menu

The CD is bootable, so place disc 1 in the drive and crank up the computer. What you'll notice is a series of batons to indicate the loading of a temporary kernel, etc., followed by a simple boot screen. If you so desire, please use the icon above this paragraph if you would like to confirm what the boot screen looks like. If you have a USB keyboard choose seven; otherwise, wait for the default to be chosen or select option number one.

After the selection you should notice plenty of text scrolling by saying various things. If it looks like The Matrix, don't worry. It's just loading a temporary mini-OS to run the installation with. Unix-like and Linux operating systems have a tendency to show practically everything that's going on during the bootstrap. Once FreeBSD is installed this can be changed (as we'll discuss) to keep the environment more graphical. For now, just enjoy the show.

Click for a Screenshot Country Selection

You should arrive at the first screen for the installation program. Simply use the arrows keys to select your country and hit enter.

Click for a Screenshot Main Installation Menu

Now we are at the main menu for the installation program. Once again, we can use the arrows keys to select the "Standard" installation and hit enter. A message box should appear letting you know the next step is to set up DOS-style partitions. Just hit enter to pass this as it will be explained on the following screen.

Click for a Screenshot Select Drive

You will only see this screen if and only if you have two or more hard drives on the computer or virtual machine FreeBSD is being installed on. At this point it is very important to understand how FreeBSD and other Unix-like operating systems name the drives on the system. The drives are named by the driver that's used to work with them with a number appended on the end.

For instance, in the screenshot above, the system in question has three IDE drives. The driver FreeBSD uses for IDE is called ad for ATAPI Disk. They are numbered according to the order that the BIOS will list them in. By default the order would be controller 0,0 = drive 0; controller 0,1 = drive 1; controller 1,0 = drive 2; and controller 1,1 = drive 3.

If you are using SCSI or SATA drives. The driver FreeBSD uses is called da. The number used in the drive name is based on the controllers as well and the order in the chain. Also, if you intend to set up a RAID the naming is a bit different, and falls out of the scope of this article. However, if you need to opt for this a quick Google should provide you with information on naming conventions used.

Select the drive with spacebar to enter the next screen.

Note: If you do not know which drive belongs to which controller it would behoove to you restart and enter the BIOS setup to get this information before proceeding. After all, you don't want to wipe out the wrong drive. Also, POST should show you the ordering.

Click for a Screenshot FDISK (No Slices)
Click for a Screenshot FDISK (Existing Slices)
Click for a Screenshot FDISK (FreeBSD Slice)

This is FDISK and its purpose is very similar to that of Microsoft's version. First and foremost, what you think of as a partition, FreeBSD refers to as a slice. The reason for this will become more apparent in a couple of screens, but suffice it to say will we create partitions later on in the slice we setup on this screen. So in essence a partition in FreeBSD is really like a partition in a partition from a Windows standpoint. There are technical benefits to this architecture, but it falls out of the scope of this article. For now, just be aware of the terminology used.

It can be a bit involved if you are new to the Unix world. The good news is if the machine only has one hard drive and you plan on using the entire disk, your life has been made real simple. Just type in the letter A on the keyboard and you are set. Otherwise you should use the arrow keys to select unused space and then press C to create a slice. On the prompts that follow, just hit enter to accept the default values. They serve our purpose just fine as they will assume the maximum size possible and use a native FreeBSD slice.

When you are finished, you should have something similar to the screenshot labeled FDISK (FreeBSD Slice). Do not worry about any extra unused space before your slice. It is always reserved for the MBR and related bootstrap applications. Also, depending on the slice type, you may also have unused space at the end due to certain size restrictions. It should be minimal if it does appear and it is not a problem. This is not an issue exclusive to FreeBSD, but rather partitions/slices in general.

Once you have created a FreeBSD slice, hit Q on the keyboard to move on the next screen.

Click for a Screenshot Boot Manager

This screen is fairly straightforward. If you intend on dual booting operating systems you'll need what's referred to as a boot manager. FreeBSD will provide you with one or you can use a third party manager by leaving the MBR untouched. If this computer or virtual machine will be dedicated to FreeBSD, the second choice is the way to go. In choosing it, FreeBSD will start automatically when powering on the system. Select your choice with the arrow keys and hit enter when done. At this point you will be provided information regarding the upcoming screen. Simply use enter to pass it.

Click for a Screenshot Disklabel Editor

This is where we create those partitions in a partition mentioned earlier. Since our goal is to create a development environment and not a high performance server hosting thousands of users, we can simply strike A on the keyboard and accept the defaults. Once the defaults have been entered, press Q and we are finished with this screen. If there is more than one hard drive on the machine, you will then be returned to the select drive screen. You can simply tab out and select ok to continue.

Click for a Screenshot Choose Distribution

Here the FreeBSD installation is making things a bit simpler by giving us the option of selected commonly used installation types. That is to say it will automatically install the software and tools (including source code) that will be required to have installed anyway if we want to perform certain tasks, like developing in a graphical environment.

For this step use the arrow keys to choose X-Developer and hit spacebar to move on to the next screen.

Click for a Screenshot Ports Collection

The ports collection consists of software made for Unix and/or Linux that has been ported to FreeBSD already for us. The beauty of this system is it automatically takes care of dependencies to make installing software extremely simple. The downside to this is there are over 14,000 ports available and choosing yes here will install a skeleton directory structure. I personally do not like a bloated system and prefer only installing software that I intend to use.

This is by far the best way to go if you wish to modify any of the software's source code, but in our case we just want to install it. Conveniently, FreeBSD also offers a packaging system that is built on top of the ports system, the difference being the software is precompiled for us and can be used on a one-by-one basis. We will be taking advantage of this to make installing the graphical environment much easier.

We can choose No to move on to the next screen.

Click for a Screenshot X.Org

This screen asks for a few selections regarding the X server (more on that later) we selected to install. Fortunately, the default selections are just fine for what we want to accomplish. Simply choose Exit to return back to the distribution screen that we just came from.

Once back on the distribution screen we can now tab and select Ok and press enter to proceed.

Click for a Screenshot Installation Media

This screen may seem out of place at first, but the reason it ask this question is because the installation program we have been using does not have to be run from the CD we have. You could have chosen to use diskettes for this software to download the entire OS, perform a network install, etc. It was provided with the CD image just to make the install easier. Needless to say, we want to choose to install from a CD/DVD and move on to the next screen.

At this point you will be warned that you are about to pass the point of no return. Go ahead and select Yes and watch the fun begin. When this is done with you will receive a congratulations message telling you that you have now installed FreeBSD, and it's time to configure it a bit.

Configuring FreeBSD

Click for a Screenshot Configure Ethernet

You will be asked if you wish to cofingure any Ethernet or SLIP/PPP devices - choose Yes to proceed to the screen shown in the screenshot.

If you have a modem, you will want to choose PPP on the com port the modem is attached to. Please note that you will also need a dialer (several are supported) and a hardware-based modem. If you have a software-based modem, some are supported but first you will need to download, compile, and install the software and then configure the modem.

This article assumes that either we are connected via broadband or over a network to another machine. As such, we want to setup an Ethernet adapter. If you are using a fairly standard adapter, FreeBSD should recognize it automatically and list it as the first option - as shown in the screenshot.

If you do not see it, it may not be supported. Refer to this page[^] to make certain (for FreeBSD 6.1 on i386). Otherwise, select it and hit enter. It will ask if you wish to use IPv6, to which we will answer No. It will then ask for DHCP configuration and we want to answer Yes.

Click for a Screenshot DHCP

If you have broadband, you are most likely using DHCP for automatic configuration already. If this is the case, you should have all the needed information filled in already - as shown in the screenshot. Although, the local IPs were changed in the picture for security reasons. Just tab on down to Ok and press it to get to the next screen.

If this is blank, then FreeBSD cannot contact your or your ISP's DHCP server. If you are not using DHCP, then simply fill out the required data for your network. Proceed to the next screen.

At this point the installation will ask another series of questions. Feel free to choose whichever answers you want, but to keep things simple I will simply supply a general set of answers that will serve the purpose of creating a development environment.

Do you want this machine to act as a network gateway?  No
Do you wish to configure inetd?  No
Do you wish to enable SSH logins?  Yes
Do you wish to allow anonymous FTP?  No
Do you want this machine to act as a NFS server?  No
Do you want this machine to act as a NFS client?  No
Do you wish to customize console settings?  No
Do you wish to adjust this machine's time zone?  Yes

Click for a Screenshot Time Zone

You will then be asked if your machine is set to UTC or local time. Most machines are set to local time, so for this we will choose No and then be brought to the screen shown in the screenshot.

This is straightforward, select a region, then your country and finally select your time zone. Afterwards, it will ask you if the abbreviation for your time zone looks reasonable. It usually is, so just choose Yes. Once again, we have another series of questions to endure. Like the last time I'll choose answers related to our goal at hand.

Do you wish to enable Linux binary compatibility?  No
Does the system have a PS/2, serial, or bus mouse?  Yes

Click for a Screenshot The Mouse

You should now be at the screen shown in the screenshot. If you have a fairly standard mouse you more than likely won't have to specify anything. You can just select Test and run the mouse daemon (think of a daemon as a service in the Windows world).

Move the mouse around a bit to see if it is working. If it's not, answer No to the question that ask if it's working and then select a new port and protocol and test the mouse again. Once you have a working mouse, answer Yes to the question to go back and then exit the menu.

You will then be asked if you would like to browse the packages collection. Remember when we talked about ported software earlier and that packages are precompiled software from the ports collection? Well, this is it, but choose No to browse becuase we'll download the latest versions from the Internet instead.

Click for a Screenshot User & Group Management

You are now asked if you would like to add any additional user accounts and by all means it is strongly recommended that you do so. So, answer Yes to the question to be brought to the screen in the screenshot.

Just like in Active Directory for Windows, users belong to groups in Unix/Linux. The idea is to ease administration. As such, before we create new users for the system we need to first create a group they will belong to. So, select Add a new user group to the system.

Click for a Screenshot Groups

You will then be brought to this screen. For Group name I just choose "users" as that's common nomenclature for the Unix/Linux world. Enter the name you want and leave the rest of the fields at they are. After selecting ok, you'll return back to the previous window. This time select Add a new user to the system.

Click for a Screenshot Users

Now it's time to create the actual user account. Your login id can be whatever you want. Just remember it'll be case sensitive. The UID (user id) can be left alone. For Group make sure you specify the one we just created. In this example it is "users". The password should be self-explanatory. Full name is optional.

Member groups should be set to wheel. Think of this as a second group the user can belong to. It's not required to fill in, but I recommend it be set to wheel for your account and your account only. If you ever want to su (super user) - that is gaining the permissions of administrator - using this account it most belong to wheel.

I left the default for the home directory and changed my shell to /bin/tcsh as I prefer the c-style syntax. If you are used to the Linux way of life you may prefer to use bash instead, although it will need to be installed first. When finished, your screen should look similar to the screenshot. After selecting Ok you will be taken back to the user and group management screen again. Simply choose Exit this time. You will be notified that you should set the system manager's (a.k.a.; root) password at this point. Select Ok to continue.

Click for a Screenshot Root Password

At this point, just type in the password you want to use. It will not echo any characters to the screen at all. Just type it in, hit enter, and retype it to confirm the password and press enter again.

As a security precaution it is recommend that this not be the same password as your normal user account. Should anyone get a hold of this password they can trash the entire system.

You will be asked to revisit the configuration editor in case you have any last minute changes. Simply select No to go back to the main menu and tab out to select Exit Install. It will ask you to confirm your decision to exit. Only after you hit Yes can you remove the CD from the drive as the program locks it. Do make sure however that you remove the CD before the system restarts so we don't enter setup again. Finally, congratulate yourself for getting through the installation and configuration of the FreeBSD operating system.

When FreeBSD restarts you'll see the same boot screen you saw earlier. In fact, choose the same selection - either 1 or 7 depending on your needs.

Note: Usually after installation a system administrator will recompile a new kernel to speed up the system, make it a bit more stable by not loading drivers, etc. that the system does not need, and even add new functionality. However, for our purpose we will skip this as the generic kernel will do just fine for our development needs.

Click for a Screenshot Entropy Source

Since we elected to install ssh during the installation, there will now be a one-time warning message displayed during startup. It will speak of setting an entropy source, that is to say a series of random characters/junk from the keyboard, to use as the seed for encryption to be used with ssh. Without going into the details, it is much more secure than not salting the seed and/or using a system based time as the salt (as most do). Simply type in a random sentence or garbage and press enter. You can change this later if you wish, but after the first time you will not be prompted again.

X Window System

Note: The remaining software installations for this article assume that you have a valid Internet connection (we used DHCP during the install) as the commands used will automatically retrieve the latest versions of the software online.

You may have heard of this before (or incorrectly called "X Windows"). Without getting into too much detail the idea of a windowing environment (ala GUI) in Unix/Linux, know that it runs in a client/server model. The server side of it interfaces with the hardware (mouse, keyboard, monitor, etc.) and the client side of it is the software that interacts with the server. As such we need both server and client software to get our windowing system and graphical development environment up and running.

By far the most popular server is X (a.k.a.; X11). There is a free implementation of it called Xorg (for you old-timers, it was based on XFree86 4.4RC2). This was already installed during setup, but now we need to configure it. To begin login as root (the super admin, username is "root" and all lowercase) using the password you specified during the installation, and type the following command at the prompt:

xorgconfig

This will be a series of yes/no and multiple choice questions to set this up. They do not need much explaining, but I will provide a brief description of the important steps along with a screenshot.

Click for a Screenshot The first screen lets you know the intent of the program, and that it will create a configuration file for you. Simply press enter to proceed.
Click for a Screenshot Choosing Auto or SysMouse usually is good enough. Personally I choose SysMouse because that refers to the mouse configuration was we setup during the installation. No need in having it auto detect something that was setup already.
Click for a Screenshot If your mouse has a scroll wheel or three buttons, it is considered a three button mouse. If that's the case then choose no here; otherwise, choose yes.
Click for a Screenshot Just press enter for this screen to accept the default of /dev/sysmouse.
Click for a Screenshot If you have a standard sized keyboard that has a Windows key, then you have a 104-key keyboard. If it's a standard sized one without it then it's probably a 101-key keyboard. It will then ask you for a variant name. The default is just fine.
Click for a Screenshot Press enter here without specifying anything to scroll through the list of counties/languages. Once you find the one you want, enter the corresponding number.
Click for a Screenshot This is for managing keyboard layouts in X. We do not need to worry about this, so simply choose no here.
Click for a Screenshot Choose the mode you know your monitor is capable of handling (this is not the resolution you'll be using but rather the max the monitor can use). If you happen to have the specs handy for your monitor then it would be best to choose option 11 and enter in the info manually.

If you are not positive you can always choose the lowest common one and come back and change it later.
Click for a Screenshot This one is important to get correct. This will determine the acceptable range for the refresh rate of the scan lines (to reduce flicker) for the monitor. The numbers here are measured in Hertz. If you know that your monitor is capable of handling 100Hz at its highest resolution then choose 50-100 and so on. If you are not sure then stick with 50-70. You can always change this later, but the lower range the harder the display is on your eyes.
Click for a Screenshot This just asks for a label to identify the monitor configuration with. I chose to use the brand and model number for the monitor in question. Afterwards it will ask if you would like to view the video card database, choose yes.
Click for a Screenshot Once again you can press enter with no number to scroll through the list (it's a long one). If you do not see your video card, then and only then look for your chipset (different manufacturers will sometimes use the same chipset). More times than not, using one of these two methods will find you a working driver.

If you do not know this info for your video card than you can either read POST data, refer to the manual it came with, or pop up the case to your computer. You can always use a standard driver, but don't expect the best performance and colors from it.
Click for a Screenshot If you don't know how much video memory your video card has, watch the POST messages during bootstrap. Since this is in kilobytes, multiply however many megabytes it is by 1024 to arrive at the number to use.

For instance, if your video card has 128MB of video memory then 128 x 1024 = 131,072. So, you would want to choose option number 10.
Click for a Screenshot Again it just wants a label to identify the settings with. I usually let the default suffice on this one so it becomes easier for me to recall which driver I'm using should I ever need to reinstall. You will be asked to confirm your selection for safety's sake.
Click for a Screenshot If you are content with the available modes you see then choose 4. They are loosely based on settings provided already. However, feel free to enter any others you know your monitor can handle and/or you prefer working with.
Click for a Screenshot This is pretty much self-explanatory. If you want to err on the safe side until we get everything up and running, feel free. We can always change this value later.

After this you will be prompted that the program is about to write out the configuration file. Choose yes for the default location of /etc/X11/xorg.conf.

Ok, the good news is X is now configured. We can make minor tweaks later, but first let's get that graphical environment up and running.

KDE

Remember the client/server model we spoke for X? Well, to get the GUI we want, we need to install what's referred to as a window manager that runs as a client on top of X. For those familiar with Microsoft Windows, think of Windows 98. X would be analogous to DOS (handled the hardware interfacing, etc.) and a window manager would be like Windows that sat on top of DOS.

Some window managers are simple and some are complex. For this article, we will be using the K Desktop Environment (KDE). To install the latest version from the Internet you must be logged as root and specify the following command:

pkg_add -r kde

This step is the equivalent of installing Microsoft Windows, Microsoft Office, and Microsoft Visual Studio Professional over the Internet all into a one-stop shop. So, expect this to take a bit. But since it's all automated feel free to sit back and relax. If you start seeing messages saying failure and speaking of the file system, then you've probably ran out of disk space. You'll need to reinstall with a larger slice (partition) that is at least 5GB. Also if the screen goes blank, that's just the default screensaver for the console. Move your mouse to make it go away without interrupting the install.

When finished you'll be at a prompt again. You should logout as root at this point. Logging in as root should only be done when making system wide changes before you go into X - other than that just don't do it. In fact this will probably be the last time you ever log in as root directly again. To logout use the following command:

exit

Remember the additional user account we created during the installation? It's time to login to that account using whatever username and password you specified. It's the same exact process as before, just using a new name. Once in, the prompt will now appear different. This indicates you are no longer an administrator.

If you are new editing text in the Unix/Linux world then ee is your new best friend for console-based text editing. Its schematics are much more like working with Notepad than many of the other editors available. It's not as powerful as other editors, but it will do just fine to get things up and running. And now is the perfect time to use it because we need to alter a configuration file manually. Use the following command to get things going:

ee .xinitrc

Click for a Screenshot ee
Click for a Screenshot ee menu

You should be presented with a screen like the one shown by the first screenshot. Take note that the text at the top is a reference of control characters to perform various tasks. All that needs to be done is to simply type in exec startkde in all lowercase. Then press ESC on the keyboard to be shown a menu as depicted in the second screenshot. Use the arrows keys to select leave editor and enter. You will be asked to save the file. Select the save file option and press enter again. Next is the magic moment we've all been waiting for. Type in the following command at the prompt:

startx

This will start the X server and KDE. You will be presented with the following wizard the first time you start KDE.

Click for a Screenshot This one is plain and simple. Choose your country and language preference.
Click for a Screenshot I can guarantee you that if you're used to Windows as your only OS then you will want to set this to Microsoft Windows. Half the commands done with the keyboard and mouse are probably instinctive by now and doing this will help make the transition a bit easier.
Click for a Screenshot Needless to say, choose whatever you like and/or what your computer can handle. If you don't like animations stay on the low end. If you do, stay on the high end.
Click for a Screenshot This is mainly personal preference. But, if you want your environment to look like the screenshot at the very beginning of this article then choose Plastik.

By now you should have an up and running installation going. If you receive an error message about a sound driver there's a very good reason; we didn't set it up. Since this falls out of the scope of the article you can elect to not show the message again. You now have access to programs such as games, office applications, development IDE, web browser, and many utilities. It's important to take some time to play around bit to learn your way around.

Note: You can click on the K Menu (basically the Start Menu equivalent) and go to Control Center to configure the way KDE operates.

KDM - Login Manager

If you would like to boot directly into a graphical environment from here on out (recommended if you're new to Unix/Linux) there is a program called the KDE Display Manager (KDM) that will allow just that. It's quick to configure and once that's done you'll always end up with a GUI when the computer starts.

Click for a Screenshot Login Manager

To configure it, go to the K Menu » Control Center » System Administration » Login Manager. Refer to the screenshot to ensure you're in the correct spot. There's a Administrator Mode button at the bottom. Click it and you'll be prompted for the root password. Once through, everything is now enabled.

Click for a Screenshot Hidden Users

I'm only going to cover the important settings for security's sake. Everything else is up to your preference. Click on the Users tab at the top-right. In the left of this pane is a series of options called Users. As a security precaution remove the check that says "Show list". Just to make sure there is no misunderstandings, please refer to the screenshot.

Once this setting and whatever other preferences you have are satisfied, click OK to save it and close out everything. There's one more step to finalize this, so go ahead and log out of KDE (K Menu » Log Out). You should now be back at the command prompt.

To edit the file we need to we'll need administrator privileges, but we don't ever want to log in as root again. To solve this, type in the following command:

su root

The su stands for super user, basically the administrator. What we are accomplishing here is elevating our privileges for the normal user account. Of course, you have to provide the password for root and hit enter. Notice, once again you have a new prompt to indicate you are now working as admin. Thanks to this command you'll never need to log into root directly again. Now, type in the following command:

ee /etc/ttys

Click for a Screenshot ttys

Scroll down to line 44 that starts with "ttyv8" and make it look exactly as in shown in the screenshot (highlighted in yellow). Once this is done, press ESC to close out and save the file. When you are back at the command prompt, type in the following:

shutdown -r now

This will reboot the system. The next time FreeBSD starts; it will automatically enter the graphical environment. Lastly, I want to stress again that is not a good idea to log into KDE as root - ever. It is safer to login as yourself and su if needed.

Congratulations, you now have KDE and KDevelop up and running.