ONLamp.com    
 Published on ONLamp.com (http://www.onlamp.com/)
 See this if you're having trouble printing code examples


Using PC-BSD

by Dru Lavigne
05/11/2006

My next two articles will demonstrate the features of two desktop operating systems that are based on FreeBSD. Both PC-BSD and DestopBSD provide an easy to install and easy to use desktop environment suited for the corporate desktop user as well as the home user with no previous Unix experience. Today I'll concentrate on PC-BSD. My next article will focus on DesktopBSD.

While much of today's article will provide an introduction to what a novice BSD user can expect if they install PC-BSD, users already familiar with FreeBSD and the KDE desktop will still find some interesting features for dealing with ports, cvsup, and updates.

Getting and Installing PC-BSD

PC-BSD is available from the PC-BSD download page, from where you can download and then burn the ISO. Alternately, if you don't have access to a burner or wish to support the project, you can purchase a three-CD set for $35.

Hint: power users may enjoy downloading and trying the new PC-BSD vmware image, which is also available from the download site.

Once you have the CD, insert it into the CD drive as you start your computer. Most systems should already be configured to boot from CD, meaning the install program will automatically begin. The PC-BSD website has screenshots of everything you'll see during the install. (I've linked to them where appropriate.)

Some text messages will go by and then you'll see the PC-BSD splash screen with its bright yellow flowers. When you see the Installation menu, press enter to start the graphical install.

You'll have the option to choose your language and keyboard layout. Click the Start Installation button to proceed. You'll then see a welcome message. Press Next to continue.

The installer will then show you your hard drive(s) and ask you to select where to install PC-BSD. If you only have one hard drive and only want PC-BSD on your computer, click on the box that says "Use entire disk for UNIX" and then Next to continue. You'll receive a warning that all data currently on the disk will be lost. If you're OK with that, press OK.

The next screen will ask if you need a boot loader. If PC-BSD will be the only operating system on your computer, click the "No boot-loader" button, and then Next to continue. You can now watch as PC-BSD installs on your computer.

When it finishes, the installer will ask you to set the root (administrative) password and make a login account. Be careful when you pick your username, as it is case-sensitive. You may want to keep your username lowercase, and spell your full name correctly under Real Name, which is just a description. If you leave the "Auto-login User" box selected, the system will bring you right into the desktop without asking you to log in, which is convenient if you are the only user of a home system. If you share your computer with other users, deselect this box.

When you click Next, the system will set up your account, and then you'll receive a message indicating that the install is complete. Click Finish to reboot into the new system and don't forget to remove the CD once the reboot starts.

Becoming Familiar with the Desktop

The first time you reboot into PC-BSD, you should hear the KDE theme, if you have a working soundcard. Then you'll go through prompts to customize KDE. You'll also receive a KTip that gives tips on using KDE; if you prefer not to see these whenever you start your system, uncheck the "Show tips on startup" box.

Click on the FreeBSD logo (the red icon on the far left of the task bar) to access the KDE menu, which is somewhat like the Windows Start menu. Here you can Log Out, which allows you to End Current Session (log off), Turn Off Computer, Restart Computer, or Cancel if you've changed your mind. If you have a fairly recent computer, the Turn Off Computer option should do just that without you having to push the power button yourself.

The Lock Session button will save what you are doing and go into a locked screensaver. If you click your mouse button, you will see a password prompt to unlock the screensaver. This is a good option if you want to leave your computer and don't want anyone else using it or seeing what you were doing.

Run Command is similar to the Windows run command. If you already know the name of the command, you can type it in. If you click the Options button, you can also check the box for "Run as a different user," which is similar to the Windows runas command.

Accessing Media and Sharing Files

Next in the KDE menu system is the System menu, which provides a quick way to access your Home Folder, Storage Media, Remote Places (similar to My Network Places on Windows), Trash, and Users Folders.

Start with Storage Media. This will open up the Konqueror browser in a view that shows your CD-ROM, floppy, and hard disk. It will also show supported removable media such as USB thumb drives. By default, CDs should auto-mount when you insert them, meaning you can just double-click the CD-ROM icon to see its contents. When you finish, right-click the icon to Eject the CD. If you right-click the floppy icon, you'll see options to Format or Mount the floppy. The format utility can do a quick or full DOS format that Windows systems will understand. You can also choose to format with UFS, which only Unix systems will understand. If you do mount a floppy to view its contents, don't forget to right-click and Unmount it when you finish but before you physically eject the floppy. This lets the operating system know that you have finished using the floppy.

PC-BSD comes with a SMB client, which makes it easy to access shared folders on Windows systems, other PC-BSD systems, and any other Unix-like system that provides a SMB client. If you go into Remote Places and double-click Samba Shares, you should be able to see all of the aforementioned systems on your network. If you double-click a system, you should be able to access its shares. Note: XP systems running SP2 have a firewall automatically enabled, so you may have to (carefully) configure an XP system's firewall before you can access its shares inside your own network.

Here is an easy method to configure your own shares: from Remote Places, right-click the word Desktop that appears in the left-hand pane and select Create Folder. Select your new folder, and then right-click in the right pane and Create New -> Text File. Double-click the file to edit it and then save your changes. Now, right-click your folder and choose Properties -> Share and click the Configure File Sharing button. You must then type in the root password. (Note: whenever you're prompted for the root password, if you select the box "Keep password," you won't be prompted again the next time you run that specific utility.) If you keep the default of "Simple sharing," users can share any of their own files without knowing the root password.

Customizing Your Desktop

Next in the menu is the Settings section, which is similar to Windows Control Panel. If you plan on viewing or changing several settings, use Control Center, which provides an interface for each section in this menu. Alternately, you can navigate the Settings menu, which contains "Appearance & Themes," Desktop, "Internet & Network," KDE Components, Peripherals, "Regional & Accessibility," "Security & Privacy," "Sound & Multimedia" and System Administration. This is where you can customize your operating system to your tastes. I recommend you spend some time trying out all of the various options for yourself. There is a lot here, so you might want to try out a few things every time you use your computer.

Hint: if you like to use keyboard shortcuts, check out "Regional & Accessibility" -> Keyboard Shortcuts to view and change the default shortcuts.

The KDE menu also provides a quick way to access Home (Personal Files), the KDE Help system, the Find Files/Folders utility, and the Control Center.

KDE Programs is similar to the Windows Programs menu. Here you will find all of the KDE applications categorized into Games, Graphics, Internet, Multimedia, Office, Settings, System, and Utilities. Again, there is a lot here, so make a point to discover at least one new utility whenever you use your computer.

The final option on the KDE menu is unique to PC-BSD: Computer. It provides another way to access your Drives and the Local Network. There is also the PC-BSD Settings menu, where you can Add User, configure your Display, configure your Keyboard, and configure your Mouse, as well as access Network Manager, Online Update, PBI Update Check, Printer Manager, Remove Programs, Sound Mixer, and System.

Network Manager is similar to Windows Network Connections as it allows you to view your network adapters and modify their TCP/IP settings. I want to spend some more time on a few of the other menu items.

Hint: if you use your numlock key, go into the Keyboard menu and select "Turn on" under the "NumLock on KDE Startup" section.

The System Menu

System is somewhat like the Windows System icon, but with a BSD twist. The General tab indicates both the version of PC-BSD and the FreeBSD version it is based upon. For example, mine says:

PC-BSD Version: 1.0rc2
Base Version: 6.0-RELEASE-p3

The -p3 indicates it is FreeBSD 6.0 at the third patch level.

This tab also contains a Generate button, which is a very convenient way to generate a diagnostics report. More advanced users will appreciate having /var/run/dmesg.boot, dmesg, /etc/rc.conf, /boot/loader.conf, df, and ps in one written report. Less advanced users can send a generated report to their nearest guru or support person.

The Kernel tab allows you to select from a single processor or multi-processor kernel. It also provides check boxes to enable a splash screen or ATAPI DMA Mode. You can also select the boot delay number of seconds in this tab.

The Services tab allows you to select whether to start the SSH, NFS, Samba, and CUPS daemons at boot time.

The Tasks menu is the real jewel of this utility (see Figure 1). Click on Fetch System Source to connect to a cvsup server and fetch src. Note that this will take a while the first time you run it, as you'll be downloading over 400MB of src. However, subsequent cvsup runs will go quickly, as the utility needs to download only the src that has changed since your last fetch. Power users who wish to modify the default cvs-supfile will find it in /root/standard-supfile.

the Tasks menu
Figure 1. The Tasks menu

The Tasks tab also contains a button to Fetch Ports using portsnap. The first time you run this utility, be patient, as it will take a while to download and extract the entire ports tree. Even if it seems nothing is happening for a very long time, it is working--simply go do something else until it says it is finished. The next time you run this utility, it will be very quick, as it needs to download only the changes to the ports collection.

Adding and Removing Programs

On a PC-BSD system, there are three built-in mechanisms for installing software. You can use the ports collection, meaning you cd into the desired ports subdirectory and type make install clean. You can also use the packages collection, meaning you type pkg_add -r name_of_package.

The easiest way for new users to install software is to download a PBI to the Desktop, and double-click the PBI to start its installer. The PC-BSD site has plenty of PBI screenshots.

The advantage to PBI is that the installer offers to create shortcuts both on the Desktop and in the Programs menu of the KDE menu. This makes it easy to find your applications and remember which applications you have installed.

PBIs also come with their own de-installers, in Computer -> PC-BSD Settings -> Remove Programs. Simply highlight the desired program and click the Remove button. Note: this will not work for programs installed through the ports or packages collections; for these, you need to type pkg_delete -x name_of_program.

Keeping Up To Date

The Online Update in Computer -> PC-BSD Settings is one of the slickest utilities that comes with this operating system (Figure 2). Similar to Windows Update, it can check your operating system and programs for both security vulnerabilities and new features. Once instructed to do so, it will download and apply any missing patches for you. You can also use this utility to safely upgrade your operating system when a new version becomes available.

Online Update
Figure 2. Online Update

If you select "Check for updates," you have the option to automatically schedule the process on a daily or weekly basis.

If you prefer to manually watch the process, instead click the Check Now button. When I tested my version of PC-BSD, it was only nine days old, so I received a "Your system is up-to-date" message. However, when I tried this on an older version back in November, I saw Figure 3. By highlighting one of the entries and clicking on the "More info" button, I was able to get more detailed information about a given feature or security vulnerability. When I clicked Next, the patches were applied.

Update Now
Figure 3. Update Now!

Note that patches that affect the kernel will require a reboot. The computer will automatically do this for you.

Configuring Flash and Java

For novice users, there are currently three available web browsers: Konqueror, which comes installed with KDE, and Firefox and Opera, which are available for download from the PBI directory.

To install browser Java support, download and run the PBI for the Java Runtime (you can find this easily if you search the PBI directory for "java"). During installation, you will be prompted to accept the Sun licensing agreement. Once installed, you can verify Java support in Konqueror or Firefox by typing about:plugins into the Location bar. In Opera, type opera:about.

Note: at the time of this writing, there is a bug that prevents Firefox from correctly seeing Java support. Hopefully it has been corrected by the time you read this.

Hint: a good site to test your browser is www.privacy.net. Click on the hyperlink for Analyzer at the bottom of the page.

To install Flash support, download the Flash plugin. If Flash doesn't immediately show up in Konqueror when you type "about:plugins," go to Settings -> Configure Konqueror -> Plugins. Click on the "Scan for New Plugins" button and it will enable Flash support.

For Firefox, go to Programs Menu -> Firefox -> Install Flash Plugin, which will prompt you for the root password. When finished, Flash support will now show in about:plugins.

For Opera, simply download the PBI for "Opera with Flash" and enjoy.

Conclusion

If you haven't had a chance to try out PC-BSD, take some time to install and poke about this user-friendly operating system. If you're looking for a free and stable operating system for friends or family, burn them an ISO and have them give it a test drive.

The PC-BSD engineering team appreciates all feedback and suggestions for improving the operating system from a user perspective. The email address for the project lead is available from the PC-BSD contact page. Don't be surprised if you see one of your feature requests implemented in a later version of PC-BSD.

Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.


Return to the BSD DevCenter.

Copyright © 2009 O'Reilly Media, Inc.