text:
Difference between revisions of "Flat html"
Tigersharke (Talk | contribs) |
Tigersharke (Talk | contribs) |
Line 13: | Line 13: | ||
---- | ---- | ||
{{:Preface}} <!-- This is done in order to prevent inclusion within 'contents' and cause Introduction to be numbered 1 --> | {{:Preface}} <!-- This is done in order to prevent inclusion within 'contents' and cause Introduction to be numbered 1 --> | ||
− | {{flatten|Introduction}} | + | {{flatten|1.|title=Introduction}} |
− | {{flatten|Goals and Features}} | + | {{flatten|1.1|title=Goals and Features}} |
− | {{flatten|What's New in 9.2}} | + | {{flatten|1.2|title=What's New in 9.2}} |
− | {{flatten|PC-BSD® Releases}} | + | {{flatten|1.3|title=PC-BSD® Releases}} |
− | {{flatten|PC-BSD® for Linux Users}} | + | {{flatten|1.4|title=PC-BSD® for Linux Users}} |
− | {{flatten|Pre-Installation Tasks}} | + | {{flatten|2.|title=Pre-Installation Tasks}} |
− | {{flatten|Hardware Requirements}} | + | {{flatten|2.1|title=Hardware Requirements}} |
− | {{flatten|Laptops}} | + | {{flatten|2.2|title=Laptops}} |
− | {{flatten|Partitioning the Hard Drive}} | + | {{flatten|2.3|title=Partitioning the Hard Drive}} |
− | {{flatten|Obtaining PC-BSD®}} | + | {{flatten|2.4|title=Obtaining PC-BSD®}} |
− | {{flatten|Burning the Installation Media}} | + | {{flatten|2.5|title=Burning the Installation Media}} |
− | {{flatten|PC-BSD® Live Mode}} | + | {{flatten|2.6|title=PC-BSD® Live Mode}} |
− | {{flatten|Using VirtualBox}} | + | {{flatten|2.7|title=Using VirtualBox}} |
− | {{flatten|Installing PC-BSD®}} | + | {{flatten|3.|title=Installing PC-BSD®}} |
− | {{flatten|Starting the PC-BSD® Installation}} | + | {{flatten|3.1|title=Starting the PC-BSD® Installation}} |
− | {{flatten|Language Selection Screen}} | + | {{flatten|3.2|title=Language Selection Screen}} |
− | {{flatten|System Selection Screen}} | + | {{flatten|3.3|title=System Selection Screen}} |
− | {{flatten|Disk Selection Screen}} | + | {{flatten|3.4|title=Disk Selection Screen}} |
− | {{flatten|Installation Progress Screen}} | + | {{flatten|3.5|title=Installation Progress Screen}} |
− | {{flatten|Installation Finished Screen}} | + | {{flatten|3.6|title=Installation Finished Screen}} |
− | {{flatten|Post Installation Configuration and Installation Troubleshooting}} | + | {{flatten|4.|title=Post Installation Configuration and Installation Troubleshooting}} |
− | {{flatten|Booting Into PC-BSD®}} | + | {{flatten|4.1|title=Booting Into PC-BSD®}} |
− | {{flatten|Language Screen}} | + | {{flatten|4.2|title=Language Screen}} |
− | {{flatten|Time Zone Selection Screen}} | + | {{flatten|4.3|title=Time Zone Selection Screen}} |
− | {{flatten|Set Root Password Screen}} | + | {{flatten|4.4|title=Set Root Password Screen}} |
− | {{flatten|Create a User Screen}} | + | {{flatten|4.5|title=Create a User Screen}} |
− | {{flatten|Connect to a Wireless Network}} | + | {{flatten|4.6|title=Connect to a Wireless Network}} |
− | {{flatten|Post Install Finished Screen}} | + | {{flatten|4.7|title=Post Install Finished Screen}} |
− | {{flatten|Logging In}} | + | {{flatten|4.8|title=Logging In}} |
− | {{flatten|Installation Troubleshooting}} | + | {{flatten|4.9|title=Installation Troubleshooting}} |
− | {{flatten|Advanced Installation Topics}} | + | {{flatten|5.|title=Advanced Installation Topics}} |
− | {{flatten|Install a Server}} | + | {{flatten|5.1|title=Install a Server}} |
− | {{flatten|Dual Booting}} | + | {{flatten|5.2|title=Dual Booting}} |
− | {{flatten|Multiple Boot Environments}} | + | {{flatten|5.3|title=Multiple Boot Environments}} |
− | {{flatten|Upgrading PC-BSD®}} | + | {{flatten|5.4|title=Upgrading PC-BSD®}} |
− | {{flatten|Creating an Automated Installation with pc-sysinstall}} | + | {{flatten|5.5|title=Creating an Automated Installation with pc-sysinstall}} |
− | {{flatten|Desktops}} | + | {{flatten|6.|title=Desktops}} |
− | {{flatten|GNOME2}}<!-- First are the 'supported' desktops --> | + | {{flatten|6.1|title=GNOME2}}<!-- First are the 'supported' desktops --> |
− | {{flatten|KDE4}} | + | {{flatten|6.2|title=KDE4}} |
− | {{flatten|LXDE}} | + | {{flatten|6.3|title=LXDE}} |
− | {{flatten|XFCE4}} | + | {{flatten|6.4|title=XFCE4}} |
− | {{flatten|Awesome}}<!-- Next are the 'unsupported' desktops --> | + | {{flatten|6.5|title=Awesome}}<!-- Next are the 'unsupported' desktops --> |
− | {{flatten|Enlightenment}} | + | {{flatten|6.6|title=Enlightenment}} |
− | {{flatten|evilwm}} | + | {{flatten|6.7|title=evilwm}} |
− | {{flatten|Fluxbox}} | + | {{flatten|6.8|title=Fluxbox}} |
− | {{flatten|FVWM}} | + | {{flatten|6.9|title=FVWM}} |
− | {{flatten|i3}} | + | {{flatten|6.10|title=i3}} |
− | {{flatten|IceWM}} | + | {{flatten|6.11|title=IceWM}} |
− | {{flatten|Openbox}} | + | {{flatten|6.12|title=Openbox}} |
− | {{flatten|Ratpoison}} | + | {{flatten|6.13|title=Ratpoison}} |
− | {{flatten|spectrwm}} | + | {{flatten|6.14|title=spectrwm}} |
− | {{flatten|WindowLab}} | + | {{flatten|6.15|title=WindowLab}} |
− | {{flatten|Window Maker}} | + | {{flatten|6.16|title=Window Maker}} |
− | {{flatten|Installing Applications and Keeping PC-BSD® Updated}} | + | {{flatten|7.|title=Installing Applications and Keeping PC-BSD® Updated}} |
− | {{flatten|Using AppCafe®}} | + | {{flatten|7.1|title=Using AppCafe®}} |
− | {{flatten|PBI Manager}} | + | {{flatten|7.2|title=PBI Manager}} |
− | {{flatten|Update Manager}} | + | {{flatten|7.3|title=Update Manager}} |
− | {{flatten|Meta Package Manager}} | + | {{flatten|7.4|title=Meta Package Manager}} |
− | {{flatten|Create Your Own PBI Repository}} | + | {{flatten|7.5|title=Create Your Own PBI Repository}} |
− | {{flatten|Control Panel}}<!-- This section follows the order the items are listed in the control panel --> | + | {{flatten|8.|title=Control Panel}}<!-- This section follows the order the items are listed in the control panel --> |
− | {{flatten|EasyPBI}} | + | {{flatten|8.1|title=EasyPBI}} |
− | {{flatten|About}} | + | {{flatten|8.2|title=About}} |
− | {{flatten|Active Directory & LDAP}} | + | {{flatten|8.3|title=Active Directory & LDAP}} |
− | {{flatten|Hardware Compatibility}} | + | {{flatten|8.4|title=Hardware Compatibility}} |
− | {{flatten|GDM Configuration}} | + | {{flatten|8.5|title=GDM Configuration}} |
− | {{flatten|Service Manager}} | + | {{flatten|8.6|title=Service Manager}} |
− | {{flatten|System Manager}} | + | {{flatten|8.7|title=System Manager}} |
− | {{flatten|User Manager}} | + | {{flatten|8.8|title=User Manager}} |
− | {{flatten|Bluetooth Manager}} | + | {{flatten|8.9|title=Bluetooth Manager}} |
− | {{flatten|Mount Tray}} | + | {{flatten|8.10|title=Mount Tray}} |
− | {{flatten|Sound Configuration}} | + | {{flatten|8.11|title=Sound Configuration}} |
− | {{flatten|Display}} | + | {{flatten|8.12|title=Display}} |
− | {{flatten|Printing}} | + | {{flatten|8.13|title=Printing}} |
− | {{flatten|Scanner}} | + | {{flatten|8.14|title=Scanner}} |
− | {{flatten|Network Configuration}} | + | {{flatten|8.15|title=Network Configuration}} |
− | {{flatten|Firewall Manager}} | + | {{flatten|8.16|title=Firewall Manager}} |
− | {{flatten|Life Preserver}} | + | {{flatten|8.17|title=Life Preserver}} |
− | {{flatten|Adobe Flash Player preferences}} | + | {{flatten|8.18|title=Adobe Flash Player preferences}} |
− | {{flatten|Warden®}}<!-- End control panel section - special item order --> | + | {{flatten|8.19|title=Warden®}}<!-- End control panel section - special item order --> |
− | {{flatten|Using PC-BSD®}} | + | {{flatten|9.|title=Using PC-BSD®}} |
− | {{flatten|Java, Flash, and Fonts}} | + | {{flatten|9.1|title=Java, Flash, and Fonts}} |
− | {{flatten|Multimedia}} | + | {{flatten|9.2|title=Multimedia}} |
− | {{flatten|Files and File Sharing}} | + | {{flatten|9.3|title=Files and File Sharing}} |
− | {{flatten|MythTV}} | + | {{flatten|9.4|title=MythTV}} |
− | {{flatten|XBMC}} | + | {{flatten|9.5|title=XBMC}} |
− | {{flatten|Windows Emulation}} | + | {{flatten|9.6|title=Windows Emulation}} |
− | {{flatten|Remote Desktop}} | + | {{flatten|9.7|title=Remote Desktop}} |
− | {{flatten|Thin Client}} | + | {{flatten|9.8|title=Thin Client}} |
− | {{flatten|ownCloud}} | + | {{flatten|9.9|title=ownCloud}} |
− | {{flatten|Security}} | + | {{flatten|9.10|title=Security}} |
− | {{flatten|Accessibility}} | + | {{flatten|9.11|title=Accessibility}} |
− | {{flatten|Finding Help}} | + | {{flatten|10.|title=Finding Help}} |
− | {{flatten|PC-BSD® Forums}} | + | {{flatten|10.1|title=PC-BSD® Forums}} |
− | {{flatten|IRC Channel}} | + | {{flatten|10.2|title=IRC Channel}} |
− | {{flatten|Mailing Lists}} | + | {{flatten|10.3|title=Mailing Lists}} |
− | {{flatten|FreeBSD Handbook and FAQ}} | + | {{flatten|10.4|title=FreeBSD Handbook and FAQ}} |
− | {{flatten|Social Media}} | + | {{flatten|10.5|title=Social Media}} |
− | {{flatten|Search and Portals}} | + | {{flatten|10.6|title=Search and Portals}} |
− | {{flatten|Other Resources}} | + | {{flatten|10.7|title=Other Resources}} |
− | {{flatten|Supporting PC-BSD®}} | + | {{flatten|11.|title=Supporting PC-BSD®}} |
− | {{flatten|Become a Beta Tester}} | + | {{flatten|11.1|title=Become a Beta Tester}} |
− | {{flatten|Become a Translator}} | + | {{flatten|11.2|title=Become a Translator}} |
− | {{flatten|Become a Developer}} | + | {{flatten|11.3|title=Become a Developer}} |
− | {{flatten|Report Bugs}} | + | {{flatten|11.4|title=Report Bugs}} |
− | {{flatten|Submit PBI Requests}} | + | {{flatten|11.5|title=Submit PBI Requests}} |
− | {{flatten|Test PBIs}} | + | {{flatten|11.6|title=Test PBIs}} |
− | {{flatten|PBI Module Builder Guide| | + | {{flatten|11.7|title=PBI Module Builder Guide|alt=Create PBIs}} |
− | + | {{flatten|11.8|title=Purchase PC-BSD® Swag}} | |
− | {{flatten|Purchase PC-BSD® Swag}} | + | {{flatten|11.9|title=Host a Mirror}} |
− | {{flatten|Host a Mirror}} | + | {{flatten|11.10|title=Seed a Torrent}} |
− | {{flatten|Seed a Torrent}} | + | {{flatten|11.11|title=Become an Advocate}} |
− | {{flatten|Become an Advocate}} | + | |
{{refheading}} <!-- This can be swapped for <references/> if necessary --> | {{refheading}} <!-- This can be swapped for <references/> if necessary --> | ||
{{GroupListHeading|group=tables}} | {{GroupListHeading|group=tables}} |
Revision as of 04:45, 19 February 2013
written by users of the PC-BSD® operating system. Version 9.1 Published 30 Nov 2012 Copyright © 2005-2013, The PC-BSD® Project. Welcome to PC-BSD®! This Handbook covers the installation and use of PC-BSD® 9.1. This Handbook is a work in progress and relies on the contributions of many individuals. If you are interested in assisting with the Handbook, visit http://wiki.pcbsd.org and create a login account for yourself. If you use IRC Freenode, you are welcome to join the #pcbsd channel where you will find other PC-BSD® users. Previous versions of the Handbook in various formats and languages are available from ftp://ftp.pcbsd.org/pub/handbook/. Errata may be found at http://wiki.pcbsd.org/index.php/Errata. The PC-BSD® Users Handbook is freely available for sharing and redistribution under the terms of the Creative Commons Attribution License[1]. This means that you have permission to copy, distribute, translate, and adapt the work as long as you attribute the PC-BSD® Project as the original source of the Handbook. PC-BSD® and the PC-BSD® logo are registered trademarks of iXsystems[2]. If you wish to use the PC-BSD® logo in your own works, ask for permission first from marketing at ixsystems dot com.
AMD is a trademark of Advanced Micro Devices, Inc. Apache is a trademark of The Apache Software Foundation. AppCafe® is a registered trademark of iXsystems. Asus® and Eee PC® are registered trademarks of ASUSTeK® Computer Inc. Facebook® is a registered trademark of Facebook Inc. Flash® is a registered trademark of Adobe Systems Incorporated in the United States and/or other countries. FreeBSD® is a registered trademark of the FreeBSD Foundation[3]. FreeNAS® is a registered trademark of iXsystems. IBM® is a registered trademark of International Business Machines Corporation. Intel, the Intel logo, Pentium Inside, and Pentium are trademarks of Intel Corporation in the U.S. and/or other countries. Java™ is a trademark of Oracle America and/or its affiliates in the United States and other countries. Lenovo® is a registered trademark of Lenovo. LinkedIn® is a registered trademark of LinkedIn Corporation. Linux® is a registered trademark of Linus Torvalds. Mac and Mac OS are trademarks of Apple Inc., registered in the U.S. and other countries. MacBook® is a registered trademark of Apple Inc. MySQL is a trademark of Oracle. NVIDIA® is a trademark and/or registered trademark of NVIDIA Corporation in the U.S. and other countries. PostgreSQL® is a registered trademark of the PostgreSQL Global Development Group. ThinkPad® is a registered trademark of Lenovo. TrueOS® is a registered trademark of iXsystems. Twitter is a trademark of Twitter, Inc. in the United States and other countries. UNIX® is a registered trademark of The Open Group. VirtualBox® is a registered trademark of Oracle. VMWare® is a registered trademark of VMWare, Inc. Warden® is a registered trademark of iXsystems. Windows® is a registered trademark of Microsoft Corporation in the United States and other countries.
The PC-BSD® 9.1 Handbook uses the following typographic conventions: bold text: represents a command written at the command line. In usage examples, the font is changed to Courier 10 with any command output displayed in unbolded text. italic text: used to represent device names or file name paths. bold italic text: used to emphasize an important point.
IntroductionWelcome to PC-BSD®! PC-BSD®[4] began in 2005 when Kris Moore presented the first beta version of a FreeBSD[5] operating system pre-configured for desktop use. Since then, PC-BSD® has matured into a polished, feature-rich, free-of-charge, open source operating system that meets the desktop needs of the beginner to the advanced user alike. PC-BSD® is essentially a customized installation of FreeBSD, not a forked derivative. Since the underlying FreeBSD system has been kept intact, you have a fully functional FreeBSD system under the hood. PC-BSD® provides a graphical installer, a graphical package management system, and dozens of graphical utilities that make PC-BSD® suitable for desktop use. As a user of PC-BSD®, you don't have to worry about configuring a FreeBSD system for desktop use; instead you can simply install and start using it. The main difference between PC-BSD® and FreeBSD is that PC-BSD® is geared towards desktop use, while FreeBSD has been created with server use in mind. Other differences include:
PC-BSD® started off as an independent project, but since October, 2006 PC-BSD® is (financially) backed and supported by the enterprise-class hardware solutions provider iXsystems[6]. The rest of this section discusses:
Goals and FeaturesDesigned with the desktop computer user in mind, PC-BSD® provides the following features:
What's New in 9.2The following features have been added to or improved for PC-BSD® 9.2: (For temporary continuity What's New in 9.1)
PC-BSD® ReleasesAs of September 2008, PC-BSD® release version numbers are the same as those for FreeBSD. When the first number of a release is followed by a zero (e.g. version 9.0), this means that this version of PC-BSD® introduces many new features. When the second number of a release is not a zero (e.g. version 9.1), this means that the new version may have some new features, but it mostly fixes known software problems and security vulnerabilities. If a release includes the letters RC, this means that it is a "Release Candidate", or that the developers are still adding and fixing features and need testers to help them find any existing problems in preparation for the upcoming release. If the release includes the word BETA, it means that that version is still buggy and needs the help of testers to find as many problems as possible so that they can be fixed.
PC-BSD® releases follow the same EoL (end of life) schedule[13] as the underlying FreeBSD release. Any security patches for a supported release will appear in Update Manager, making it easy to keep your PC-BSD® system fully patched against known security vulnerabilities.
PC-BSD® for Linux UsersPC-BSD® is based on BSD Unix[14], meaning that it is not a Linux distribution. If you have used Linux before, you will find that some features that you are used to have different names on a BSD system and that some commands are different. This section covers some of these differences. FilesystemsBSD and Linux use different filesystems during installation. Many Linux distros use EXT2, EXT3, EXT4, or ReiserFS, while PC-BSD® uses UFS or ZFS. This means that if you wish to dual-boot with Linux or access data on an external drive that has been formatted with another filesystem, you will want to do a bit of research first to see if the data will be accessible to both operating systems. Table 1.4a summarizes the various filesystems commonly used by desktop systems. Most of the desktop managers available from PC-BSD® should automatically mount the following filesystems: FAT16, FAT32, EXT2, EXT3 (without journaling), EXT4 (read-only), NTFS5, NTFS6, and XFS. See the section on Files and File Sharing for more information about available file manager utilities.
Device NamesLinux and BSD use different naming conventions for devices. For example:
Feature NamesSome of the features used by BSD have similar counterparts to Linux, but the name of the feature is different. Table 1.4b provides some common examples:
CommandsIf you are comfortable with the command line, you may find that some of the commands that you are used to have different names on BSD. Table 1.4c lists some common commands and what they are used for.
File formats, size and updatesA common complaint is that the size of PC-BSD® PBI files are much larger than the actual program. What complaints of this sort often do not recognize is that very few installable applications are complete by themselves. If you take a look at what happens while the program is being compiled, or when you install a package, you will notice that there are additional applications being pulled in or downloaded and installed. These are all dependencies: things that the program will require in order to fully function. An application of any complexity, especially if it is desktop-oriented, is likely to depend upon many programs. These programs may relate to audio or video playback, window management, or libraries for encoding, compression, encryption. A PBI file consists of the primary application, determined by its name, along with all of its dependencies. When you add a program with AppCafe®, you download the application and dependency bundle that we call a PBI. The first set of dependencies may be reused by other applications that you install later; however, every PBI file contains all the necessary dependencies, even if those that would be redundant are not installed. Additional ResourcesThe following articles and videos provide additional information about some of the differences between BSD and Linux:
Pre-Installation TasksWhile the PC-BSD® installer is very easy to use, installing a brand new operating system can sometimes be a daunting task. Before you begin, there are a few things you should check to ensure that your system is ready to install PC-BSD®.
If you would like to try out PC-BSD® without committing to an install, try PC-BSD® Live Mode first. This is an excellent way to determine if your hardware will work with PC-BSD®. Should you run into an issue with your installation there are many different ways to get help. This section discusses the following topics:
Hardware RequirementsPC-BSD® has moderate hardware requirements and commonly uses less resources than its commercial counterparts. Before installing PC-BSD®, make sure that your hardware or virtual machine at least meets the minimum requirements. To get the most out of your PC-BSD® experience, refer to the recommended system requirements. Minimum System RequirementsAt a bare minimum, you need to meet these requirements in order to install PC-BSD®:
Recommended System RequirementsThe following are the minimum recommended requirements. The more RAM and available disk space, the better your computing experience:
The PC-BSD installer's hardware check will display a warning message if the selected partition contains less than 20GB for a server installation or less than 50GB for a desktop installation. You can never have too much RAM, so install as much as you can afford. To play modern video games, you should use a fast CPU. If you want to create a collection of tunes and movies on your computer, you will want a large hard disk drive which can be internal or external. Supported ProcessorsPC-BSD® should install on any system containing a 32-bit (also called i386) or 64-bit (also called amd64) processor. Despite the amd64 name, a 64-bit processor does not need to be manufactured by AMD in order to be supported. The FreeBSD Hardware Notes[30] list the i386 and amd64 processors known to work. Supported Video CardsLike most open source operating systems, PC-BSD® uses X.org drivers for graphics support. PC-BSD® will automatically detect the optimal video settings for supported video drivers. You can verify that your graphics hardware is supported by clicking the Hardware Compatibility icon within the installer or by accessing this utility from Control Panel when using Live Mode. If this utility shows your video as VESA on a 32-bit system with an older NVIDIA card, you must install and use the legacy driver as described below. Support for the major graphic vendors is as follows: NVIDIA: if you want to use 3D acceleration, NVIDIA is currently the best supported as there is a native driver for PC-BSD®. If an NVIDIA video card is detected, an "nVidia settings" icon will be added to the Control Panel for managing NVIDIA settings. Some older NVIDIA cards on 32-bit systems require an older NVIDIA driver. If you suspect you have one of these cards, select the Hardware-Drivers ➜ NVIDIA-Legacy drivers during installation or afterwards using control panel ➜ System Manager. Intel: as of 9.1, 3D acceleration on most Intel graphics is supported. Due to the current KMS support, you will not be able to switch between the graphical console and a virtual console using Crtl+Alt+F#. ATI/Radeon: 3D acceleration will not work on ATI or Radeon cards until FreeBSD completes its TTM work (possibly in time for 9.2). You can still use these cards, but you will have to choose the 2D driver, and if that does not work, you will need to resort to using the Vesa driver. Optimus: at this time Bumblebee[31] has not been ported to FreeBSD, meaning that there is no switching support between the two graphics adapters provided by Optimus. Optimus implementations vary, so PC-BSD® may or may not be able to successfully load a graphics driver on your hardware. If you get a blank screen after installation, check your BIOS to see if it has an option to disable one of the graphics adapters or to set "discrete" mode. If the BIOS does not provide a discrete mode, PC-BSD® will default to the 3D Intel driver and disable NVIDIA. This will change in the future when the NVIDIA driver supports Optimus. Wireless CardsPC-BSD® has built-in support for dozens of wireless networking cards. You can check if your card has a FreeBSD driver[32]. If it does, it should "just work". PC-BSD® will automatically detect available wireless networks for supported wireless devices. You can verify that your device is supported by clicking the Hardware Compatibility icon within the installer or by accessing this utility from Control Panel when using Live Mode. If it an external wireless device, insert it before running the Hardware Compatibility utility. If your device is not detected, the Wireless Testing page has some information about drivers which have not been ported yet. It also contains instructions for converting a Microsoft driver to a FreeBSD kernel module, though results will vary by driver. Known missing wireless drivers are typically for the Broadcom and newer Realtek series of cards. Certain Broadcom devices, typically found in cheap laptops, are quite buggy and can have lockups when in DMA mode. If the device freezes, try switching to PIO mode in the BIOS. Alternately, add the line hw.bwn.usedma=0 to /boot/loader.conf and reboot to see if that makes a difference. Checking Hardware CompatibilityIf you wish to check your hardware before installing PC-BSD®, a good place to start is the FreeBSD 9.1 Hardware Notes[33]. Another good resource is to run PC-BSD® in Live Mode; that way you can test your various devices before committing to an install. While most hardware "just works" with PC-BSD®, it is possible that you will run across a piece of hardware that does not. If you do, you can help improve hardware support for all PC-BSD® users by reporting the problem so that it can be addressed by the developers. It should be remembered that PC-BSD® is really FreeBSD, meaning that any hardware that works on FreeBSD will work on PC-BSD®.
LaptopsMany PC-BSD® users successfully run PC-BSD® on their laptops. To determine if the hardware on your laptop is supported, search the FreeBSD Laptop Compatibility List[34]. Consider adding to this list if your model is not listed or the information for your model is out-of-date. Depending upon the model of laptop, you may run across some issues. These typically deal with:
If you wish to test your laptop's hardware, consider using PC-BSD® Live Mode before committing to an installation. If you would like to install PC-BSD® onto an Asus Eee, read the FreeBSD Eee page[43] first. The FreeBSD Tuning Power Consumption page[44] has some tips for reducing power consumption. ThinkPads with Known BugsThe ThinkPad T420 may panic during install. If it does, go into the BIOS and set the video mode to "discrete" which should allow you to complete an installation. Some Thinkpads have a BIOS bug that prevents them from booting from GPT labelled disks. If you are unable to boot into a new installation, restart the installer and go into Advanced Mode in the Disk Selection Screen. Make sure that the "Partition disk with GPT" box is unchecked. If it was checked previously, redo the installation with the box unchecked. If you wish to install PC-BSD® on an older IBM/Lenovo ThinkPad laptop, it is important to first check your ThinkPad model number to see if its BIOS has a known bug. This bug is rather nasty and will render the computer completely unbootable--even the BIOS will be inaccessible. This situation occurs as the BIOS thinks that the PC-BSD® (FreeBSD) partition number represents the IBM repair partition. The only way to get the affected laptop to boot again is to physically remove the hard drive, insert it into another laptop, wipe the drive, and insert the drive back into the system. While the hard drive is in the other system, you will note that PC-BSD® boots just fine as the problem is with the BIOS, not the hard drive. Once the BIOS is accessible again, you should upgrade (or possibly downgrade) the BIOS to a version number that fixes this bug. See Table 2.2a for the models which are affected, the BIOS version number that fixes the bug, and links to the BIOS software should you need to upgrade your BIOS. The BIOS needs to incorporate the fix "The system cannot boot from a hard disk drive with partition ID of n5h where n is 1 or greater".
Acer Laptops with Known BugIn models 2920z and 4920G, there is an issue with the BIOS settings for the HPET timer. The solution is to set a hardware hint[53]. Boot the installation media and select "7. Escape to the loader prompt" when you see the menu shown in Figure 2.2a. At the resulting prompt, type:
You should now be able to install PC-BSD®. Once the installer boots for the first time, you will need to repeat that command in order to boot into PC-BSD®. Once you are in PC-BSD®, you can make the hint permanent by carefully adding this line to /boot/loader.conf as the superuser:
MacBooksBefore starting, you should review the MacBook on FreeBSD Wiki[54]. Starting in PC-BSD® 9.0-RC1, support has been added for installing directly to Mac OS X BootCamp partitions. First, you can install an OS X boot manager, such as rEFIt[55]. This step is optional as it requires either a dedicated partition or it installs into your OS X partition and takes over the boot process. Next you will need to make some free space to install into. You can use the MacBook's Boot Camp[56] utility to make a primary partition of at least 25 GB in size. After creating the BootCamp partition, boot from the PC-BSD® install media and proceed with a normal installation. When you get to the "Disk Selection" screen, be sure to select the ada0p3: linux-data partition for installation. After installation, reboot and select BSD from the rEFIt (or an alternate) boot menu to boot into the new PC-BSD® installation. Touch ScreensStarting in PC-BSD® 9.0, automatic detection of USB-based touch screen devices has been added. During the display wizard phase, if your touch-screen is auto-detected, the necessary flags will be added to /etc/X11/xorg.conf automatically. If your display is USB and is NOT auto-detected, please send the output of usbconfig and your /etc/X11/xorg.conf file to the PC-BSD® testing mailing list[57].
Partitioning the Hard DrivePC-BSD® does not include its own built-in partition manager.
Shrinking a Drive in Windows 7If you are currently running Windows 7, it is using the entire hard drive. This means that you will need to first shrink the drive in order to make room to create a new partition. Shrinking is an operation that retains the current data on the partition, while reducing the size of the partition. To shrink the drive, go to Start menu ➜ right-click Computer ➜ Manage ➜ Storage ➜ Disk Management. Figure 2.3a shows an example of a system running Windows 7. In this example, Windows has created three partitions: a 16GB recovery partition, a 100MB system partition, and a 450GB data partition.
Since the three Windows partitions are using the entire disk, the data partition needs to be shrunk in order to create space to install PC-BSD® into. To shrink the data partition, right-click the partition, in this example it is called Acer (C:), and select "Shrink Volume". Wait a moment as it queries the volume for available shrink space; the results will be displayed as seen in the example in Figure 2.3b. In this example, 321089MB of space is available. To divide the partition between Windows and PC-BSD®, change that number to 230000 and click the "Shrink" button. When finished, the newly created free space will be displayed, as seen in Figure 2.3c. You can now format the newly created free space using a utility such as Parted Magic, as described in the next section.
Using Parted Magic to Create a Primary PartitionParted Magic[58] is a graphical, easy-to-use partition editor that is packaged on a live CD. It can be used to shrink an existing partition and to create a primary partition from existing free space. To use Parted Magic, download the latest .iso.zip file, unzip it, and burn it to CD. Boot the system with the CD and let it boot into "Default settings (Runs from RAM)". Wait for it to boot into the graphical screen, then select the "Partition Editor" desktop icon. Figure 2.3d shows the same Windows 7 system in Partition Editor. The 225.05GB partition is the Windows data partition (which was displayed as drive C within Windows 7) and the 224.61GB of unallocated space was created using the Windows Disk Management utility. The "Create new Partition" screen was opened by right-clicking on the unallocated space and selecting "New" from the menu. When creating your partition from unallocated space, make sure that "Primary Partition" is selected. The filesystem type does not matter as the PC-BSD® installer will reformat it. It is a good idea to write down the size and filesystem type so that you will recognize the partition that you will be installing PC-BSD® into. Once you have made your selections, click the "Add" button. Note that the partition will not actually be created until you click the "Apply" button to apply your changes. A popup menu will prompt you to make sure that you have selected the correct partition, as formatting a partition destroys all data on that portion of the disk. Once the operation is complete you can reboot and start the PC-BSD® installation.
Obtaining PC-BSD®The installation files for PC-BSD® can be downloaded for free and end with an .iso or .img.bz2 file extension. Depending upon the type of file you choose, the size will vary between ~650MB and ~3.5GB. This section will show you how to select which file to download and how to verify the downloaded file's checksum. The next section will demonstrate how to burn the file to bootable media. If you have a slow download connection or wish to support the PC-BSD® project financially, you can purchase PC-BSD® DVDs from the FreeBSD Mall[59]. Members of the PC-BSD® project attend many IT conferences across the globe and give out PC-BSD® DVDs at conference booths. Visiting a PC-BSD® booth is an excellent way to meet other PC-BSD® users and to get your questions answered. Check the PC-BSD® Blog[60] to see if any events are happening near you. If you are organizing a PC-BSD® booth, contact us[61] to arrange for DVDs. Selecting Which File to DownloadWhen you go to the Download[62] page of the PC-BSD® website, you will find a number of files available for download:
The larger the installation file size, the more components that come with that installation. Regardless of which media you use to install PC-BSD®, you have the option to install additional components and applications after the installation using System Manager and AppCafe®. There are two versions available for each type of file: one for 32-bit (i386) systems and one for 64-bit (amd64) systems. It is important that you download a file that matches your computer's processor type (32- or 64-bit). For example, if the system is 64-bit or has more than 4GB of RAM, download the amd64 version, even if the brand is not AMD. Each media type includes the pcbsd-media-details file which identifies the release version, architecture, media type, and date of creation.
Data Integrity CheckAfter downloading the file that is correct for your architecture and installation media, it is a good idea to check that the file is exactly the same as the one on the PC-BSD® server. While downloading, a portion of the file may get damaged or lost, making the installation file unusable. Each PC-BSD® download has an associated MD5 checksum which is listed next to the download link. If the checksum of the file you downloaded has the same number, your download was successful. If the MD5 numbers do not match, you should download the file again, preferably from a different mirror. In order to verify the checksum, you will need to use a checksum verification utility.If you are currently using a Windows system, you can download and install the FastSum[64] utility. Once installed, launch the program and click the "Files" button, shown in Figure 2.4a, to browse to the location of your downloaded file. Once the file is selected, click the green arrow to calculate the checksum. Once calculated, it will be listed in the "Checksum\State" column. The checksum is 87d28f726bd6b88c62433fddda16f089 in this example (though FastSum will capitalize the letters). On Linux and BSD systems you can use the built-in md5 (or md5sum) command line tool to check the data integrity of the downloaded file. In this example, the file is located in the Downloads subdirectory. You should substitute the name and location of the file that you downloaded:
Burning the Installation MediaOnce you have downloaded PC-BSD® and verified its checksum, burn the file to the correct media type. This section demonstrates how to do so using several different applications and operating systems. Each application assumes that the correct media (CD, DVD, or USB flash drive) for the type of file is inserted. Burning the CD/DVD ISO File on a BSD or Linux SystemThis section demonstrates how to burn the installation ISO on a Linux or BSD system using the following tools: K3B, Brasero, and growisofs. K3BK3B[65] is an easy-to-use graphical burning application for Linux and BSD systems. On a PC-BSD® system, it is installed with the KDE desktop. You can also install the K3B PBI using Using AppCafe®. To burn your ISO, launch K3B, browse to the location of the .iso file in the screen shown in Figure 2.5f and click Tools ➜ Burn Image... to see the screen in Figure 2.5g. Click the "Start" button to burn the file. K3B will automatically eject the media once the burn is complete. BraseroBrasero[66] is an easy to use burning application included with the GNOME desktop. A PBI is also available within AppCafe®. To launch Brasero within GNOME, click Applications ➜ Multimedia ➜ Brasero Disk Burner and the dialog window shown in Figure 2.5h will be displayed. Alternately, type brasero from within any window manager. Click Burn image to open the screen seen in Figure 2.5i. Use the Click here to select a disk image button to select your .iso file. The name and size of your .iso file should appear and Brasero will indicate the size of the media. The lower portion of Figure 2.5i shows the menu that appears if you click on the "Properties" button. You can change these options if you wish, but the default settings are fine in most cases. When you are ready, click the "Burn" button and Brasero will burn your ISO. XfburnXfburn[67] is available to install as PBI Software and is installed with XFCE4. growisofsIf you are familiar with using the command line on a FreeBSD or PC-BSD® system, you can use the growisofs command line utility to burn the DVD. This utility is included with the dvd+rw-tools FreeBSD port which is installed by default on a PC-BSD® system. If that software is not yet installed on a FreeBSD system, issue this command as the superuser:
Depending upon the type of DVD burner hardware, you may have to configure the system to use it. If the device is ATAPI (i.e. not USB or SCSI), the ATAPI driver must be loaded. The superuser can issue this command:
If you just get your prompt back, the driver successfully loaded. If you get the message "kldload: cannot load atapicam: File exists", this means that the driver was already loaded. If the device is USB or SCSI, no additional drivers need to be loaded if you are running the generic FreeBSD kernel. After inserting the DVD media into the device, you can start the burn using this command:
If your device is not the first CD device, change the number 0 accordingly. If your ISO has a different name, substitute the correct name in the command shown above. Burning the CD/DVD ISO File on a Mac OS X SystemTo burn the ISO on a Mac OS X system, go to "Finder ➜ Applications ➜ Utilities ➜ Disk Utility". With a blank media inserted into the burner, highlight the device representing the CD/DVD writer and click the "Burn" button. This will open up a browser where you can select the ISO to burn. In the example shown in Figure 2.5j, the DVD ISO has been selected and the device is a Sony DVD writer.Once the ISO is highlighted, click the "Burn" button. A pop-up message will indicate that the device is ready to burn. Click "Burn" once more and "Disk Utility" will write the ISO to the CD/DVD media. Burning the CD/DVD ISO File on a Windows SystemSeveral burning applications are available for Windows. This section will demonstrate how to use Windows 7's Disc Image Burner, ImgBurn, and InfraRecorder. Windows 7 Disc Image BurnerWindows 7 has built-in support for writing ISO images to disc. Right-click on the .iso file in Windows Explorer and select "Open with ➜ Windows Disc Image Burner" to open the screen shown in Figure 2.5a. Click "Burn" to write the disc. See the Microsoft article Burn a CD or DVD from an ISO file[68] for more detailed instructions. ImgBurnImgBurn[69] is an easy to use ISO burner for Windows that is available for free download. After installing and launching ImgBurn, select "Write image file to disk" from the main menu, seen in Figure 2.5b: You can then use File ➜ Browse for a source file... to select the .iso file to burn; once selected, your screen should look similar to Figure 2.5c. Click the Write icon in the lower left corner to begin the burn. ImgBurn will provide a status bar to indicate the progress of the burn. When it is finished, ImgBurn will eject the burner tray then reclose it in order to verify the burn. If the tray does not return itself, which may occur on a laptop, push the tray back in if you wish to verify the burn. InfraRecorderInfraRecorder[70] is an open source burning application for both CDs and DVDs. Once installed, open InfraRecorder and click on the "Write Image" button shown in Figure 2.5d: InfraRecorder will display a screen where you can browse to the location of the .iso file. Once selected, you will be presented with an options screen shown in Figure 2.5e: You can accept the defaults and click "OK" to start the burn. When finished, the burner tray will open and a dialog box will appear indicating that the burning process has finished. Writing an ISO File to USB Using SUSE Studio ImageWriterTHIS DOES NOT RESULT IN A BOOTABLE STICK - NEEDS MORE TESTING - UNETBOOTIN ALSO DOES NOT WORK SUSE Studio ImageWriter[71] is a utility for burning ISO files to a USB flash drive. It works with Linux and Windows. To use this utility, download ImageWriter.exe[72]. If you open this executable on a Windows system, you will see the screen shown in Figure 2.5k. Due to a bug in the Windows implementation, you will need to type *.* and press enter in order for the ISO file to show in the selection screen. Once you have selected the ISO and the USB device, click the "Copy" button to burn the image to the device. The application will warn that all existing data on the device will be deleted. Writing an IMG File to USBTo write an .img.bz2 file you will need the following:
Once the image is written, boot from the removable device and proceed with the PC-BSD® installation.
Writing the IMG File on a BSD or Linux SystemIf you selected to download an .img.bz2 file instead of an ISO, you can write the image file to a flash card or removable USB drive using the bunzip2 and dd command line utilities on a BSD or Linux system. On a FreeBSD system, the superuser can use these commands to extract the specified image and write it to the first plugged in USB device:
When using the dd command:
Writing the IMG File on a Mac OS X SystemTo extract the .img.bz2 file on a Mac system, use Finder to browse to the location of the file, as seen in Figure 2.5m. Simply double-click the file to extract it to the .img format. Finder will create a second file with the .img extension. To burn that .img file, insert a USB stick and open "Terminal". Run the diskutil list command to find out the device name of the USB disk, unmount the USB disk, then use dd to write the image to the raw disk (rdisk). In the following example, an 8GB USB stick has a device name of /dev/disk1 and a raw device name of /dev/rdisk1.
Writing the IMG File on a Windows SystemTo burn the image file on a Windows system, you can use win32-image-writer[73]. You will also need a utility that can extract .bz2 files such as 7-Zip[74]. When downloading win32-image-writer, download the latest version that ends in -binary.zip and use a utility such as Windows Explorer or 7zip to unzip the executable. To extract the PC-BSD® image file using 7-Zip, browse to the location containing your downloaded .img.bz2 file, as seen in the example in Figure 2.5k. Click the "Extract" button and browse to the location where you would like to save the extracted image. Once extracted, your image will end in .img, and will be ready to be written to a USB device using the win32-image-writer application. If you launch win32-image-writer.exe, it will start the "Win32 Disk Imager" utility, shown in Figure 2.5l. Use the "Browse" button to browse to the location of the .img file. Insert a USB thumb drive and select its drive letter (in this example, drive D). Click the "Write" button and the image will be written to the USB thumb drive.
PC-BSD® Live ModeBeginning with PC-BSD® 9.1, Live Mode is a read-write live image that is only available for USB media. The uncompressed live image is about 4GB in size, but you will want to write it to a USB device that will provide sufficient room for the files that you wish to save and any applications that you wish to install.
To use PC-BSD® Live Mode, download the live USB version. Once you have written the image file to a USB media, boot the system with the USB device inserted. Assuming your BIOS has been set to boot from that device, you should see some startup messages followed by the PC-BSD® graphical boot menu, shown in Figure 2.6a. The options in this menu are described in Booting Into PC-BSD®. If you press enter or wait 10 seconds, the system will continue to boot. If this is the first time you have booted into the image, the boot will pause with this message:
This step grows the filesystem so that it can use the entire capacity of the USB device. Press y to expand the filesystem and reboot into live mode:
You will know that you have successfully entered live mode when you are asked to accept the graphics resolution mode that is considered to be optimal for your hardware. If this is your first boot, you will then proceed through the post-installation configuration screens, ending in the Logging In screen. When logging in, use the user account and password that you were prompted to create. Three desktops are available: Fluxbox, LXDE, and Openbox.
Using VirtualBoxA virtualized environment allows you to test drive an operating system without overwriting your current operating system. This is an excellent way to practice installation, determine whether all of your hardware is supported, or to try multiple versions of different operating systems. Virtualization software effectively creates windows (known as virtual machines) into which you can install and use an operating system. The only limitation to virtualization is your hardware as each virtual machine uses CPU and RAM. Depending upon the amount of CPU and RAM in your computer, you may find that the operating system you install using virtualization software runs slowly. If your computer slows down greatly, try closing other applications running on your computer to free up some RAM.PC-BSD® provides a PBI for VirtualBox[75], an open source virtualization program. VirtualBox also runs on Windows, Linux, Macintosh, and OpenSolaris and supports a large number of operating systems that can be installed into a virtual machine. If your computer is already running a version of PC-BSD®, you can use AppCafe® to install VirtualBox. If your computer is running another operating system, download the binary for your operating system from the VirtualBox Downloads page[76]. In order to use PC-BSD® within VirtualBox, you will need to either:
If you have downloaded the PC-BSD® virtual disk, skip ahead to Using the Downloadable VirtualBox Disk. If you have downloaded the ISO file, you will need to first create a virtual machine that meets the following minimum requirements:
Creating a Virtual MachineOnce installed, start VirtualBox to see the screen shown in Figure 2.7a. To create the virtual machine, click the "New" button to start the new virtual machine wizard. Click the "Next" button to see the screen in Figure 2.7b. Enter a name for your virtual machine, which can be anything that makes sense to you. Click the "Operating System" drop-down menu and select BSD which will automatically change the "Version" menu item to FreeBSD. Click Next to see the screen in Figure 2.7c: The base memory size must be changed to at least 512 MB. If you wish to use ZFS, it will need to be at least 2048 MB. If your system has a lot of RAM, use more. Any number within the green area is considered a safe value by VirtualBox, meaning it should not slow down your computer too much. When finished, click "Next" to see the screen in Figure 2.7d: This screen is used to create the virtual hard disk--in other words, the amount of disk space that will be available to the virtual machine. If this is your first virtual machine, keep the default of "Start-up disk" and click "Next". If you have created a virtual machine in the past and wish to reuse its disk space, select "Use existing hard disk" from the drop-down menu. You can create as many virtual machines as you wish. However, if your computer is getting low on disk space, you should consider reusing existing virtual hard disks to prevent your hard drive from being used up by old virtual machines. If you choose to create a new hard disk, the "Create New Virtual Disk Wizard", seen in Figure 2.7e, will launch when you click "Next". The wizard can be used to create the following types of virtual disk formats:
Once you make a selection, click the "Next" button to see the screen in Figure 2.7f: You can now choose whether you want "Dynamically allocated" or "Fixed size" storage. The first option uses disk space as needed until it reaches the maximum size that you will set in the next screen. The second option creates a disk the same size as that specified amount of disk space, whether it is used or not. Choose the first option if you are worried about disk space; otherwise, choose the second option as it allows VirtualBox to run slightly faster. Once you select "Next", you will see the screen in Figure 2.7g: This screen is used to set the size (or upper limit) of the virtual machine. If you plan to install PC-BSD® into the virtual machine, increase the size to at least 10 GB or you will receive an error during the PC-BSD® installation. If you plan to install KDE, GNOME, multiple desktop managers, or PBIs within the virtual machine, you will probably want to choose at least 20 - 30GB. Whatever size you set, make sure that your computer has enough free disk space to support it. Use the folder icon to browse to a directory on disk with sufficient space to hold your virtual machine. Once you make your selection and press "Next", you will see a summary of your choices. You can use the "Back" button to return to a previous screen if you wish to change any values. Otherwise, click "Create" to finish using the wizard. Your virtual machine should now show up in the left box, as seen in the example in Figure 2.7h: Configuring the Network AdapterIf you wish to use your network card, you will need to configure bridging on your virtual machine. To do this, go to Settings ➜ Network. In the "Attached to" drop-down menu select "Bridged Adapter" then select the name of the physical interface from the Name drop-down menu. In the example shown in Figure 2.7i, the Intel Pro/1000 Ethernet card is attached to the network and has a device name of re0. Configuring the Storage DeviceBefore starting your virtual machine, you will want to configure it to use your installation media. Click the Storage hyperlink in the right frame to access the storage screen seen in Figure 2.7j: Double-click the word Empty, which represents your DVD reader. If you wish to access the PC-BSD® installer from your DVD reader, double-check that the Slot is pointing to the correct location (e.g. IDE Secondary Master) and use the drop-down menu to change it if the location is incorrect. Click the "CD/DVD Device" drop-down menu to change it from empty to the Host Drive value. If you prefer to use an ISO that is stored on your hard disk, click the DVD icon ➜ Choose a virtual CD/DVD disk file to open a browser menu where you can navigate to the location of the ISO. Highlight the desired ISO and click Open. The name of the ISO will now appear in the Storage Tree section.
You are now ready to install PC-BSD® into your virtual machine. Simply highlight the virtual machine and click on the green "Start" icon. A window will open indicating that the virtual machine is starting. If you have a DVD inserted, you should hear it spin and it should start to boot into the installation program. If it does not or if you are using an ISO stored on the hard disk, press F12 to select the boot device when you see the message to do so, then press "c" to boot from CD-ROM. You can then proceed through the installation as described in the Installation section.
Installing VirtualBox Guest AdditionsBeginning with PC-BSD® 9.0, you can install the VirtualBox Guest Additions[80] either during installation or afterwards using Control Panel ➜ System Manager ➜ System Packages ➜ Misc. The guest additions add mouse pointer integration, shared folders between the host and guest, better video support, and a shared clipboard. To use the improved video support, select vboxvideo in Control Panel ➜ Display. Using the Downloadable VirtualBox or VMWare DiskPC-BSD® provides pre-built VirtualBox and VMWare disks which create a a pre-made virtual machine with PC-BSD already installed. The VirtualBox file ends in a .vdi.bz2 extension and the VMWare disk file ends in a .vmdk.bz2 extension. The .bz2 means that either file needs to be unzipped first so that it just ends with a .vdi or .vmdk extension. On a Linux or BSD system, use the bunzip2 command by giving it the name of the file which you downloaded:
Since this is a large file, the command will take a few minutes to extract the image. You will receive the prompt back when it has finished. On a Windows system, you can use a utility such as 7-Zip[74]. On a Mac OS X system, simply double-click the file in "Finder" to extract it. Once the file is unzipped, open VirtualBox as described in Creating a Virtual Machine. When you get to Figure 2.7d, select "Use existing hard disk". Use the browse icon to browse to the location of the .vdi or .vmdk file then press "Next". A message will indicate that the virtual machine will be created; click the "Create" button to finish the wizard. You can then configure the network adapter and start the virtual machine. The virtual machine will boot into the first boot wizard for PC-BSD® so that the system can be configured. Once the display wizard is finished and the login prompt appears, input the username and password that you configured at the login screen. Troubleshooting VirtualBoxWhile using a virtual environment allows you to test an operating system without affecting what else is currently installed on the system, there are some things to be aware of when using VirtualBox. If the installer program fails to load, try increasing the amount of RAM in the virtual machine. The bare minimum is 512 MB, but increasing this value to 1024 or higher will sometimes allow an unbootable ISO to boot into the installer. If the installation fails and you would like to review the installation log, right-click the virtual machine window and select xterm from the menu. You can now type more /tmp/pc-sysinstall.log to review the log. Ctrl-f (right ctrl key only) will toggle the virtual machine window in and out of full-screen mode. The FreeBSD VirtualBox wiki[81] contains additional information that may assist you in troubleshooting VirtualBox issues.
Installing PC-BSD®PC-BSD® can be installed from the installation media directly onto a hard drive or into a virtual machine using virtualization software such as Virtualbox[75]. You can also try PC-BSD® without installing it by using a Live version. The installation of PC-BSD® is a fast, easy and straight-forward process. The graphical installer will take you step-by-step through the whole process by asking a few simple questions. Within a short period of time, your PC-BSD® system will be installed, configured, and ready to use. This section will walk you through the following installation steps:
Starting the PC-BSD® InstallationTo begin the PC-BSD® installation, insert the boot media and boot the system. If the computer boots into an existing operating system instead of the installer, reboot and check your computer's BIOS program to ensure that the drive containing the installation media is listed first in the boot order. Save your BIOS changes and reboot. After a couple of seconds, a series of lines of code will scroll down the screen, meaning that PC-BSD® is being loaded. Soon after, you should see a screen similar to Figure 3.1a. There are 7 options to choose from: 1. Boot [default]: starts the installation program with all standard options enabled. This is the default if you do not select anything else within 10 seconds. 2. Boot with ACPI enabled: this enables power management, which may be useful[82] for certain BIOS's and laptops. 3. Boot in Safe Mode: select this option if the installation still hangs when probing your hardware and option #2 did not help. It will boot with a forced PIO mode (disabling the use of DMA), disable write caching for all IDE hard drives and CD ROM drives, disable the probing of EISA slots (as very few systems have them), and (on i386 systems) disables the use of ACPI and APICs. 4. Boot with verbose logging: select this option if you would like to see more detailed messages during the boot process. This can be useful if you are troubleshooting which piece of hardware is causing the installation to hang. 5. Boot to emergency console: advanced users can use this option to fix critical system failures. 6. Boot with X in VESA mode: if the installation program is unable to load your video driver, restart the computer and select this option. The installer will default to VESA mode which should work on any system with a video card. 7. Escape to loader prompt: advanced users can select this option to perform advanced operations, such as changing kernels or loading kernel modules. If you press enter or select any option other than 5 or 7, PC-BSD® will boot into the graphical installer.
Language Selection ScreenThe first graphical installer screen, seen in Figure 3.2a, indicates that the installer successfully loaded and is ready to present you with its options. Starting on the left-hand side, the icons in the bottom navigation area allow you to:
This initial screen allows you to select your language. The menus in PC-BSD® have been translated to several different languages and you can see the status of your native language at the PC-BSD® Translation Site[83]. If your language does not show 100% translation at this website, it means that not all of the menus have been translated yet and that the untranslated menus will instead display in English. You are welcome to join the PC-BSD® Translators Mailing List[84] if you would like to assist in translating menus to your native language. By default, PC-BSD® menus will display in English, unless you select another language in the drop-down menu in this screen.
When you are finished, click the next "Next" button to go to the next installation screen.
System Selection ScreenThe "System Selection" screen, shown in Figure 3.3a, allows you to select the system components and window managers to install with PC-BSD®. The default selection will depend upon the amount of RAM on the system. Systems containing more than 2GB of RAM will default to the KDE desktop and all other systems will default to the LXDE desktop. The arrow buttons can be used to browse through the primary window managers or to install a FreeBSD or TrueOS® server instead of a PC-BSD® desktop. Before leaving this screen, click the "Customize" button to review a larger selection of desktops and system components to install. If you right-click a component and select "View Packages", a pop-up menu will list the packages that are installed with that component. After installation, you can return to this "Customize" screen in order to install or uninstall additional components by going to Control Panel ➜ System Manager ➜ System Packages. In the example shown in Figure 3.3b, the user clicked "Components" then right-clicked Development ➜ Development-Science to view the packages to be installed with this component. The following components are available for installation.
If you check the box of a component that has a + next to it, it will automatically select all of its sub-components. You can click the + to expand and uncheck any sub-components that you do not wish to install. Once you have made your selection(s), click the "Save" button to save your selections. The "System Selection" box will list the components that you selected for installation. You can now click the "Next" button to proceed to the next screen.
Disk Selection ScreenThe "Disk Selection" screen, seen in Figure 3.4a, summarizes the default disk configuration. By default, PC-BSD® will assume that you wish to install on the entire first disk. On systems with less than 2GB of RAM, that drive will be formatted with the UFS+SUJ filesystem. On systems with 2GB or RAM or more, that drive will be formatted with the ZFS filesystem.
If you wish to select which disk or partition to install PC-BSD® into, click the "Customize" button to start the "Disk Setup Wizard", shown in Figure 3.4b. The wizard provides three modes of operation. The rest of this section describes these modes in detail.
Basic ModeIf you select "Basic" mode, the wizard will display the screen shown in Figure 3.4c. By default, the first hard disk will be selected. If you wish to install on a different disk, use the "Selected Disk" drop-down menu to select the disk to install into. By default, the entire selected disk will be formatted. If the disk has been divided into partitions and you wish to install into a specific partition, use the "Selected Partition" drop-down menu to select the desired primary partition.
Once you have selected the disk and partition, click "Next" to see the screen shown in Figure 3.4d. If you wish to encrypt the data in your home directory, check the box labelled "Encrypt user data". This option will automatically encrypt all of the data stored in /usr, including the home directories of all of the users that you create. If you decide to encrypt, review if You Encrypted a Filesystem for instructions on how to enter your passphrase at system bootup. If you check this box, enter and confirm a passphrase. You will be prompted to enter this passphrase whenever you boot into PC-BSD®. This means that if someone else boots your computer, they will not be able to boot into PC-BSD® if they do not know your passphrase. However, if you forget your passphrase, you will not be able to access PC-BSD® either. For these reasons, it is important to choose a good passphrase that other users will not guess and which you will not forget. Passphrases are case-sensitive and can contain spaces. The passphrase should be memorable to you, such as a line from a song or piece of literature, but hard to guess, in that people who know you should not be able to guess your favorite line from a song or piece of literature.
It is important to remember to make a backup copy of your keys either to another system or to a removable media such as a USB thumb drive. You should do so after your first boot into PC-BSD®. The keys are located in /boot/keys/, so that is the directory that you should backup. Once you click "Next", the wizard will return to the disk "Summary" screen so that you can review your selections. If you wish to change anything, use the "Back" button to return to a previous screen. Otherwise, click "Finish" to leave the wizard. Click Next then Yes to start the installation. Advanced ModeIf you select advanced mode, the wizard will again display the screen shown in Figure 3.4c. This time, that screen has the addition of a checkbox: Partition disk with GPT: GPT[86] is a partition table layout that supports larger partition sizes than the traditional MBR layout. If your installation disk/partition is larger than 2 TB, this box must be checked, otherwise checking this box is optional. Some older motherboards do not support this option. If the installation fails with this option checked, try again with the box unchecked. It has been reported that some Linux distros do not understand UFS partitions that use GPT. When in doubt, leave this box unchecked.
After making your selections click "Next" to access the filesystem selection screen shown in Figure 3.4e. This screen allows you to choose from the following filesystem types:
This screen also provides the following checkbox:
The rest of this section demonstrates how to customize the UFS or ZFS layout. UFS LayoutIf you select UFS and click "Next", the default UFS layout will be displayed, as seen in the example in Figure 3.4f. In this example, a 12GB disk has four partitions with mount points for /, SWAP, /var, and /usr. The actual sizes of the partitions created by the default layout will vary, depending upon the size of the disk, but always follow this logic:
The UFS+SUJ means that this version of UFS adds a light version of journaling to soft updates as described in this technical paper[89]. This is the default filesystem type as it virtually eliminates the need to run fsck. In practical terms, this means that even if the system is not cleanly shutdown (e.g. because of a power outage), it will still boot up quickly without losing any data. If you right-click any partition other than /, you can select to "Enable Encryption". A pop-up box will prompt for the passphrase. When the system boots, you will be prompted for the passphrase for each partition that you encrypt, so be sure to remember the passphrases and to backup your encryption keys as described in the Basic Mode section. Three buttons are provided should you wish to modify the default layout:
If you decide to change the default partitions, keep the following points in mind:
Once you click "Next", the wizard will show a summary of your selections. If you wish to change anything, use the "Back" button to return to a previous screen. Otherwise, click "Finish" to leave the wizard and return to the "Disk Selection" screen. ZFS OverviewZFS is a combined filesystem and logical volume manager originally designed by Sun Microsystems. It was ported to FreeBSD and has been part of the operating system since FreeBSD 7.0. ZFS provides many features including: support for high storage capacities, snapshots and copy-on-write clones, continuous integrity checking and automatic repair, RAIDZ which was designed to overcome the limitations of hardware RAID, and native NFSv4 ACLs. If you are new to ZFS, the Wikipedia entry on ZFS[8] provides an excellent starting point to learn about its features. These resources are also useful to bookmark and refer to as needed: The following is a glossary of terms used by ZFS: Pool: a collection of devices that provides physical storage and data replication managed by ZFS. This pooled storage model eliminates the concept of volumes and the associated problems of partitions, provisioning, wasted bandwidth and stranded storage. Thousands of filesystems can draw from a common storage pool, each one consuming only as much space as it actually needs. The combined I/O bandwidth of all devices in the pool is available to all filesystems at all times. The Storage Pools Recommendations[96] of the ZFS Best Practices Guide provides detailed recommendations for creating the storage pool. Mirror: a form of RAID where all data is mirrored onto two disks, creating a redundant copy should one disk fail. RAIDZ: ZFS software solution that is equivalent to RAID5 in that it allows one disk to fail without losing data. Requires a minimum of 3 disks though 5 disks is recommended. RAIDZ2: double-parity ZFS software solution that is similar to RAID6 in that it allows two disks to fail without losing data. Requires a minimum of 4 disks. RAIDZ3: triple-parity ZFS software solution. RAIDZ3 offers three parity drives and can operate in degraded mode if up to three drives fail with no restrictions on which drives can fail. Dataset: once a pool is created, it can be divided into datasets. A dataset is similar to a folder in that it supports permissions. A dataset is also similar to a filesystem in that you can set properties such as quotas and compression. Snapshot: a read-only point-in-time copy of a filesystem. Snapshots can be created quickly and, if little data changes, new snapshots take up very little space. For example, a snapshot where no files have changed takes 0MB of storage, but if you change a 10GB file it will keep a copy of both the old and the new 10GB version. Snapshots provide a clever way of keeping a history of files, should you need to recover an older copy or even a deleted file. For this reason, many administrators take snapshots often (e.g. every 15 minutes), store them for a period of time (e.g. for a month), and store them on another system. Such a strategy allows the administrator to roll the system back to a specific time or, if there is a catastrophic loss, an off-site snapshot can restore the system up to the last snapshot interval (e.g. within 15 minutes of the data loss). Snapshots can be cloned or rolled back, but the files on the snapshot cannot be accessed independently. Clone: a writable copy of a snapshot which can only be created on the same ZFS volume. Clones provide an extremely space-efficient way to store many copies of mostly-shared data such as workspaces, software installations, and diskless clients. Clones do not inherit the properties of the parent dataset, but rather inherit the properties based on where the clone is created in the ZFS pool. Because a clone initially shares all its disk space with the original snapshot, its used property is initially zero. As changes are made to the clone, it uses more space. ZFS LayoutIf you select ZFS and click "Next", the disk setup wizard allows you to configure your ZFS layout. The initial ZFS configuration screen is seen in Figure 3.4g. If you wish to format the hard drive or partition that you selected in Figure 3.4c with ZFS, leave the "Enable ZFS mirror/raidz mode" box unchecked and click "Next" to go to the "Encrypt user data" screen shown in Figure 3.4d. Unlike UFS, which only encrypts /usr/, selecting encryption for ZFS encrypts the entire pool. In other words, it encrypts the entire selected disk or partition, except for a small, UFS /boot partition. If your system contains multiple drives and you would like to use them to create a ZFS mirror or RAIDZ, check the box "Enable ZFS mirror/raidz mode" which will enable the rest of the options in this screen. In the example shown in Figure 3.4g, the system has 7 disks, all of which are the same size. The first disk, ada0, was pre-selected in Figure 3.4c and the remaining 6 disks (ada1 to ada6) are available to be added to the ZFS pool.
If you have never configured a RAIDZ before, take the time to read the RAIDZ Configuration Requirements and Recommendations[97] first. It indicates the optimum number of disks for each type of configuration. While ZFS will let you use disks of different sizes, this is discouraged as it will decrease storage capacity and performance of the ZFS system. The PC-BSD® installer supports the following ZFS configurations:
The installer will not let you save a configuration if your system does not meet the minimum number of disks required by that configuration. As you select a configuration, a message will indicate how many more disks you need to select. To use multiple disks, select the type of configuration from the "ZFS Virtual Device Mode" drop-down menu, then check the box for each disk that you would like to add to that configuration. When finished, click the Next button to see the default layout screen shown in Figure 3.4h. Regardless of how many disks you selected for your ZFS configuration, the default layout will be the same. Unlike UFS, ZFS does not require separate partitions for /usr, /tmp, or /var. Instead, you create one ZFS partition (pool) and specify multiple mount points. A /boot partition is not mandatory with ZFS as the PC-BSD® installer puts a 64k partition at the beginning of the drive. You can use the "Add" button to add additional mount points. You will only be prompted for the name of the mount point as, unlike UFS, size is not limited at creation time. Instead, the data on any mount point can continue to grow as long as space remains within the ZFS pool.
If you right-click any mount point (other than /swap), you can toggle between enabling or disabling any of the following ZFS properties. For performance reasons, the PC-BSD® installer will not allow you to remove or modify /swap.
Once you click "Next", the wizard will show a summary of your selections. If you wish to change anything, use the "Back" button to return to a previous screen. Otherwise, click "Finish" to leave the wizard and return to the "Disk Selection" screen. FreeBSD Expert ModeIf you select FreeBSD expert mode, you will be prompted to launch a terminal where you can use command line utilities such as bsdinstall or sysinstall to manually configure the partitions. When you are finished, type exit to leave the terminal, then click "Next" to review the disk summary. If you wish to change anything, use the "Back" button to return to a previous screen. Otherwise, click "Finish" to leave the wizard and return to the "Disk Selection" screen.
Installation Progress ScreenOnce you select "Yes" to start the installation, a progress screen, seen in Figure 3.5a, provides a progress bar and messages so that you can watch the installation's progress. How long the installation takes depends upon the speed of your hardware, the installation type you selected, and the number of components to be installed. A typical installation takes between 20 and 40 minutes.
Installation Finished ScreenThe screen shown in Figure 3.6a appears once the installation is complete. Click the "Finish" button to reboot into your PC-BSD® installation. Wait until the installer exits before removing the installation media.
Post Installation Configuration and Installation TroubleshootingOnce PC-BSD® is installed, it will reboot into the new operating system. If you are dual-booting PC-BSD®, you may need to first add an entry to your boot loader menu. The section on Dual Booting describes how to add a PC-BSD® entry to the GAG, GRUB, and EasyBCD boot loader programs. The first time PC-BSD® boots, a background script checks the PC-BSD® mirror servers and automatically configures the system to use the fastest mirror. If you find that you have connectivity issues using AppCafe® or Update Manager, it may mean that your default mirror is temporarily unavailable. You can change the mirror setting in System Manager ➜ Mirrors. Once the PC-BSD® system has finished booting for the first time, the installer will present you with some additional screens so that you can configure your system. This section describes the following post-installation steps and provides some troubleshooting tips for failed installations.
Booting Into PC-BSD®After installation, PC-BSD® will reboot and you will be prompted to configure your system and to login to a desktop. Unless you unchecked the "Install bootable MBR" option in the advanced mode of the disk setup wizard, you will see a FreeBSD boot menu similar to this one when you first boot up:
After a few seconds, the boot should continue and you will be presented with the graphical PC-BSD® boot menu, shown in Figure 4.1a. If you press any key, this screen will pause, allowing you to read and select the desired options. Otherwise, it will pause for a few seconds then continue to load PC-BSD® with the default options. There are 6 boot options and 4 actions to choose from: 1 Disable ACPI: ACPI controls power management but may be problematic on some hardware. Select this option if you are unable to boot into PC-BSD®. 2 Enable Safe Mode: select this option if the installation hangs when probing your hardware. It will boot with a forced PIO mode (disabling the use of DMA), disable write caching for all IDE hard drives and CD ROM drives, disable the probing of EISA slots (as very few systems have them), and (on i386 systems) disable the use of ACPI and APICs. 3 Enter single user mode: advanced users can use this option to fix critical system failures. 4 Enable verbose logging: select this option if you would like to see more detailed messages during the boot process. This can be useful if you are troubleshooting a piece of hardware.
6 Run the Display Wizard: if you are unable to access the GUI due to a display setting, enable this option to boot into the display settings wizard. Press the number of an option to select that option. As you make a selection, the FreeBSD bobble-head icon will be filled in, indicating that that option has been selected. To de-select an option, press its number again. Once you have made your selection(s), you can choose from the following actions: B Boot PC-BSD® with above options: starts PC-BSD® with the selected options enabled. D Restore default options: clears your selections. L Escape to loader prompt: advanced users can select this option to perform advanced operations, such as changing kernels or loading kernel modules. This prompt provides a limited set of commands which are described in the FreeBSD Handbook[98]. R Reboot: reboots the computer. As the system continues to boot, the PC-BSD® splash screen will appear. If you prefer to watch the boot messages, press any key. If You Encrypted a FilesystemIf you checked the box "Encrypt user data" during PC-BSD® installation, the boot process will pause, waiting for you to input your passphrase. Press enter at the splash screen so that you can see the message, similar to the one shown in Figure 4.1b, in order to type your passphrase. A * should appear for each character that you type, so type slowly and make sure that each keystroke is accepted. If you do not enter the passphrase correctly, this message indicates that you should try again:
Once the correct passphrase is entered, you will see a message similar to the following and the boot sequence will proceed.
If Your Display is Not Automatically DetectedOnce the first boot is complete, the installer will attempt to set the optimal display settings. A pop-up menu will ask if you would like to accept these settings. Simply click "Yes" to continue. PC-BSD® will now play a short video. You can press Esc to skip the video and move on to the Language screen of the post-installation process. If you instead select "No", or if for some reason the installer is unable to find the optimal display settings, you will instead see the "Display Settings" screen shown in Figure 4.1c: The settings in this screen are described in more detail in Display. If you wish to return to this display wizard at a later time, go to Control Panel ➜ Display. If you change any display settings, click the "Apply" button for the settings to be tested. If anything goes wrong during testing, you will be taken back to the "Display Settings" screen so that you can try another setting. Once you are happy with the tested setting, click the "Yes" button to save the setting and to proceed. Fast BootPC-BSD® uses a "fast boot" script to decrease the amount of time that it takes the system to boot to the login screen. When this script is enabled, which is the default, services are started in the background and the boot process does not wait for confirmation from each service as it starts. This is referred to as delayed mode. The fast boot script is controlled by these lines in /etc/rc.conf:
The logfile /var/log/rc_delay.log shows the startup messages for the services which were started in delayed mode. If this log indicates that a delayed mode service is not starting correctly, become the superuser, remove the path to that service in the fastboot_earlyrc line of /etc/rc.conf, and reboot to see if that fixes the problem. If a faster boot time is not important to you and you prefer to watch each service as it starts at boot time, you can disable fast boot by changing the "YES" to a "NO" in the fastboot_enable line of /etc/rc.conf. These mods are contained in /etc/rc && /etc/rc.delay. Creating a Custom Boot ThemeIf you would like to change the image in the graphical boot loader, create a PCX[99] image file. It is important that the file is saved in .pcx format as that is the only image format that the boot loader understands. Additionally, the image must be 640 x 480 pixels and 16 colors. The RGB colors that will be available in the menu text will be taken from the image's palette. The default PC-BSD® graphical boot theme is found in /boot/themes/default/. To create your own theme, create a new directory in /boot/themes/ (e.g. mkdir /boot/themes/mytheme) and copy your PCX file to that new subdirectory. Next, copy /boot/themes/default/theme.conf to your new subdirectory. Open the copied file and edit this line to point to the location of your PCX file:
You can change the theme's colors by editing the RGB values in this file. You can also change the font by modifying the theme_font path to point to the font to use. Finally, you can change the locations of the list of options and the actions menu. These are defined with the *_xy settings in the configuration file. The value must be two numbers which specify the X and Y coordinates in pixels, relative to the upper left corner. To enable your theme, modify this line in /boot/loader.conf to point to the location of your theme.conf file:
Language ScreenOnce the system has completed its boot, an introductory video will play. You can press the Escape key if you wish to skip the video. If you wish to watch the video at a later time, it is located in /usr/local/share/pcbsd/movies/. After the video finishes, the language selection screen will again be displayed, as seen in Figure 4.2a. This allows you to select the language you will use to access the installed system. Once you have made your selection, click "Next" to go to the next configuration screen.
Time Zone Selection ScreenThe next configuration screen, shown in Figure 4.3a, allows you to select your timezone. Use the drop-down menu to select the city closest to your location. When finished, click "Next" to proceed to the next screen.
Set Root Password ScreenThis configuration screen, seen in Figure 4.4a, requires you to set the root or administrative password. The system password, also known as the root, superuser, or administrative password, is required for system administration tasks such as installing server software, setting up your printer, or changing settings that affect all users. You will need to remember this password for the times that you are prompted for it. The password must be a minimum of 4 characters, and you are required to type it in twice to confirm the password. Click the "Next" button when you are finished.
Create a User ScreenThis screen is used to create the user account that you will use to login to your system.
Figure 4.5a shows the configuration screen used to create the initial user account. This screen requires you to complete the following fields:
If you share your computer with other users, you will be able to create additional user accounts once you are logged in using Control Panel ➜ User Manager.
Connect to a Wireless NetworkIf the system has an active wireless interface, a screen similar to Figure 4.6a will indicate the wireless networks which were automatically detected. If you would like to set the default wireless connection, highlight the network that you would like to connect to. If the network does not appear, you can click the "Rescan" button. If you are unable to connect or you wish to configure the connection at a later time, see the section on Network Configuration. When finished, click the "Next" button to continue the post-configuration tasks.
Post Install Finished ScreenThe screen in Figure 4.7a indicates that the post-installation setup is complete. Click the "Finish" button to access the login menu.
Logging InOnce you have finished setting up your system, you will be presented with the login screen seen in Figure 4.8a. The Username that you created in the Create a User Screen will be listed (in this example, it is dru).
Universal AccessIf you click the "Universal Access" button in the task bar (round icon with a stick figure), you can set the accessibility options shown in Figure 4.8b. If you installed PC-BSD® on a laptop, the taskbar will also show the current battery charge level when you hover your mouse over the power icon. The taskbar includes a clock followed by a "Shutdown Options" icon. If you click that icon, you can choose to restart or shutdown the system. Login OptionsIf you highlight the username, some more options will be added to the left side of the taskbar as shown in Figure 4.8c: These options allow you to select your language, keyboard layout, and desktop to use for the login session. Once you have made your selections, input the password associated with the selected user and press enter.
If you wish to add or delete any desktops, use the "System Packages" tab of System Manager. If you wish to enable auto-login, see the section on GDM Configuration. Welcome & Getting StartedThe first time you log in, the PC-BSD® "Getting Started" screen will load as seen in Figure 4.8d. If you click the "Next" button, you can read an overview of the utilities that are used to configure your network connection, install applications, configure your system, make a backup, and keep the system updated, as well as how to get involved with the PC-BSD® community. Check the box "Don't show this greeting on next startup" if you do not want to see this screen the next time you log in. To re-open the screen after checking that box, type pc-welcome.
Installation TroubleshootingInstalling PC-BSD® is usually an easy process that "just works". Sometimes, however, you will run into a problem. This section will look at solutions to the most common installation problems. Installation Starts But FailsThe PC-BSD® installer creates a log which keeps a record of all the steps that are completed as well as any errors. When an installation error occurs, the PC-BSD® installer will ask if you would like to generate an error report. If you click "Yes", a pop-up message will ask if you would like to save the error log to a USB stick. Type y and insert a FAT formatted USB thumb drive to copy the log. While in the installer, you can read this log to see what went wrong. Right-click an area on the desktop outside of the installation window and select "xterm" from the menu. You can read the log with this command:
If you can not figure out how to fix the error or believe that you have discovered an installation bug, send the log that was saved on the USB stick to the Support[100] mailing list. System Does not Boot Into the InstallerIf the installer does not make it to the initial GUI installer screen, try unplugging as many devices as possible, such as webcams, scanners, printers, USB mice and keyboards. If this solves the problem, plug in one piece of hardware at a time, then reboot. This will help you pinpoint which device is causing the problem. If your computer freezes while probing hardware, and unplugging extra devices does not fix the problem, it is possible that the installation media is corrupt. If the checksum on the file you downloaded is correct, try burning the file again at a lower speed. If the system freezes and you suspect the video card to be the cause, review your system's BIOS settings. If there is a setting for video memory, set it to its highest value. Also check to see if the BIOS is set to prefer built-in graphics or a non-existent graphics card. On some systems this is determined by the order of the devices listed; in this case, make sure that the preferred device is listed first. If you cannot see your BIOS settings you may need to move a jumper or remove a battery to make it revert to the default of built-in graphics; check your manual or contact your manufacturer for details. If that change did not help, try rebooting and selecting option "7. Escape to loader prompt" from the boot menu shown in Figure 4.9a. Selecting this option will open the boot loader prompt where you can type the following commands:
Those commands will disable the vesa splash screen before attempting to boot the installer. A not uncommon cause for problems is the LBA (Logical Block Addressing) setting in the BIOS. If your PC is not booting up before or after installation, check your BIOS and turn LBA off (do not leave it on automatic). If the SATA settings in your BIOS are set to "compatibility" mode, try changing this setting to "AHCI". If the system hangs with a BTX error, try turning off AHCI in the BIOS. USB Keyboard Does not Work in InstallerIf the USB keyboard is non-functional, check if there is an option in your BIOS for legacy support in relation to the keyboard or to USB, or both. Enabling this feature in your BIOS may solve this issue. mountroot promptIf you boot your system and you receive a mountroot> command prompt, it may be due to a change in the location of the boot device. This can occur when the installation was made on another machine and then transferring the HDD without an adjustment to the /etc/fstab file, or if a card reader is involved (including card readers on a USB dongle). The solution is to enter ufs:/dev/da1 at the prompt (it will always be ufs for the installer media). Depending on the exact location of the boot media, it may be different than da1. Typing ? at the prompt should display available devices. Getting HelpIf none of the above has fixed your problem, search the PC-BSD® forums[101] to see if a solution exists, try a web search, or check the section on Finding Help.
Advanced Installation TopicsThe previous section discussed a default installation of PC-BSD®. This section covers the following advanced installation topics:
Install a ServerThe System Selection Screen of the PC-BSD® installer can be used to install a FreeBSD-based server operating system, rather than a PC-BSD® desktop operating system. This screen provides two server options:
For a server installation, using the PC-BSD® installer rather than the FreeBSD installer offers several benefits:
To perform a server installation, start the PC-BSD® installation as usual. When you get to the System Selection Screen of the installer, click the left arrow until either FreeBSD or TrueOS® is selected. In the example shown as in Figure 5.1a, the user has selected TrueOS® and the FreeBSD option is to the left of the selection. Once selected, press "Next" to start the "Server Setup Wizard". The wizard is the same for either a FreeBSD or a TrueOS® installation. Click "Next" to see the screen shown in Figure 5.1b. Input and confirm the root password which will be used for administrative or "superuser" access to the server, then click "Next" to proceed to the screen shown in Figure 5.1c. For security reasons, you should not login as the root user. For this reason, the wizard requires you to create a primary user account that will be used to login to the FreeBSD system. This account will automatically be added to the wheel group, allowing that user to su to the root account when administrative access is required. This screen contains the following fields:
When finished, click "Next" to proceed to the screen shown in Figure 5.1d. Input the system's hostname. If you will be using ssh to administer the system, check the box "Enable remote SSH login". Click "Next" to proceed to the network configuration screen shown in Figure 5.1e. Use the "Network Interface" drop-down menu to select from the following:
Alternately, select the device name for the interface that you wish to manually configure and input the IPv4 and/or IPv6 addressing information. When finished, click "Next" to proceed to the screen shown in Figure 5.1f. If you wish to install FreeBSD source or ports, check the associated box(es) then click "Finish" to exit the wizard. If you are installing TrueOS®, you can use the "Customize" button to install server meta-packages. This screen, shown in Figure 5.1g, can be used to install packages such as MySQL, PostgreSQL, Samba, PHP, VirtualBox, Apache, and Lighttp. When you have saved your selections, click "Next" to proceed to the Disk Selection Screen in order to configure the system's disk(s). Once the system is installed, it will boot to a command-line login prompt. Login using the primary user account that was configured during installation. You can now configure and use the server as you would any other FreeBSD server installation. The FreeBSD Handbook[104] is an excellent reference for performing common FreeBSD server tasks.
Dual BootingA PC-BSD® installation assumes that you have an existing primary partition to install into. If your computer has only one disk and PC-BSD® will be the only operating system, it is fine to accept the default partitioning scheme. However, if you will be sharing PC-BSD® with other operating systems, care has to be taken that PC-BSD® is installed into the correct partition; otherwise, you may inadvertently overwrite an existing operating system. If you wish to install multiple operating systems on your computer, you will need the following:
Choosing the Installation PartitionWhen installing PC-BSD® onto a computer that is to contain multiple operating systems, care must be taken to select the correct partition in the Disk Selection screen of the installation. On a system containing multiple partitions, each partition will be listed. Highlight the partition that you wish to install into and make sure that you do not select a partition that already contains an operating system or data that you wish to keep.
If you install PC-BSD® on a computer that already contains an operating system, the first time you reboot, your computer will automatically boot into the previous operating system. You will need to configure a boot loader utility to recognize all of the operating systems that are installed and to provide you with a boot menu where you can select which operating system to boot into. Choosing a Boot ManagerWhen selecting a boot manager, choose the one that best suits your needs or which is already installed on the computer. If GRUB is already installed on the system, review the GRUB section before installing PC-BSD® in order to determine which version of GRUB is installed. Legacy GRUB does not support GPT or ZFS. Depending upon your hardware, the installer may automatically select GPT or ZFS for you. You will need to change your layout to UFS and make sure that the "Partition disk with GPT" checkbox is unchecked while in the Disk Selection Screen of the installer. If GRUB version 2 is installed, you can select the installer's default partitioning layout as GRUB version 2 supports all of the disk options available during a PC-BSD® installation. If you will be dual booting with Windows, EasyBCD is easy to install graphical application for configuring a customized boot menu. This boot manager supports all of the disk options available during a PC-BSD® installation, including ZFS and GPT. EasyBCD has also been localized into 13 languages, making it a good choice for localized boot menus. GAG provides an easy to configure boot manager for loading any operating system. However, it does not support GPT. This means that you will need to make sure that the "Partition disk with GPT" checkbox is unchecked while in the Disk Selection Screen of the installer. The rest of this section will demonstrate how to configure the GAG, GRUB, and EasyBCD boot loaders. GAG, The Graphical Boot ManagerGAG[105] is a versatile boot manager, capable of booting many different operating systems. Once you have finished installing all of your operating systems, you can configure GAG to present you with a boot menu containing an entry for each operating system. After downloading and unzipping GAG, burn the cdrom.iso file to a CD. Insert the CD and reboot the system to configure GAG. You will be presented with the initial GAG screen, shown in Figure 5.2a:
Press 4 in order to "Install GAG". The next screen will prompt you to choose your keyboard type by pressing the associated number key. The next screen will prompt you to choose your language by pressing the associated number or letter key. Once your selections have been made, you will see a screen similar to Figure 5.2b: Press S to "Setup GAG" and see the screen shown in Figure 5.2c: Press A to "Add a new Operating System". GAG will display an entry for each operating system installed on the computer.
Press the letter associated with the operating system name. Your PC-BSD® entry will probably be displayed as "A5h FreeBSD". When you press the associated letter, a pop-up menu will prompt you to type a description which will be shown in the boot menu. Type in something that is useful to you, such as "PC-BSD 9.1". When you press enter, you will be prompted to type in a password or to press return for no password. If you decide to type in a password, you will need to input this password whenever you wish to boot into that operating system. Once you press enter, you will see the screen shown in Figure 5.2d. Press the letter representing the icon that you wish to associate with the operating system--it will be displayed next to the description in the boot menu. For example, you could press F to associate the FreeBSD Beastie icon next to the "PC-BSD 9.1" description. Once you press enter, you will be returned to the main menu. Press A again to add another operating system and repeat this process for each operating system that you wish to boot. When you are finished, press H to "Save in Hard disk". You should receive a pop-up message indicating that "GAG installed successfully". You can now press R to "Return to main menu". Note that the screen shown in Figure 5.2b now contains the entries for the operating systems that you added. Remove the CD and press the key associated with the operating system that you wish to boot. Now, whenever you reboot your system, this same menu will appear. It will always contain the S option so that you can add or delete operating system entries, set the boot passwords, or set the boot timer. GRUBMany Linux distros use GRUB[106] as the boot loader. This section shows you how to add PC-BSD® to an existing GRUB menu. There are two versions of GRUB that are in use. To see which version your Linux distro is using, boot into the Linux system and use the --version option to the grub command line tool:
If the version number is less than 1, you are using legacy GRUB; otherwise you are using GRUB version 2. If you are using GRUB version 2, run the ls command within grub to determine the names of the disks and partitions that can be seen by GRUB. This will help you determine which drive options to use when setting the root option in the examples shown in Adding PC-BSD® to GRUB Version 2. The output of this command will vary depending upon your disk layout and the naming scheme used by the Linux distro. When you are finished using grub, type quit to leave the utility.
Adding PC-BSD® to Legacy GRUB
Here is an example of adding a PC-BSD® entry to a Linux distro that is using legacy GRUB:
For more information about legacy GRUB, refer to the GRUB Legacy Manual[107]. Adding PC-BSD® to GRUB Version 2GRUB version 2 supports both the MBR and GPT formats. In this example, PC-BSD® is installed on the third primary partition of the first hard drive using the MBR format:
The entry for the same installation (third partition on first drive), but with the GPT box checked, will differ slightly in the set root line.
If you installed PC-BSD® onto the second hard drive, you need to invoke the map and chainloader commands in order to boot from the second disk. In this example, PC-BSD® is installed in the first partition of the second drive and the box to partition disk with GPT was not checked.
The entry if the GPT box was checked looks like this:
If you installed ZFS, several modules need to be loaded. Here is a sample entry with the GPT box checked:
For more information please refer to the GNU GRUB Manual[108]. Dual Boot with Windows Using EasyBCDEasyBCD[109] was developed by the non-profit NeoSmart Technologies to make it easy to add other operating system entries to the the Windows boot loader. EasyBCD allows you to add entries for multiple Windows installations as well as Linux, BSD, and Mac OS X. EasyBCD provides both a paid version and a free version for limited, non-commercial use. After booting into Windows, download and install the latest version of EasyBCD. Once installed, launch EasyBCD. The initial screen will show the current Windows bootloader. As seen in the example in Figure 5.2e, it will be set to boot Windows only: Click the "Add New Entry" button to add an entry for your PC-BSD® installation. In the "Linux/BSD" tab, click the "Type" drop-down menu and select FreeBSD/PC-BSD from the list. Type in something useful in the "Name" field; whatever you type here will show up in the boot menu. Click the "Device" drop-down menu and select the partition holding your PC-BSD® installation. It will have a filesystem type of 0xA5 rather than a drive letter or NTFS. The entry will also show its size so you can find it if you have other non-Windows partitions. An example is seen in Figure 5.2f: Once you have made your selections, click the "Add Entry" button. If you then click on the "View Settings" button, you should see a new entry for your PC-BSD® installation. Now that you have an entry, you can click the "Edit Boot Menu" button to set the order of the entries in the boot menu, the default operating system to boot, and the boot menu selection timeout before booting into the default operating system. This screen is shown in Figure 5.2g. Once you reboot, a simple boot menu will appear containing entries for Windows and PC-BSD®. A sample menu is shown in Figure 5.2h. Use your arrow key to select the operating system you wish to boot into. Recovering Windows Boot loader After Installing PC-BSD®If you accidentally overwrite your Windows boot loader, you will be unable to boot into Windows after installing PC-BSD®. Depending upon the version of Windows, the PC-BSD® boot loader may or may not automatically provide an entry to boot into Windows. However, assuming you have not accidentally installed PC-BSD® into the Windows partition, your Windows installation is still there and it is possible to restore the Windows boot loader. How to do so varies by the version of Windows: Once the Windows boot loader is recovered, you can use EasyBCD to add an entry for PC-BSD® to the Windows boot loader.
Multiple Boot EnvironmentsBeginning with version 9.1, PC-BSD® supports multiple boot environments (BEs) on systems that were formatted with ZFS during installation. In 9.1, this feature is managed from the command line. Version 9.2 will provide a graphical interface for managing boot environments. With multiple boot environments, the process of updating software becomes a low-risk operation as you can backup your current boot environment before upgrading or making software updates to your system. If needed, you also have the option of booting into a backup boot environment. For example:
Managing Boot EnvironmentsBoot environments are managed with the beadm command which must be run as the superuser. The following example creates a BE named beforeupgrade. The new BE is a clone of the current BE, the ZFS environment that you booted into.
To view all BEs, use the list command
In this example, the current BE is called default, it is active now, and at next reboot; and it is mounted. The newly created beforeupgrade BE exists, but is inactive and unmounted. To activate the new BE:
The flags now indicate that the system is currently booted into default, but at next boot the system will boot into beforeupgrade. Only one boot environment can be active at a time.
Upgrading PC-BSD®PC-BSD® makes it easy to upgrade from an earlier version of 9.x (including beta and RC versions) to the latest version of PC-BSD®. When the upgrade is finished, simply reboot to access the new version of your PC-BSD® operating system. The upgrade can be performed using the graphical Update Manager or from the command line. Before attempting an upgrade, be aware of the following caveats:
Using Update ManagerTo start Update Manager, make sure that your Internet connection is active and go to Control Panel ➜ Update Manager or type pc-su pc-updategui from a terminal. After inputting the administrative password, Update Manager will look for updates and inform you if a newer version of the operating system is available. In the example shown in Figure 5.4a, the current operating system is 9.0 and Update Manager is indicating that the upgrade to 9.1 is available.
To perform the upgrade, check the box for the "System Upgrade" entry and click the "Install selected updates" button. A progress bar will indicate:
How long these downloads take depends upon the speed of your network connection: for example, it can take an hour or so over a DSL connection. You can continue to use your PC-BSD® system while Update Manager downloads the files it needs to /usr/local/tmp/. Once the downloads are finished, a pop-up message will indicate that the system is now ready to reboot in order to finish the upgrade. PC-BSD® will not automatically reboot the system, giving you the opportunity to close any applications that you have open before you reboot the system yourself.
After rebooting, a series of console messages will appear similar to these (depending upon your choices as described):
Using the Command LineTo start a system upgrade from the command line, become the superuser and use the following command to check to see if an update is available:
Follow the instructions to install the update:
The upgrade will then proceed as usual and you will be prompted when the system is ready to reboot.
Creating an Automated Installation with pc-sysinstallPC-BSD® provides a set of Bourne shell scripts that allow advanced users to create automatic or customized PC-BSD® installations. pc-sysinstall is the name of the master script; it reads a customizable configuration file and uses dozens of backend scripts to perform the installation. You can read more about this utility by typing man pc-sysinstall. Here is a quick overview of the components used by pc-sysinstall:
To create a custom installation, perform the following steps:
These steps are discussed in more detail below. Determine Which Variables you Wish to CustomizeA list of possible variables can be found in /usr/share/examples/pc-sysinstall/README and in Table 5.5a. Note that the Table is meant as a quick reference to determine which variables are available. The README file contains more complete descriptions for each variable.
Create a Customized ConfigurationOne way to create this file is to read through the configuration examples in /usr/share/examples/pc-sysinstall/ to find the one that most closely matches your needs. Copy that file (to any location) and customize it so that it includes the variables and values you would like to use in your installation. An alternate way to create this file is to perform an installation of the version that you wish to customize. The installer will automatically create a file containing the settings you selected during the installation to /root/pc-sysinstall.cfg. You can use that configuration file as-is, or customize it to meet an installation's needs. This method may prove easier to use if you are performing complex disk layouts. Here is a sample configuration:
If you wish to perform a fully-automated installation that does not prompt for any user input, you will also need to review /usr/share/examples/pc-sysinstall/pc-autoinstall.conf and place a customized copy of that file into /boot/pc-autoinstall.conf on your installation media. Table 5.5b summarizes the additional variables that are available for fully automatic installations. More detailed descriptions can be found in the /usr/share/examples/pc-sysinstall/pc-autoinstall.conf file. Note that the variables in this file use a different syntax than those in Table 5.5a, in that the values follow a colon and a space rather than an equal sign.
Here is a sample pc-autoinstall.conf file:
Create a Custom Installation Media or Installation Serverpc-sysinstall supports the following installation methods:
The easiest way to create a custom installation media is to modify an existing installation image. For example, if you have downloaded an ISO for the PC-BSD® version that you wish to customize, the superuser can access the contents of the ISO as follows:
Make sure you have changed into a directory (use cd) where you would like to copy the contents of the ISO. In the following examples, /tmp/custominstall/ was created as the directory for this purpose:
Alternately, if you have inserted an installation CD or DVD, you can mount the media and copy its contents to your desired directory:
If you are creating an automated installation, copy your customized pc-autoinstall.conf to /tmp/custominstall/boot/. Copy your customized configuration file to /tmp/custominstall/. Double-check that the "installMedium=" variable in your customized configuration file is set to the type of media that you will be installing from. You may also need to add some extra files if you set the following variables in your custom configuration file:
If the installation media is a CD or DVD, you will need to create a bootable media that contains the files in your directory. To create a bootable ISO:
You can then use your favorite burning utility to burn the ISO to the media. To begin an installation that requires user interaction: pc-sysinstall -c /path_to_your_config_file To begin a fully automated installation, insert the installation media and reboot. If you are using an HTTP, FTP, or SSH server as the installation media, untar or copy the required files to a directory on the server that is accessible to users. Be sure to configure the server so that the installation files are accessible to the systems that you wish to install. If you are using a PXE Boot Install server, follow the instructions at Connecting to and Customizing the PXE Boot Install Server.
DesktopsOnce you have installed PC-BSD®, you will want to become familiar with your desktop environment. This section discusses the desktops which can be selected during the installation of PC-BSD® or installed afterwards using System Manager. These desktops are fully supported, meaning that all of the PC-BSD® utilities are integrated into the desktop environment:
By default, three PC-BSD® icons will appear on these desktops: AppCafe®: graphical utility used to install, uninstall, and upgrade software. See the section on Using AppCafe® for more details. PC-BSD® Control Panel: contains applications for administering the computer. See the section on Control Panel for more details. PC-BSD® Handbook: a PDF version of the PC-BSD® 9.1 Users Handbook (this document). The following desktops are called "unsupported" in the PC-BSD® installer as they are meant for more advanced users who are comfortable working at the command line. The PC-BSD® utilities will work in these environments, but the user may need to start some utilities manually from the command line if they do not appear as an icon on the desktop or in the desktop's application menu: Advanced users can also install other desktops using the FreeBSD ports and packages collection. You can browse the 180+ available desktops in the x11-wm[114] category at Freshports. The rest of this section provides an overview of each of the desktops that can be installed with PC-BSD®.
GNOME2GNOME2[115] is a popular desktop environment that provides many built-in utilities. Figure 6.1a shows a screenshot of GNOME2 on a PC-BSD® 9.1 system with the "Applications" menu open.
Each category in the "Applications" menu contains many applications and the "Settings" and "System" categories contain many utilities for configuring your system. If you are new to GNOME2, take some time to discover which applications best suit your needs. Some of the applications which are provided by GNOME include:
You may or may not have installed all of GNOME's components during installation. You can view the installed components and check (to add) or uncheck (to delete) various components using Control Panel ➜ System Manager ➜ System Packages ➜ Desktops ➜ GNOME. You can find additional themes and wallpapers at gnome-look.org[121].
KDE4The KDE[122] desktop environment provides many features and applications. However, it is hardware intensive and may run slowly on a computer with an older processor or a small amount of RAM. Figure 6.2a shows a screenshot of KDE4 running on PC-BSD® 9.1 with the "Applications" menu open. Each category in the "Applications" menu contains many applications and the "Settings" and "System" categories contain many utilities for configuring your system. If you are new to KDE4, take some time to discover which applications best suit your needs. Some of the applications which are provided by KDE4 include:
By default, desktop effects are disabled, as not all video cards support them. If your video card supports 3D effects and you would like to enable them in KDE, go to System Settings ➜ Desktop Effects ➜ General and check the box "Enable desktop effects at startup". Some of KDE's games require 3D support. If your video card does not support 3D, these games will fail to start. You may or may not have installed all of KDE's components during installation. You can view the installed components and check (to add) or uncheck (to delete) various components using Control Panel ➜ System Manager ➜ System Packages ➜ Desktops ➜ KDE. If you have KDE installed and are currently logged into a different window manager, you can still run any KDE application by specifying its name. For example, type konqueror to run the Konqueror web browser or dolphin to access the Dolphin File Manager. KDE Applications[130] includes descriptions and screenshots of all of KDE's applications as well as links to their handbooks. kde-look.org[131] contains additional themes and wallpapers.
LXDELXDE[132] is the Lightweight X11 Desktop Environment. It is an excellent choice for older hardware or for users who want a complete desktop environment without all of the overhead required by KDE or GNOME. Since it is XDG-compliant, the PC-BSD® Control Panel, AppCafe®, and Life Preserver are available on the desktop and integrated into LXDE's menus. Figure 6.3a shows a screenshot of the default LXDE installation with the LXPanel open. In addition to the PC-BSD® utilities, LXDE provides the following utilities:
XFCE4Xfce[144] is a lightweight desktop environment that aims to be low on system resources and fast, while still being visually appealing and user friendly. The first time you start XFCE4, you will see the Welcome Message shown in Figure 6.4a. In XFCE, a panel[145] is a bar which can hold many items such as application launchers, window lists, a clock, a notification area, and application menus. Your initial panel setup options are:
If you wish to change your configuration choice at a later time, reset the panel using Applications ➜ Settings ➜ Settings Editor, as shown in Figure 6.4d, then exit to the login prompt without saving session info. The next login to XFCE will present the panel configuration choice again. In addition to the PC-BSD® utilities, XFCE provides the following utilities:
A list of recommended applications for XFCE can be found on the XFCE Wiki[153]. Editing the MenuXFCE no longer includes a graphical menu editor. The XFCE team recommends using alacarte which is included when you install XFCE4 on PC-BSD® and which can be started by typing alacarte within an xterm. Figure 6.4e shows a screenshot of alacarte running on PC-BSD®. Any entry with a checkbox will appear in your menu. To remove an item from the menu, simply uncheck its box. To create a new menu category, either highlight a top-level menu (e.g. KDE Menu or System) or an existing category and click the "New Menu" button. To add a new entry, highlight the category where you wish the entry to appear and click the "New Item" button. Input a name for the entry, browse to the path of the application and press "OK". XFCE PluginsXFCE supports many plugins which provide additional applications that are separate from the official XFCE distribution. You can browse for plugins and read descriptions for each at the XFCE goodies website[154]. If you find a plugin that is not available within AppCafe®, this README[155] explains how to determine if a FreeBSD port is available, how to request a PBI if a port is available, and how to request a port if one does not already exist.After installing a plugin, go to Settings ➜ Panel ➜ Items and click the + button to see the "Add New Items" window shown in Figure 6.4f. Simply select your new plugin from the list, and click the "+Add" button. It will immediately be added as an icon in the panel.
AwesomeAwesome[156] is a highly configurable and fast window manager that is primarily targeted at power users who prefer to use the command line within their graphical environment. Figure 6.5a shows a screenshot of Awesome running on PC-BSD® 9.1. The user has right-clicked the desktop in order to launch the awesome application manager.If you click awesome ➜ manual, the man page for awesome will open in a terminal. If you click awesome ➜ edit config, the awesome configuration file will open in the ee text editor. The numbers in the upper left corner represent virtual desktops. For example, you can have different terminals open in each virtual desktop. Bluetooth Manager (if the system has a Bluetooth interface), Update Manager, Wireless Configuration Manager (if your wireless card is detected), and Life Preserver are located in the system tray near the clock in the upper right corner. If you wish to access Control Panel type pc-controlpanel in a terminal. To launch AppCafe®, type appcafe in a terminal or use the pbi_* commands to manage software from the command line.
EnlightenmentEnlightenment[157] is a lean, fast, modular, and extensible window manager. It provides a desktop for launching applications, managing windows, and doing other system tasks like suspending, reboots, and managing files.The first time you run Enlightenment, you will be prompted to select your Language, then either a touchscreen or a standard computer profile. You will then be prompted to select the size of title bars, the type of window focus, and whether or not to use compositing. If in doubt, you can select the defaults by pressing "Next" at each initial configuration screen. Figure 6.6a shows a screenshot of Enlightenment running a standard computer profile on PC-BSD® 9.1. The icon on the far left of the iBar has been clicked in order to access the applications menu. Enlightenment is very customizable. The User Guide[158] describes how to configure windows, shelves, menus, wallpaper, and much more.
evilwmevilwm[159] is an extremely light window manager. It does not support window decorations or icons and uses keyboard shortcuts to access xterms in order to run applications from the command line. Figure 6.7a shows a screenshot of evilwm running on PC-BSD® 9.1. Notice that there are no icons, nor is there a system tray, an application panel, or window buttons. An xterm has been opened using Ctrl+Alt+Enter and shows the output of the ps command. The keyboard shortcuts for manipulating windows are listed on the evilwm site[160]. To exit evilwm and return to the login screen, type killall evilwm within an xterm.
FluxboxFluxbox[161] is a light-weight and fast window manager. Regardless of the window managers that you have selected to install, Fluxbox is always available as an option in the login menu. Figure 6.8a shows a screenshot of Fluxbox running on PC-BSD®. In this example, the user has launched the Application menu by right-clicking on the desktop. Fluxbox provides many configuration files which can be edited in order to customize the desktop. The Features[162] page of the Fluxbox website lists the available configuration files and links to instructions for getting the most out of Fluxbox. To ease some aspects of configuration, the Fluxconf PBI, available in AppCafe®, adds the following graphical tools:
The following resources are useful when customizing Fluxbox:
FVWMFVWM[168] is a powerful and highly configurable desktop window manager for the X Window system. It supports any number of virtual desktops, each divided into multiple pages. It also supports side title bars, including vertical text. When you install FVWM on PC-BSD®, it also installs FVWM-Crystal[169]. Both window managers will be added to the login menu. Figure 6.9a shows the default PC-BSD® desktop if you select FVWM from the login menu. The application menu was opened by clicking the mouse anywhere on the desktop. Figure 6.9b shows the default PC-BSD® desktop if you select FVWM-Crystal from the login menu. To open an xterm in FVWM-Crystal, right-click any area of the desktop. This article[170] provides a good overview of the features and configurable options for FVWM-Crystal. The FVWM Documentation[171] provides further information about configuring FVWM.
i3i3[172] is a lightweight, tiling window manager. Keyboard shortcuts are provided to open xterms in order to start applications from the command line. Figure 6.10a shows a screenshot of i3 running on PC-BSD® 9.1.i3 provides a panel that on PC-BSD® will contain icons for Bluetooth Manager (if the system has a Bluetooth interface), Update Manager, Network Configuration (if your wireless card is detected), and Life Preserver. To open an xterm, use Alt+Enter. Windows do not provide minimize/mazimize or close buttons, so type exit when you are finished using an xterm. To leave the window manager and return to the login screen, type killall i3 from within an xterm. The i3 Users Guide[173] contains the default key bindings and instructions for customizing i3.
IceWMIceWM[174] is a light-weight window manager. Figure 6.11a shows a screenshot of IceWM running on PC-BSD®. In this example, the user has launched the Application menu by clicking on the IceWM button in the lower left corner. This menu can also be launched by right-clicking anywhere on the desktop. If you are new to IceWM, see the IceWM FAQ and Howto[175] for more information about configuration, customization, and keyboard shortcuts.
OpenboxOpenbox[176] is a highly configurable, minimalist window manager. It is the window manager used by LXDE but can also be run separately from LXDE. Figure 6.12a provides a screenshot of Openbox running on a PC-BSD® system. The application menu was launched by right-clicking on an area of the desktop. The application menu contains an entry for the Openbox Configuration Manager which can be used to customize settings such as themes, appearance, mouse, and margins. A screenshot of this configuration utility is shown in Figure 6.12b. A list of websites containing additional themes is available from the Openbox wiki[177].
RatpoisonRatpoison[178] is a simple window manager with no fat library dependencies, fancy graphics, or window decorations. Figure 6.13a provides a screenshot of Ratpoison running on a PC-BSD® system:Ratpoision uses keyboard shortcuts. To view the shortcuts, press Ctrl-t then ?. To leave this help screen, press enter. To open an xterm, press Ctrl-t then c. Type exit to close the xterm. Type killall ratpoison with an xterm to leave Ratpoison and return to the login screen. The Ratpoison wiki[179] contains an FAQ and tips for setting keyboard shortcuts.
spectrwmspectrwm[180], formerly known as Scrotwm, is a minimalist window manager written by OpenBSD hackers. It provides keyboard shortcuts, a configuration file, and assumes that the user prefers to use the command line. Figure 6.14a provides a screenshot of spectrwm running on a PC-BSD® system.If you have not used spectrwm before, spend some time reading through its man page[181] first. To launch applications within spectrwm, start an xterm by pressing Alt+Shift+Return. Once you have an xterm, you can start any program you wish. For example, to start Control Panel type pc-controlpanel. spectrwm does not provide minimize, maximize, or close buttons within its windows. To close a GUI application, use Ctrl-c within the xterm you used to launch the application. To leave this desktop, type killall spectrwm from an xterm.
WindowLabWindowLab[182] is a small and simple window manager. It uses a window resizing mechanism that allows one or many edges of a window to be changed in one action, and an innovative menubar that shares the same part of the screen as the taskbar. It follows a click-to-focus but not raise-on-focus policy. This means that when a window is clicked it gets focus, but it is not redrawn to obscure other windows. This allows one, for example, to switch to a terminal to enter commands while keeping documentation visible in a web browser.Figure 6.15a shows a screenshot of WindowLab running on PC-BSD® 9.1. The right mouse button is pressed in order to display the top menu panel. Use the left mouse button or hover over a taskbar entry to open that application. To add the applications you use most often to the menubar, select "Edit menu" while holding the right mouse button. To leave the WindowLab session, select "Quit" from the menubar.
Window MakerWindow Maker[183] is a light-weight window manager that was designed to reproduce the elegant look and feel of the NEXTSTEP[184] user interface. Figure 6.16a shows a screenshot of Window Maker running on PC-BSD®. In this example, the user launched the Application menu by right-clicking an area of the desktop.
In addition to the PC-BSD® utilities, Window Maker provides the following applications:
Working with the DockWindow Maker uses a dock to store application shortcuts. The dock appears as a series of icons in the upper right corner of the desktop. Docked applications always show on the desktop, even after you close an application or close and restart your Window Maker session. Whenever you start an application, an icon will appear in the lower left corner of the screen. You can move that icon elsewhere on the desktop with your mouse. If you right-click the icon, you have the option to hide/unhide the icon, set icon (change its picture), or kill the application. If you drag the icon onto the dock, it will remain on the desktop. Once an icon is docked, a settings menu is added to the icon's right-click menu. Figure 6.16c demonstrates how to configure an icon for AppCafe®. You will find the icons for AppCafe® and Control Panel in /usr/local/share/pcbsd/pc-controlpanel/icons. Choose the 64x64 versions as this is the size that Window Maker users. The application name for AppCafe® is appcafe and for Control Panel it is pc-controlpanel. DockAppsWindow Maker supports dockapps[186] which are applications that were designed to work with Window Maker but which are separate from the Window Maker project. Dockapps tend to be small and designed to perform a particular function. For example, there are clocks, weather applications, and CPU monitors. Most dockapps have been ported to FreeBSD and the port always begins with "wm". You can search for these at FreshPorts[187] by entering a "Short Description" containing "dockapp". If your favourite dockapp has not been ported to FreeBSD, you can request that a port be created on the Ports Requests forum using these [1][188]. If a port already exists and you would like to see it made into a PBI, you can request that a PBI be created on the PBI Requests forum using these instructions[155].
Installing Applications and Keeping PC-BSD® UpdatedIn PC-BSD®, software is divided into PBIs, meta-packages, and package sets:
This section demonstrates the following PC-BSD® tools for managing software on your PC-BSD® system:
It also describes how to Create Your Own PBI Repository of custom PBIs.
Using AppCafe®PC-BSD® provides a unique file format known as a PBI (push button installer). PBI files end with the .pbi extension and are self-contained installation programs. When a PBI is installed using AppCafe®, even novice users are protected from the risk of inadvertently overwriting or deleting files needed by the operating system or other applications.A PBI file includes all the runtime and library dependencies required by the application. This means that the initial download of a PBI is a large file; but this does not necessarily mean that same amount of space will be used. During installation, the PBI system compares the currently installed libraries and files with the ones contained within the PBI file and only installs the ones that are not already installed on the system. A hash database is used to eliminate dependency problems while allowing the computer to share libraries between different programs. Subsequent downloads to upgrade a PBI are significantly smaller as only what has changed in the new version will be downloaded. AppCafe® provides an intuitive, graphical method for installing and managing PBI software. AppCafe® does not require the root password to install most of the applications that users require, such as web browsers, games, mail clients, and productivity software. This means that you do not have to give out the root password on multi-user systems. However, server applications, such as web servers or databases, will prompt for the root password. This is to prevent a regular user from installing server software.
When a regular user installs an application, they have the option to "Install Menu Icons (All Users)", meaning that an application only needs to be installed once on a multi-user system. If you prefer to install PBIs from the command line, see the section on using pbi_add. PBIs are the recommended software installation method on PC-BSD®. Update Manager will automatically notify you when newer versions of software installed through the PBI system are available. PBIs will also be preserved over system upgrades and system meta-package changes. Installing and Uninstalling PBI SoftwareTo install a PBI, start AppCafe® by double-clicking its icon on the Desktop, going to Control Panel ➜ AppCafe®, or by typing appcafe from a command prompt. The "Browse" tab in AppCafe® can be used to browse for available software, as seen in Figure 7.1a, also shows that 1021 PBIs are available and 3 are currently installed on this system. If you know the name of the application you would like to install, type its name into the "Search" bar. Alternately, you can click on a software category (for example, "Archivers") to browse for available software. Use the back arrow or home icon to navigate within the browser. In the example shown in Figure 7.1b, the user searched for the "gimp" application then clicked on the "Gimp" search result.Figure 7.1b shows an example of the information that is available for each PBI:
Once you find a PBI that you would like to install, click on its Download icon. AppCafe® will automatically detect your PC-BSD® version and architecture and install the correct PBI for you. When the installation is complete, the new PBI will be displayed in the "Installed" tab. Figure 7.1c shows a screenshot of this tab from a system with several PBIs installed. If you right-click an installed PBI you can:
If you highlight a PBI and click the "More" button, the following actions will be added to that list of options:
Updating Installed PBIsThe "Installed" tab will also indicate if there are any newer versions available for the PBIs that you have installed. PBIs are created from the original FreeBSD package and automatically become available as an upgrade whenever the underlying package version changes. Figure 7.1e provides an example of a PBI that has a newer version available: In this example, the currently installed version of Firefox is 16.0.1_1 and version 16.0.2 is available. To upgrade this PBI, highlight its entry and click the "Update" button. Alternately, if updates are available for multiple PBIs and you wish to upgrade them all, click the "Update All" button. If the PBI "Requires Root", it will prompt you for the administrative password before starting the upgrade. A status bar will indicate the progress of the download and upgrade process. When the upgrade is complete, the entry will be updated to show the new version. The upgrade process will save all of the current version's settings. For example, when you upgrade Firefox, it will keep all of your bookmarks, history, and cache.PreferencesIf you click File ➜ Preferences, you will see the screen shown in Figure 7.1f. By default, an icon is added to the desktop (for window managers that support icons) whenever you install a PBI. Uncheck the box "Create desktop icons at install" to disable desktop icon creation. You can still elect to install a desktop icon on a per-PBI basis by right-clicking the PBI and selecting "Install Desktop Icons" as shown in Figure 7.1c. RepositoriesIf you click Repositories ➜ Configure Repository from within AppCafe®, you will see the screen shown in Figure 7.1g: This screen will list the official PC-BSD® repositories. AppCafe® reads this list, in order, when connecting to the software repository. You can use the up and down arrows to reorder the list. If you have created your own software repository of PBIs, use the "Add" button to add the URL of the repository. If you have created your own .rpo file using the pbi_makerepo command, you can use Repositories ➜ Add Repository to browse to the location of the .rpo file. This is the equivalent of manually running the pbi_addrepo command.
PBI ManagerPBI Manager is a suite of command line utilities which can be used to install, remove, create and manage PBIs. It is also available for FreeBSD systems. The PBI Manager is released under the BSD license[191]. FeaturesThe 9.x PBI format introduced the following features:
Additional ResourcesRelease History
What is the PBI format?One of the things holding back mainstream adoption of open source desktops is the package management format. With almost all open source desktops, software is simply treated as part of the operating system. Thus, when performing an update of some seemingly trivial application, you run the risk of potentially needing to upgrade other packages which could break other critical parts of your desktop. While package management systems have gotten better at resolving dependency issues, trying to fix conflicts to prevent breakage before it occurs, they still do not address the underlying problem: every software package is a part of the system, and pulling on any one thread has the potential of causing a break somewhere farther down the line. The PBI format tries to correct this underlying flaw. Rather than making every application a part of the base system, PBIs are self-contained, including their own dependent library tree and related data. As a result, when you install a PBI there are no dependency issues to resolve, and applications can be added or removed freely, without fear of causing breakage to the desktop or any other installed software. Installing PBI ManagerIf you are running PC-BSD® 9 or higher, then the PBI Manager is already installed, and you can use it via the command-line, or a front-end such as the AppCafe®. FreeBSD users can install it from the ports tree[194]. Users interested in installing the development version from our SVN repository[195] can do so with the following commands:
Getting PBI FilesA list of approved and available PBIs can be viewed with pbi_info -i or pbi_browser, and then installed with pbi_add -r <pbiname>.
Underlying File / Directory StructureThe underlying files and directories used by PBI Manager are as follows:
Feedback / Reporting ProblemsFeedback, problem reports, and general discussion are welcome on the PBI Developers Mailing list[196]. Command ReferenceThe following commands are installed by PBI Manager. For more details, refer to that command's man page. Note that single character commands can not be stacked. As an example, you must type pbi_add -i -v as pbi_add -iv will fail. pbi_add(1)Similar to FreeBSD's pkg_add, the pbi_add command is used for adding/installing PBIs on a system, either from a local file or remotely from a repository. This utility supports the options listed in Table 7.2a. All of the options, except for -r, assume that the .pbi file has already been downloaded and is in the current or specified directory.
For security reasons, it is recommend that users first use the -i -v and --checkscript options to view archive contents and installation scripts prior to installing a PBI file. To install a PBI from a remote repository, use: pbi_add -r name_of.pbi. The following example will install the alpine PBI on a 32-bit system:
PBI Manager will automatically detect the architecture and install the appropriate PBI. If only a 32-bit version is available and you are on a 64-bit system, the 32-bit PBI will be installed and will work correctly on the PC-BSD® system. If you previously downloaded the PBI, do not include the -r switch and give the fullname of the PBI:
pbi_addrepo(8)The pbi_addrepo command is used to register a new PBI repository on a system. If the pbid daemon is running, the repository's index and meta files will be automatically fetched and made ready for browsing. The command has one argument: the name of the repository file. Repository files have a .rpo extension and are created with the pbi_makerepo command. pbi_autobuild(8)The pbi_autobuild command is used on the PBI build system to build any out-of-date or new packages. It can traverse the FreeBSD ports and metadata trees, building missing PBI files or PBIs in which the target port version has been updated. Instructions for using this command to keep a custom repository up-to-date can be found in the section Configure the Automatic Build of Updated Ports. Table 7.2b summarizes this command's options:
pbi_browser(1)The pbi_browser command provides a CLI front-end to browsing a repository's available PBIs. Options for viewing categories and searching by keyword are available, and once the desired PBI is located, it will show the pbi_add command which can be used to install the application. Table 7.2c summarizes the available options.
pbi.conf(5)pbi.conf is an ASCII text configuration file containing values that are used by the various pbi_* commands. The proxy variables are only needed if the system uses a proxy server to access the Internet. Table 7.2d lists the supported variables.
pbi_create(1)The pbi_create command provides a way for packagers to manually specify a target directory to be compressed into a PBI file. The option -b can also be used to re-package an already installed PBI back to an archive. PBI creators are encouraged to send a tarball of the resulting PBI module to the PBI-dev mailing list[196] so they can be added to the PC-BSD® PBI repository and made available to other PC-BSD® users. Table 7.2e summarizes the available options:
As the superuser, you can create a PBI with the pbi_create command using the following syntax:
Inside the target directory place the application's binaries or scripts along with any required dependencies. To indicate which file(s) represent the runtime command(s), include a file named external-links in the target directory. That file contains an entry for each command, as seen in the following example:
This entry instructs pbi_create to make the wrapper scripts for the myapp binary, along with placing it in the user's PATH at install time. It is also possible to include desktop icons and mime entries using the xdg-mime/, xdg-desktop/ and xdg-menu/ directories. The section on how to Create PBIs contains more details about creating these files. These directories should be created as subdirectories of the target directory of your application. pbi_delete(1)Similar to FreeBSD's pkg_delete, the pbi_delete command removes an installed PBI from the system. It also schedules cleaning for the shared library directory, which is performed by pbid. Table 7.2f summarizes its options:
When removing a PBI, you must give its full name. The full name can be found in the output of pbi_info. The following example searches for the ntop PBI and removes it:
pbi_deleterepo(8)The pbi_deleterepo command can be used to remove a registered repository from the system. It takes the repository's ID as the only command argument. pbi_icon(1)The pbi_icon command provides a number of options for adding desktop icons, menu entries, and mime data for an installed PBI. Not all PBIs will contain desktop/menu/mime data. Additionally, the window manager must be XDG[197]-compliant to understand a PBI's icon and mime settings. Table 7.2g summarizes this command's options:
pbi_indextool(1)The pbi_indextool command is useful for repository maintainers. It allows PBI files to be added and removed from the repository's INDEX file. An example of using this command can be found in Create Your Own PBI Repository. Table 7.2h summarizes the available options:
pbi_info(1)Similar to FreeBSD's pkg_info command, the pbi_info command is used to determine which PBIs are currently installed. Table 7.2i summarizes the available options:
pbi_listrepo(1)The pbi_listrepo command manages installed repositories on a system. Table 7.2j summarizes this command's options:
Run the command without any options to list the IDs of the available repositories. pbi_makepatch(1)The pbi_makepatch command is automatically used by pbi_autobuild to create small *.pbp (Push Button Patch) files. These files can be downloaded to a user's system in order to update a PBI's version without re-downloading the entire archive. This allows users to download only the incremental changes when a PBI is upgraded. The command can also be run manually by providing two PBI archives to compare and generate a patch file for. Table 7.2k summarizes the available options:
pbi_makeport(1)The pbi_makeport command can be used by packagers to build a target FreeBSD port and convert it into a PBI file. Many options are provided to fine-tune the build process, and meta-data modules can also be specified to further improve the resulting PBI file. The first time this command is run, it will build a fresh chroot sandbox environment which can be used for clean-room building of the target port without affecting the host system. More details about how to create a PBI using this command, can be found in the PBI Module Builder Guide.
pbi_makeport, will attempt to create any users or groups that the underlying ports require during the PBI installation. If the PBI is being installed as non-root, it will instead provide a warning message regarding any users or groups that need to be manually created. For this functionality to work, the port must set USERS= or GROUPS= in its Makefile and provide the corresponding UID and/or GID entries. Table 7.2l summarizes the available options:
pbi_makerepo(1)The pbi_makerepo command allows repository maintainers to create a single *.rpo file containing various information about the new repository. This .rpo file can then be installed on the target system with pbi_addrepo. Table 7.2m summarizes the available options.
pbi_metatool(1)The pbi_metatool command provides a way for repository maintainers to modify the PBI metadata in their repository in order to add or remove application categories or specified PBIs. An example of using this command can be found in Create Your Own PBI Repository. Table 7.2n summarizes the available options:
pbi_patch(1)The pbi_patch command is used to update an installed PBI to a different version using a small diff Push Button Patch *.pbp file. This allows the user to perform an incremental upgrade of an installed PBI. The available options are summarized in Table 7.2o.
pbi_update(1)The pbi_update command is used to display information about which PBIs have available updates and to perform the updates. Table 7.2p summarizes the available options.
pbi_update_hashdir(1)The pbi_update_hashdir command is used by the pbid daemon to merge the contents of a PBI into the hash directory. pbid(8)The pbid command runs a small daemon which performs maintenance of installed PBIs, merges files into the shared hashdir, fetches the repository INDEX and meta files, and makes the adding and removing of PBIs much faster. It will automatically be started from the/usr/local/etc/rc.d/pbid startup script if pbid_enable="YES" is in the /etc/rc.conf file. This utility supports the option summarized in table 7.2q:
This command logs its output to /var/log/pbid.log. Check this log for errors should you experience any problems with PBI maintenance.
Update ManagerUpdate Manager provides a graphical interface that is used for updating the version of PC-BSD® and for applying security updates. It is also used to update installed PBIs, installed system components, and Warden® meta-packages. The 9.x series of PC-BSD® uses the GENERIC FreeBSD kernel in order to facilitate upgrading the operating system itself.This section describes how to use the Update Manager GUI to update PBIs or Warden® meta-packages and to apply system updates. Upgrading PC-BSD® demonstrates how to start an operating system upgrade from the GUI. Advanced users can use the following command line utilities to achieve the same results:
Status IconAn icon located in the system tray lets you determine at a glance if any of your installed PBIs are out-of-date, or if a system update is available. This icon has several possible states:
If you right-click the icon, you will see the menu shown in Figure 7.3a. If updates are available for installed PBIs, AppCafe® will also open to the "Installed" tab so that you can view the new versions which are available. By default, updates are checked every 24 hours or whenever you boot the system. You can check for updates at any time by selecting "Check for updates". Selecting "Start the Update Manager" from the right-click menu will open Update Manager so that you can review the available system update(s). Figure 7.3b shows a screenshot of Update Manager. If any updates are available, they will be listed; if your system is fully up-to-date, there will not be any entries. If you hover over a listed update, a pop-up menu will provide some details about the update. To install an update, check the update(s) that you wish to install and click the "Install selected updates" button. You can watch the progress of the update, as seen in Figure 7.3c: If the update requires a reboot, you will be notified to do so after the update has been installed. If a reboot is needed, clicking the "OK" button at the informational message will not automatically reboot the system, meaning you can continue to use your computer for other tasks while the system is being updated. Finish whatever you are doing and reboot the computer at a time that is convenient for you.
Meta Package Managerpc-metapkgmanager is the back-end command line utility used by the PC-BSD® installer, System Manager, Update Manager, and Warden® to manage meta-packages. Meta-packages are like system components, and include supported and unsupported desktops, development utilities, hardware drivers, and miscellaneous applications such as MythTV or XBMC. Beginning with version 9.1, PC-BSD® uses metapkgsets to determine which system components are available and which applications are installed with each system component. Currently, two metapkgsets are available: pcbsd which defines the available desktop components, and warden which defines the components available when creating a jail with Warden® or installing a PC-BSD® server. You can view the contents of these metapkgsets on trac[199]. The pc-metapkgmanager command can be used at the command line to install or delete meta-packages, update to the latest package set, or to change the default metapkgset. If you type the command without any options, it will display its usage:
Finding, Installing, and Uninstalling Meta-PackagesTo determine which meta-packages are available:
To view which meta-packages are available in an alternate metapkgset, specify the metapkgset name. For example, to view the available warden meta-packages from your desktop, use this command:
To permanently change the default metapkgset between pcbsd and warden, modify the PCBSD_METAPKGSET variable in /usr/local/etc/pcbsd.conf. To determine if a meta-package is installed, specify its "Meta Package" name as shown in the output of the pc-metapkgmanager list command. For example, to see if the Awesome desktop is installed:
To install the meta-package, use the add option and specify the meta-package name. Only the superuser can install meta-packages. If you do not specify the URL, the default mirror will be used. If you receive an error when downloading the package, you can change the default mirror in Control Panel ➜ System Manager ➜ Mirrors. The following example installs the Awesome meta-package. pc-metapkgmanager will provide messages regarding the status of the installation:
To delete an installed meta-package, specify its name. Only the superuser can uninstall meta-packages. As seen in the following example, pc-metapkgmanager automatically determines which dependent packages are still needed by other applications and which can be safely removed.
Upgrading Meta-Packagespc-metapkgmanager can also be used to determine if any meta-packages are out of date and to update meta-packages. To determine if any meta-packages have newer versions:
In this example, all meta-packages are at their latest versions. If any were out of date, you would instead receive the message "The following package updates are available:" followed by the names of the out-of-date meta-packages. To update a meta-package, use the pc-metapkgmanager update command followed by the name of the specific meta-package or the word all to update all out-of-date meta-packages. pc-metapkgmanager records any error messages to /tmp/.pc-metamanager.log. This log file automatically rotates whenever it reaches 5MB in size.
Create Your Own PBI RepositoryBy default, AppCafe® displays the PBIs which are available from the official PC-BSD® repository. It also supports custom repositories, allowing organizations to create PBIs for their own applications and to make them available to their users within AppCafe®. In order to create a custom repository, you need to:
This section describes these steps in more detail. Generate the Signing KeyRunning a repository requires that all the PBIs in the custom repository be digitally signed for security and identification purposes. In order to sign the PBIs, generate an OpenSSL key pair using the following commands:
These commands will create the files privkey.pem and pub.key. The privkey.pem file will be used to digitally sign your created PBI files and the pub.key file will be included with the repository configuration (.rpo) file. Create the RepositoryIn order to create the repository you will need a FTP, HTTP, or HTTPS server to host your repository's meta-data files and to store the repository's PBIs. The server can be a public URL on the Internet or a private LAN server, as long as it is accessible to your target audience. Once you have the URL to the server, create the repository's .rpo file using the pbi_makerepo command. Replace the values in the following example with your own description, path to your generated pub.key file, the URL to the location where the PBIs will be hosted, the URL to the location to contain the repository's meta-data files, and the directory to place the created .rpo file.
This command will generate the pbi-repo.rpo file in the specified directory on the server. This file is needed for clients to register with and begin using the new repository. Instruct your clients to download this file to their PC-BSD® desktop, then to configure their system to use the repository using this command as the superuser:
Once the repository is registered on the clients system, their pbi daemon will automatically keep track of downloading and updating both meta-files and PBIs from the URLs you specified in the repository configuration file. Generate the Repository's Meta-DataOn a PC-BSD® system, you can now create the meta-data and PBI files so that clients have something to download. The meta-data file is used to give the client information about the PBIs available from the repository, such as categories, application names, and descriptions. When creating categories, you can use the same category names that appear in AppCafe®, or you can create your own categories. Each category and each PBI will need its own icon. These icons need to exist on the server before generating the meta-data file. When you are ready, create an empty meta-data file in the format pbi-meta-<Major Version Number>. This command should be used for 9.x series PBIs:
Then use the pbi_metatool command to add the category for a PBI. The following command adds the "Archivers" category, its description, and the URL pointing to the mandatory 64x64 .png icon file to the specified meta-data file.
Next, add the following information about the PBI: the name of the application, the category, the application author, a description of the application, the URL pointing to the mandatory 64x64 .png icon file for the application, a comma delimited list (with no spaces) of search keywords, the type of license, the type of application ("Graphical", "Text", or "Service"), the URL to the application's website, and the name of the meta-data file to add the information to.
Repeat this command for each PBI that will be available in the repository, creating new categories as you need to do so. When you are finished adding the information for the repository's PBIs, compress the file with bzip2 and upload it to the server. The location in our example would be http://www.example.org/pbi-meta/pbi-meta-9.bz2. Once the file is uploaded, clients can use the pbi_browser command or AppCafe® to browse the repository's PBIs. You should now create your custom PBIs then upload them to their specified category in the download directory on the server. In our example, the download directory is ftp://ftp.example.org/pbi-files. Refer to the section on creating PBIs for instructions on creating PBIs using either the EasyPBI2 graphical utility or the pbi_makeport command line utility. When creating your PBIs, remember to sign them with the private key. If you are using EasyPBI2, specify the location to the privkey.pem file by clicking the "Change File" button shown in Figure 8.1d. If you are using the pbi_makeport command, include --sign privkey.pem in the command. Lastly, create the pbi-index-9 file and add the names of the uploaded PBIs to the file. Use the pbi_indextool to add each entry, specifying that PBI's filename (will end in .pbi), the download location (in the format category/pbi_name), and the name of the index file.
When you are finished adding entries to this file, use bzip2 to compress it and upload the pbi-index-9.bz2 to the same location on the server where the pbi-meta-9.bz2 file is stored. Clients can now download and install PBIs from your custom repository, using the pbi_add command or AppCafe®. Configure the Automatic Build of Updated PortsOver time, the PBIs in your repository will become out-of-date as the versions of the underlying ports change. You can automate the process of automatically rebuilding the newer version of a PBI, as well as generating the binary diff changes to the PBI (which users use to upgrade their installed version of the PBI), whenever an underlying port changes. To configure this scenario, ensure that all of your PBI modules exist under the same directory and follow the directory structure of the ports tree. For example, if you have created PBIs for cabextract and firefox, the subdirectory structure for /usr/local/my_pbis/ would be archivers/cabextract/ and www/firefox/. To start the build process, use the pbi_autobuild command as seen in this example:
This command keeps the last 2 versions of the PBI, reads the modules located in the subdirectories of /usr/local/my_pbis, places the built PBIs in the /usr/local/my_pbis directory, removes any PBIs which no longer have an associated module, uses tmpfs to optimize build speed, signs the PBIs with the specified key, and generates the .pbp patch files needed by users to upgrade an installed version of the previous PBI. The new PBIs and .pbp files will be placed in the specified outgoing directory. If an earlier version of the PBI exists in that directory, it will be placed into the archived subdirectory. If the ccache FreeBSD port is installed on the build system and the CCACHE_DIR variable is set, pbi_autobuild will detect and use it which can greatly speed up the process of building the PBIs. Depending upon the load on the build server and how many PBIs are affected by the build, you may wish to modify some pbi.conf values in particular PBI modules. The variables that can affect a build are:
Control PanelBeginning with version 9.0, PC-BSD® provides a Control Panel which contains tools for managing your system. The Control Panel is available from any desktop, meaning it is available regardless of which desktop you log into.If using an unsupported desktop that does not contain an icon or menu item for Control Panel, simply type pc-controlpanel from a shell prompt as an alternate method to launch the Control Panel. An open Control Panel window can be seen in Figure 8.a. The search box in the upper right will help to find the proper control panel item to use if you know what you would like to configure but are uncertain which one would handle it. Any icon that includes a yellow exclamation mark, will prompt for the superuser password in order to access that configuration utility.
Desktop SelectorControl Panel includes a desktop selector drop-down menu which allows you to view the configuration utilities from KDE3 and 4, GNOME2, XFCE3 and 4, or LXDE. Figure 8.b shows the desktop selector menu in use. In this example, the user is currently logged into the LXDE desktop but they have chosen to view the GNOME utilities. The icon will relate to the control panel view, while "(current)" will be beside the desktop that is presently active. If any other desktop were active, then "Unsupported DE (current)" would be shown. The icon used for unsupported desktops, when at least one is installed, looks like a window with a red 'X' on the lower left corner. Switching between the icons in the selector changes the icons displayed within the control panel window to match those used in that desktop. If "All" is set by the desktop selector, you will see every utility that is available, depending upon which desktops are currently installed. You can change which desktops are installed by using System Manager. This section demonstrates how to use the following utilities which are found in the Control Panel of a PC-BSD® system, regardless of the desktop that is installed:
EasyPBINOTE: this page is deprecated. Refer to EasyPBI2 instead. EasyPBI is a graphical application that makes it easy to build a PBI module from a FreeBSD port. Beginning with PC-BSD® 9.1, EasyPBI ships with PC-BSD® and can be found in the Control Panel. This section demonstrates how to use this utility to convert an existing FreeBSD port into a PC-BSD® PBI. You may wish to skim the section on how to Create PBIs first, as well as refer to that Guide should you have trouble creating a PBI or wish to create a more complex PBI.To start EasyPBI, double-click its icon in Control Panel or type EasyPBI from within an X terminal as your regular user account. If the ports collection is not installed, you will receive the message shown in Figure 8.1a the first time you start EasyPBI. If multiple users will be using the EasyPBI utility, go to Control Panel ➜ System Manager ➜ Tasks and click the Fetch Ports Tree button. Alternately, use the following command as the superuser portsnap fetch extract. Either of these methods will install the ports collection into /usr/ports. If you are the only user who will be using the EasyPBI utility, click OK to launch the main EasyPBI screen, shown in Figure 8.1b. Click File ➜ Get Ports which will download the ports collection to the EasyPBI subdirectory located in your home directory. If the ports collection was already installed or was installed using System Manager or portsnap, the message in the bottom area of the screen will instead indicate To get started, please push the New Module button. Creating a PBI ModuleBefore building a PBI, refer to the PBI Requests forum[200] to determine which PBIs have been requested by users. You should also check that a module does not already exist for the PBI in the PBI Modules[201] section of trac. Existing modules are listed alphabetically, according to their category in the ports collection. To create a new module, click the New Module button and use the browser to select the desired port from the FreeBSD ports tree. Once a port is selected, EasyPBI will attempt to automatically supply the port information for the PBI and display the results in the GUI. In the example shown in Figure 8.1c, the net/trickle port has been selected and the fields have been auto-filled in. You should review these fields for accuracy. If you click "Get Port Info" FreshPorts.org[187] will open in the default web browser so that you can view additional information about the port. A generic icon will be supplied for the module; you can change the default icon by clicking the Choose Icon button. When using a custom icon, use a 64x64 .png file with a transparent background. Check the Create Desktop/Menu Entries' if you wish the program's icon to be available on the desktop and in the desktop's application menu. Once the port information is complete, click the Create Module button and EasyPBI will produce the PBI module. The module will be named after the port and will be stored in a subdirectory of the EasyPBI/Modules directory in your home directory. In this example, the module is located in EasyPBI/Modules/trickle.Build the ModuleCreating the module itself is very quick and takes less than a minute. However, you still need to build and test the module to make sure that the application works as expected. Depending upon the complexity of the application, you may have to edit the initial module then rebuild and retest it until you are satisfied with the PBI for the application. Once the module is created, you are ready to build a PBI from the module. Click on the Build PBI tab and click the Select Module button to browse to the module you created. Figure 8.1d shows this tab with our example PBI selected. The top half of this screen contains modifiable settings which are used when building PBIs: Save Settings as Defaults: the settings in this section revert back to the default settings when you exit EasyPBI. This allows you to override the default settings for a particular build. If you wish your changes to be permanent, click this button. Output Directory: specifies the directory to store the built module. By default, it is the EasyPBI/PBI subdirectory of the user's home directory. Click the Change Directory button to select another location. Digital Signature File: the PBIs available from the PC-BSD® repositories are digitally signed by the PC-BSD® project's signature file. If you are creating your own repository, click the Change File button to select your own digital signature file. Create Your Own PBI Repository provides instructions for creating a signature file.Use TMPFS: if your build system has a lot of RAM, selecting this option can speed up the build. Use Package Caching: this setting is recommended as it reuses previously built packages to speed up subsequent builds. The rest of this screen is used to build the specified module: Select Module: select the previously created module to build. Build PBI: starts the build of the PBI module. It will prompt you for the superuser password and requires a working Internet connection in order to build the PBI. This process may take quite a while, depending upon the port selected and the speed of your computer. The build messages will be displayed in the window at the bottom of the tab. EasyPBI will inform you when the PBI build is finished, and whether it was successful or not. Stop Build: stops the build process. Click the Build PBI button to resume the build. Save Build Log: useful if the build fails. Will prompt you to select the location to store build.log which can be read with any ASCII text editor. You can produce additional modules from the Create Module tab while a PBI build is running. If the PBI build fails for some reason, you may need to modify the module as described in the next section. Use the build log to determine the error and modify the module as needed. If you are unsure how to fix the module, send the build.log for the failure to the pbi-dev mailing list[196]. Test and Fine-Tune the ModuleOnce your build is finished, test the PBI to ensure that it installs and that the application works. To install the PBI, become the superuser, cd to the "Output Directory", and use the pbi_add command. Unless you have specified your own digital signature, include the --no-checksig option.
If the module installs successfully, perform the following tests:
The Module Editor tab, seen in Figure 8.1e, can be used to modify the module's settings. Use the Select Module button to browse to the location of the module and to un-grey-out the settings in this screen. Several tabs are provided, allowing you to customize the PBI module. It should be noted that most PBI modules do not require you to make any configuration changes in the Module Editor tab. This tab allows the creation of more complex PBI modules that require additional FreeBSD ports or scripts which are not provided by the default FreeBSD port. The rest of this section describes the actions available within each tab. If you modify any settings in the PBI module, rebuild it then test again to see if the changes fixed the PBI. pbi.confTypically the Program Name, Program Website, and Program Author are left at their default values. If this information is incorrect, you should email the FreeBSD port maintainer shown in the Program Author field so that the information can be corrected in the FreeBSD port. If you choose to replace the Program Icon, use a 64x64 .png file with a transparent background.If your PBI requires a dependency that is not provided by the FreeBSD port, use the + button next to Make Port Before to select the needed port. If you wish an additional port to be included with your PBI, use the + button next to Make Port After to select the desired port. The Make Options field lets you specify a space separated list of options. The available options and their default settings will be listed in the OPTIONS= section of the port's Makefile. If the resulting PBI needs to be run as the root user, check the Require Root Permissions box. ResourcesThis tab, shown in Figure 8.1f, is used to add additional files to the PBI module. An example of an additional file would be an application that requires the user to accept a License. Use the + Add Resource button to browse to the location of the LICENSE file. Another example would be when you wish to use a custom script to start the application rather than starting the application binary directly. A custom script could also be used to verify that the service is enabled or to generate a custom configuration file. If the application uses custom installer graphics, add them using this screen. Desktop/Menu EntriesThis tab, shown in Figure 8.1g, is used to fine-tune the desktop icon and the application menu entry for the application. If the Create Desktop/Menu Entries box was checked when creating the module and EasyPBI detects that the application is graphical, the default entries for the application will be listed. In our PBI example, trickle is a command line application so no entries were created by default. If your application is graphical but EasyPBI did not detect it, you can manually add the desired entries using the Remove Desktop Entry and Remove Menu Entry buttons. Under Executable, the drop-down menu will display all of the binaries that came with the application. Select the binary that should launch when the user clicks the desktop icon or selects the application from the application menu. Alternately, you can select Custom Binary and input the path to the desired executable. The Entry Label field allows you to customize the name that will appear with the icon and application menu entry. The Icon drop-down menu allows you to select the .png file to use for the icon. This file must exist in ~/EasyPBI/Modules/PBI_name/resources in order to appear in the drop-down menu. Use the Select Module button to re-select the module if you add the icon after loading the module. The Menu Category drop-down menu is used to select the category the application menu entry will be added to. To add a desktop entry, select an Executable, input an Entry Label, and click the + Add Desktop Entry button. This will generate the .desktop file to be used by XDG-compliant desktops. The entry will appear under Current Desktop Entries. To add an application menu entry, select an Executable, input an Entry Label, and click the + Add Menu Entry button. The generated .desktop file will appear under Current Menu Entries. External-LinksThis tab, shown in Figure 8.1h, is used to customize how the specified binary starts. To customize how a binary starts, highlight it and click the Action drop-down menu. The possible actions are:
If you select an Action, use the up arrow to add it. If you change your mind, click the Clear Changes button. Submit the ModuleOnce you are satisfied with the PBI, go to the "Module Editor" tab and use the "Select Module" button to select the PBI's module. Then click the "Package Module" button. A pop-up window will indicate that the module has been compressed and that a .tar.gz file has been added to the PBI module directory. The file name for our example PBI is ~dru/EasyPBI/Modules/trickle.tar.gz. If you send that file to the pbi-dev mailing list[196], it will be added to the PC-BSD® build servers so that the 32- and 64-bit versions of the PBI can be built. Once the built PBIs are tested, they will be added to AppCafe® so that other PC-BSD® users can benefit from the PBI.
AboutThe "About" icon of Control Panel can be used to quickly find information about the PC-BSD system. To start the application, double-click its icon in Control Panel or type about-gui. An example is seen in Figure 8.2a. This screen displays the version of PC-BSD, the architecture, where i386 equals 32-bit and amd64 equals 64-bit, and the hostname of the system. The "FreeBSD base" section displays the version and architecture of the underlying FreeBSD system and the name of the kernel (ident). The "Hardware" section indicates the type of CPU and the amount of installed memory. If you click the "System components" button, the X.org version and the revision number of the command line and graphical utilities are displayed, as seen in the example shown in Figure 8.2b. If you click the "Desktop environments" button, the currently installed desktops will be displayed, as seen in the example shown in Figure 8.2c. If you wish to install additional desktops, use the System Packages tab of System Manager.
Active Directory & LDAPBeginning with PC-BSD® 9.1, the Control Panel contains an "Active Directory & LDAP" icon for managing connections to an Active Directory or OpenLDAP domain.
To start the application, double-click its icon in Control Panel or type pc-su pc-adsldap. You will be prompted to input the administrative password. Figure 8.3a shows the configuration utility with the Active Directory tab open. Connecting to Active DirectoryIf you need to connect to a network running Active Directory, check the box "Enable Active Directory". This will change the greyed-out status of the rest of the screen, allowing you to configure the following:
The values that you input using this GUI are saved to /usr/local/etc/pc-activedirectory.conf. Connecting to an OpenLDAP ServerFigure 8.3b shows the configuration utility with the LDAP tab open. If you need to connect to a network which contains a configured LDAP server, check the box "Enable LDAP". This will change the greyed-out status of the rest of the screen, allowing you to configure the following:
The values that you input into this tab are saved to /usr/local/etc/pc-ldap.conf. If you are new to LDAP terminology, you may find it useful to skim through the OpenLDAP Software 2.4 Administrator's Guide[204].
Hardware CompatibilityBeginning with version 9.1, the PC-BSD® installer allows you to quickly determine if your system's video card, Ethernet card, wireless device, and sound card are compatible with PC-BSD®. The "Hardware Compatibility" icon in Control Panel provides a quick overview of the system's detected hardware.To start the application, double-click its icon in Control Panel or open an xterm and type pc-sysinstaller -checkhardware. In the example shown in Figure 8.4a, this system has a detected NVIDIA video card with a configured resolution of 1600x900, one Ethernet device using the em(4)[205] driver, and one wireless device using the iwn(4)[206] driver. Currently no sound card is detected, meaning that the user should configure and test their sound card using the Sound Configuration icon in Control Panel. If the wireless device shows as unsupported, check the Wireless Testing page to help determine if a driver is forthcoming or if the device is well suited to converting a Windows driver into a FreeBSD loadable module. Hardware that is currently incompatible may show with a green checkbox after a system upgrade or update. This indicates that the update added the driver for the device.
GDM ConfigurationPC-BSD® uses the GNOME Display Manager (GDM[207]) as its graphical login program. This program was chosen for its support of keyboard layouts, localizations, and accessibility. Beginning with PC-BSD® 9.1, a GDM Configuration utility is available in Control Panel. Figure 8.5a shows the initial screen when you click on this icon in Control Panel or type pc-su pc-gdmconf at the command line. Note that this utility will prompt you for the administrative password. For security reasons, PC-BSD® defaults to a login screen. This means that users are required to input their password before logging into the PC-BSD® system. If you are the only user on the PC-BSD® computer, always use the same window manager, and do not consider it a security risk for the system to automatically boot into that window manager, you can enable auto-login using the "Auto login" tab. As seen in the example in Figure 8.5a, the "Enable auto login" box is unchecked by default. If you check the box, the "Auto login user" drop-down menu will be activated. Select the user account to automatically login as. You can also set a delay period (in seconds) to give time to cancel the auto-login, for example if you wish to log into a different desktop. The "Remote login" tab, shown in Figure 8.5b, is used to configure XDMCP[208], a protocol that comes with Xorg and allows a connection to an X session from a remote system. Uncheck the "Enable XDMCP" box to enable this service and expose the configuration options. By default, XDMCP uses UDP port 177, allows one connection per host, and allows up to 16 simultaneous sessions.
The "Misc" tab, shown in Figure 8.5c, is used to configure whether or not other computers are allowed to connect to your X server, which provides your GUI environment. For security reasons, no connections are allowed by default. If you check the "Allow incoming TCP X connections", other computers in your network may have access to your GUI. Use extreme caution when enabling this option as it can make your system available to anyone over the network. If you are enabling this option for troubleshooting purposes, uncheck this box immediately after finishing your troubleshooting session.
Service ManagerService Manager, seen in Figure 8.6a, provides a graphical utility for managing PC-BSD® services. Buttons make it easy to start, stop, or restart services and to set the highlighted service to be enabled or disabled whenever the system boots. To access this utility, go to Control Panel ➜ Service Manager or open an xterm then type pc-su pc-servicemanager. You will be prompted to input the administrative (also known as the "root" or "superuser") password.By default, services will be listed alphabetically. You can reorder the services by clicking on the "Service Name", "Running", or "Enabled" header. Service Manager is a graphical front-end to the rc scripts located in /etc/rc.d. PC-BSD® 9.2 will include an "Info" button where you can get a short description of the highlighted service. If you do not know what a service does, do not change its settings in Service Manager. If you would like to learn more about a service, try seeing if there is a man page for it. For example, type man apm or man bootparamd. If a man page does not exist, try seeing what man pages are associated with that keyword. For example:
System ManagerThis section describes the various tasks that can be performed using the graphical System Manager utility. System Manager can be accessed from Control Panel ➜ System Manager or by typing pc-sysmanager. Generating a Diagnostic ReportSystem Manager, shown in Figure 8.7a, is launched by clicking Control Panel ➜ System Manager. You will be prompted to input the administrative password to allow the System Manager window to open.The "General" tab displays the following system information:
The "Generate" button can be used to create a report that includes the following items:
When you click the "Generate" button, you will be prompted to input the name and location of the text file that will be created. Since it is a text file, you can view its contents in any text editor. When troubleshooting your system, this file is handy to include in your forum[101] post or mailing list[100] message. Setting an Update MirrorThe "Mirrors" tab of System Manager, seen in Figure 8.7b, allows you to configure which PC-BSD® mirror is used when installing applications or updates using AppCafe® or Update Manager. By default, PC-BSD® automatically checks its list of mirrors every day to ensure each mirror is operational. If you keep the default selection of "Use auto-detected mirrors", it will automatically choose the available mirror that is geographically closest to your location and your mirror will automatically change if you are travelling or if your current mirror goes down.Alternately, you can override the automatic selection by clicking "Select Mirror from list" and choosing a mirror in the drop-down menu. Occasionally, your selected mirror may become busy or unavailable. If you are unable to install a PBI or an update, try selecting another mirror from the drop-down list or change your selection back to "Use auto-detected mirrors". If your company maintains its own repository of PBIs or updates, you can select the "Specify a custom Mirror" button and input the IP address of the company's server. The mirror setting is saved to /usr/local/etc/pcbsd.conf, as seen in this example:
This provides the ability to change the mirror from the command line by editing the URL in that file to point to the desired mirror. Install/Uninstall Desktops and System ComponentsDuring the installation of PC-BSD® you had an opportunity to install desktops and system components. Should you wish to review these components, install missing components, or remove installed components, you can do so in the "System Packages" tab of System Manager, shown in Figure 8.7c.Check the boxes for the components that you wish to install, uncheck the boxes for the components that you wish to remove, then click the "Apply" button to perform the requested operations. This page contains a brief description of the available components. Install FreeBSD Source and PortsDuring the installation of PC-BSD® you had an opportunity to install FreeBSD source and ports. If you did not and wish to do so after installation, use the "Tasks" tab of System Manager, shown in Figure 8.7d: This tab provides a graphical interface for installing system source (using svn) or the ports tree (using portsnap). If you click the "Fetch System Source" button, a progress screen will indicate that sources are being downloaded to /usr/src/. Once the download is complete, a "Finished!" message will appear and you can click the "Close" button to exit this screen. If you click the "Fetch Ports Tree" button, a message will indicate that ports are being fetched and will indicate when this is complete by adding a "Finished!" message to the lower left corner of the message. Ports will be installed to /usr/ports/. Set Miscellaneous OptionsThe "Misc" tab of System Manager is seen in Figure 8.7e: The "Boot Screen" section of this tab allows you to configure whether or not the PC-BSD® splash image appears during boot and the language of the splash screen. Uncheck this box if you prefer to watch the boot messages instead of the splash image. Localized versions of the PC-BSD® splash screen are installed in the /usr/local/share/pcbsd/splash-screens/ directory. If you click the "Custom" button, you can browse to the location of a customized splash screen.
The "Other Options" section of this tab contains a checkbox to "Force IBUS keyboard input". Check this box if you wish to to input Chinese, Japanese, Korean or Indic characters using a Latin keyboard.
User ManagerThe PC-BSD® User Manager utility, seen in Figure 8.8a, allows you to easily add and delete users and groups, as well as change a user's or the administrative password. To access this utility, go to Control Panel ➜ User Manager or type pc-su pc-usermanager. You will need to input the administrative password in order to access this utility. In this example, the system has 2 user accounts. The dru account has the ability to become the superuser as the "Can administrate system" checkbox is checked. If you click the "Remove" button for a highlighted user, a pop-up menu will ask if you would like to also delete the user's home directory (along with all of their files). If you click "No", the user will still be deleted but their home directory will remain. If you have only created one user account, the "Remove" button will be greyed out as you need at least one user to be able to login to the PC-BSD® system.
The password for any user can be changed by first highlighting the user name then clicking the "Change Password" button. You will not be prompted for the old password in order to reset a user's password; this can be handy if a user has forgotten their password and can no longer log into the PC-BSD® system. If you click the "Change Admin Password" button, you can change the password that is used whenever you are prompted for administrative access. If you click the "Advanced View" button, this screen will change to show all of the accounts on the system, not just the user accounts that you created. An example is seen in Figure 8.8b. The accounts that you did not create are known as system accounts and are needed by the operating system or installed applications. You should not delete any accounts that you did not create yourself as doing so may cause a previously working application to stop working. "Advanced View" provides additional information associated with each account, such as the user ID number, full name (description), home directory, default shell, and primary group. System accounts usually have a shell of nologin for security reasons, meaning that an attacker cannot try to login to the system using that account name. Figure 8.8c shows the add user account creation screen that opens when you click the "Add" button.
This screen is used to input the following information when adding a new user or system account: Username: the name the user will use when they log in to the system; it is case sensitive and can not contain any spaces. If you are creating a system account needed by an application, use the name provided by the application's installation instructions. If the name that you choose already exists as an account, it will be highlighted in red and the utility will prompt you to use another name. Full Name: this field provides a description of the account and can contain spaces. If it is a user account, use the person's first and last name. If it is a system account, input a description to remind you which application uses the account. Home Directory: you can leave this field empty for a user account as the system will automatically create a home directory under /home/username. However, if you are creating a system account it is important to override this default by typing in /var/empty or /nonexistent unless the application's installation instructions specify that the account needs a specific home directory. Shell: this drop-down menu contains the shells that are available to users when they are at a command prompt. You can either keep the default or select a shell which the user prefers. Primary Group: if you leave the default button of "New Group" selected, a group will be created with the same name as the user. This is usually what you want unless you are creating a system account and the installation instructions specify a different group name. Note that the drop-down menu for specifying a group name will only show existing groups, but you can quickly create a group using the "Groups" tab. Password: the password is case-sensitive and needs to be confirmed. Once you have made your selections, press the "Ok" button to create the account. If you click the "Groups" tab, you can view all of the groups on the system, as seen in Figure 8.8d. This screen has 3 columns: Groups: shows all of the groups on the system. Available: shows all of the system and user accounts on the system in alphabetical order. Members: indicates if the highlighted group contains any user accounts. To add an account to a group, highlight the group name in the first column. Then, highlight the account name in the "Available" column. Click the right arrow and the selected account will appear in the "Members" column. You should only add user accounts to groups that you create yourself or when an application's installation instructions indicate that an account needs to be added to a group. If you click the "Add" button, a pop-up menu will prompt you for the name of the new group. Once you press "OK", the group will be added to the "Groups" column. If you click the "Remove" button, the highlighted group will automatically be deleted after you press the "Apply" button, so be sure to do this with care. Again, do not remove any groups that you did not create yourself or applications that used to work may stop working.
Bluetooth ManagerPC-BSD® 9.1 introduces a Bluetooth Manager which can be used to configure Bluetooth device pairing (authentication) and provides a graphical front-end to support FreeBSD's hcsecd(8)[212] daemon which controls the link keys and PIN codes used by Bluetooth pairing. FreeBSD supports all Bluetooth USB dongle devices that conform with Bluetooth specification v1.1. More information about FreeBSD's Bluetooth implementation can be found in the Bluetooth section of the FreeBSD Handbook[213]. To launch Bluetooth Manager, either click its icon in Control Panel or type pc-su pc-bluetoothmanager. You will be prompted for the administrative password. If you plug in in a Bluetooth USB dongle device and click on the "New Devices" tab, it should be displayed as it appears in Figure 8.9a. If the device is not found, a message in the lower half of the screen will prompt you to put the device in discovery mode and then to rescan by clicking the "Scan" button. If the device, such as a cell phone, requires a PIN key in order to access a service, use the "Saved Devices" tab to view and modify the pairing configuration. In the example shown in Figure 8.9b, the first three entries (Default, Dummy, and Dummy) are three FreeBSD sample entries and the fourth entry is for the inserted device. The sample entries are included as they provide examples of valid link keys and PIN codes. You can remove any entry by highlighting it and clicking the "Remove Device" button. To modify an existing configuration, highlight the device and click the "Configure" button. In the screen shown in Figure 8.9c, input the PIN code required by the provider. The system will automatically generate the link key for you. If you wish to add the Bluetooth Manager to the system tray, type pc-su pc-bluetoothtray and input the administrative password. The Bluetooth tray icon will only automatically appear in the system tray if the USB dongle is plugged in when you log into the system. Since the developers do not have access to every possible Bluetooth device, it is possible that your device will not be recognized. If this is the case, please take the time to send the details about the device to the testing mailing list[57] so that the developers can work with you to fix the issue.
Mount TrayThe Mount Tray application is used to facilitate the mounting and unmounting of filesystems and USB storage devices. It is included in the system tray, meaning that in can be used within any window manager that provides a system tray. If you remove the icon from the system tray, you can re-add it using Control Panel ➜ Mount Tray or by opening an xterm and then typing pc-mounttray &.Mounting USB DrivesTo access the contents of a USB drive, insert the USB drive and click the "Mount Tray" icon in the system tray. You will see a screen similar to Figure 8.10a.
In this example, a USB thumb drive was inserted and detected while logged into the KDE desktop. Click the "Mount" button next to the "USB DISK" entry to mount that device. As the device mounts, the "Mount" button will change to an "Eject" button and the contents of the drive will be displayed in the default file manager for the desktop. A list of available file managers can be found on the Files and File Sharing page. In this example, the dolphin file manager will open as it is the default KDE file manager. If the desktop does not provide a default file manager, "Mount Tray" will provide an "open with" dialogue so that you can select the utility to use to browse the contents of the USB device. When you are finished using the device, click the "Eject" button to unmount the device. A pop-up message will indicate that the device has been unmounted and that it is now safe to remove the device.
Accessing Data on Non-PC-BSD® PartitionsMount Tray also detects any non-PC-BSD® partitions of internal drives. Table 1.4a lists which filesystems are supported by Mount Tray. In the example shown in Figure 8.10a, this system is dual booting with Windows 7 on a Lenovo laptop. Windows 7 is using three partitions: one for the system drive, one for Lenovo recovery, and one containing the operating system. The Windows operating system drive has been mounted, meaning that its files can be viewed and modified while logged into PC-BSD®.
Sound ConfigurationBeginning with PC-BSD® 9.1, a "Sound Configuration" icon is available which automatically determines which audio devices are available and provides a button to play a test sound. To access this utility, use Control Panel ➜ Sound Configuration or type pc-soundconfig from within an xterm.An example of the "Sound Configuration" screen is shown in Figure 8.11a. To determine which audio devices are available, click the drop-down menu. In the example shown in Figure 8.11b, this system has four available sound devices with the FreeBSD device names pcm0 to pcm3. The default device is the Conexant CX20590 on pcm2. To change the default audio device, select the desired device from the drop-down menu and test that it works by clicking the "Test sound" button. To make the change permanent, click the "Apply" button. If you connect a USB headset, PC-BSD® will detect the new device and will automatically change the audio device to the USB input. At this time, if you insert a headset into an audio jack, the system will not detect the new input so you will have to manually change the default device using "Sound Configuration".Troubleshooting SoundIf you are unable to get sound working using the sound configuration utility, you can try using mixer from the command line. As your regular user, type mixer to see your current settings:
If any of these settings are set to 0, set them to a higher value, by specifying the name of the mixer setting and a percentage value up to 100:
If you only get one or two mixer settings instead of the example output shown above, you need to change the default mixer channel. As the superuser, try this command:
To see if that changed to the correct channel, type mixer again. If you still only have one or two mixer settings, try setting the sysctl value to 2, and if necessary, to 3. Once you have all of the mixer settings and none are set to 0, your sound should work. If it still doesn't, these resources may help you to pinpoint the problem: If you still have problems with sound, see the section on Finding Help to determine which help resources are available. When reporting your problem, include your version of PC-BSD® and the name of your sound card.
DisplayDisplay wizard can be used to configure your video driver and display settings. To access the display wizard, go to Control Panel ➜ Display or reboot the system and select "6 Run the Display Wizard" from the boot menu. If you start the display wizard from Control Panel, you will receive the message shown in Figure 8.12a: If you are not ready to reboot the system, press "No" and restart the Display wizard when you are ready. Once you select "Yes", you will be prompted for the superuser password. The system will then reboot into the display wizard, shown in Figure 8.12b: This screen can be used to select the desired screen resolution, color depth, and video driver. If you select the "vesa" driver, it will always work but will provide sub-optimal performance. Click on the drop-down menu to select the driver that most closely matches your video card name.
You can also use the drop-down menus to change the screen resolution and color depth values. If the value you desire is not listed, it may be that the selected driver does not support that resolution or depth. Advanced users can select their monitor's horizontal sync and vertical refresh rate in the "Advanced" tab, seen in Figure 8.12c: Use caution and refer to your monitor's documentation if you make any changes here. If you are not sure what you are doing, leave the default values as-is. If your computer is connected to two monitors, check the box "Enable Dual-Head support". When you are finished, click the "Apply" button for your settings to be tested. If anything goes wrong during testing, you should be taken back to the "Display Settings" screen so that you can try another setting. Once you are satisfied with the settings, click "Yes" when prompted to accept them. Desktop Effects, Compiz, and CompositingTo prevent problems with video cards that do not support them, desktop effects (used by KDE) and compiz or compositing (used by other window managers) are disabled by default. You can change this default if your video card supports desktop effects. To enable desktop effects while logged into KDE, click Control Panel ➜ System Settings ➜ Desktop Effects to access the configuration screen shown in Figure 8.12d. Check the box "Enable desktop effects at startup". You can use the "All Effects" tab to get more information about each possible effect and to enable the effects that interest you. If XFCE is installed, you can enable compositing from any logged in desktop. Go to Control Panel ➜ Window Manager Tweaks ➜ Compositor. If Window Manager Tweaks does not appear in the Control Panel menu, use the desktop selector drop-down menu to select "All" or "XFCE". In the screen shown in Figure 8.12e, check the "Enable display compositing" box to enable the compositing options. If you do not use KDE or XFCE, install Compiz[216] instead using Control Panel ➜ System Manager ➜ System Packages ➜ Misc ➜ Compiz. Once installed, you can configure Compiz by clicking System ➜ Preferences ➜ CompizConfig Settings Manager while logged into GNOME or by typing ccsm from any desktop. This will open the screen shown in Figure 8.12f. TroubleshootingUntil TTM is ported to PC-BSD®, ATI/Radeon video cards will not be fully supported. If the screen goes blank or otherwise does not work when you select the HD version of the driver, selecting the non-HD version should allow you to use the card. Radeon HD5xxx and higher GPUs have no support for acceleration, 2D or 3D. At this time, these video cards can only use the Vesa driver. If you are having problems with your display settings and would like to manually edit /etc/X11/xorg.conf or run Xorg --config, first tell the PC-BSD® system to not automatically start X. You can temporarily stop your current X session and prevent additional sessions from starting by typing this command as the superuser:
This will drop you down to a console where you can try the instructions in the FreeBSD Handbook[217] to manually configure and test Xorg. Once you have a configuration that works for you, save it to /etc/X11/xorg.conf, and restart gdm to test the configuration:
If your graphics white-out after a suspend or resume, try running this command as the superuser:
If that fixes the problem, carefully add this line to /etc/sysctl.conf:
If the monitor goes blank and does not come back, try running this command as your regular user account:
If that fixes the problem, add that line to the .xprofile file in your home directory.
PrintingLike many open source operating systems, PC-BSD® uses the Common Unix Printing System (CUPS[218]) to manage printing. Control Panel provides a graphical front-end for adding and managing printers. While the graphical utility is easy to use, it may or may not automatically detect your printer depending upon how well your printer is supported by an open source print driver. This section will walk you through a sample configuration for a HP PhotoSmart 3210 printer. Your printer may "just work", allowing you to breeze through the configuration screens. If your printer configuration does not work, read this section more closely for hints on how to locate the correct driver for your printer. Researching your PrinterBefore configuring your printer, it is worth the time to see if a print driver exists for your particular model, and if so, which driver is recommended. If you are planning to purchase a printer, this is definitely good information to know beforehand. You can look up the vendor and model of the printer in the Open Printing Database[219] which will indicate if the model is supported and if there are any known caveats with the print driver. Figure 8.13a shows a search for our example printer. While the particular model is 3210, the closest driver is in the 3200 series. Once the model is selected, click on the "Show this printer" button to see the results, as demonstrated in Figure 8.13b. For this model, the HPLIP driver is recommended and the printer is compatible to the HP DeskJet 990C. In PC-BSD®, the HPLIP driver is available as an optional system component. You can see if the driver is installed, and install it if it is not, using Control Panel ➜ System Manager ➜ System Packages ➜ Hardware-Drivers as seen in Figure 8.13c. Adding a PrinterOnce you know that your printer is supported, make sure that the printer is plugged into your computer or, if the printer is a network printer, that both your computer and the printer are connected to the network. Then, go to Control Panel ➜ Printing or type pc-su system-config-printer. Input the administrative password to see a window similar to Figure 8.13d: To add a new printer, click New ➜ Printer. The printing utility will pause for a few seconds as as the wizard searches to see if any printers are connected to your computer or network. When it is finished, you should see a screen similar to Figure 8.13e. In this example, the wizard has found this printer and highlighted the entry for HP Photosmart 3200 (MY65BB21VW045K). The wizard should find any supported printer that is attached to the computer or network and list it as the highlighted entry in the "Devices" frame. If it does not automatically find your printer, read the section Manually Adding a Driver. If it finds your printer, simply click "Forward" to advance to the screen shown in Figure 8.13f: Since the configuration wizard found the printer in the previous screen, the "Describe Printer" screen automatically fills out the printer model series, a description, and the hostname of your computer, if the printer is locally attached, or the hostname of the network printer. If you wish, you can change the printer's name or description. Once you click the "Apply" button, the wizard will ask if you would like to print a test page. Ensure the printer has paper and click "Yes" to print the test page. If you can not print a successful test page, see the Printer Troubleshooting section. Once the printer is created, a screen will open where you can set the properties of the printer. Our sample printer's properties screen is shown in Figure 8.13g: You may wish to take a few minutes to review the settings in "Policies", "Access Control", "Printer Options", and "Job Options" tabs as these allow you to configure options such as print banners, permissions, the default paper size, and double-sided printing. The available settings will vary, depending upon the capabilities of the print driver. Manually Adding a DriverIf the print configuration wizard does not automatically list your printer, double-check that it is supported as described in the Researching your Printer section and that HPLIP is installed if it is a HP printer. Also check that the printer is plugged in and powered on. You can also try to manually add your printer. In the "Select Device" screen (Figure 8.13e) you will need to highlight and configure the type of connection to the printer: USB: this entry will only appear if a printer is plugged into a USB port and the number of entries will vary depending upon the number of USB ports on the system. If there are multiple USB entries, highlight the one that represents the USB port your printer is plugged into. Other: this option allows you to manually type in the URI to the printer. A list of possible URIs is available on the cups site[220]. AppSocket/HP JetDirect: select this option if you are connecting to an HP network printer. You will need to input the IP address of the printer in the "Host" field. Only change the port number if the printer is using a port other than the default of 9100. IPP: select this option if you are connecting to a printer cabled to another computer (typically running a Microsoft operating system) that is sharing the printer using IPP. You will need to input the IP address of the printer in the "Host" field and the name of the print queue. You can then click the "Verify" button to ensure that you can connect to the print queue. LPD/LPR: select this option if you are connecting to a printer which is cabled to a Unix computer that is using LPD to share the printer. You will need to select the hostname and queue name from the drop-down menus. After making your selection and clicking "Forward", you will see the screen in Figure 8.13h. This screen provides three options for installing the driver. When selecting the driver, look for the one that was recommended by the Open Printing Database for your model.
Printer TroubleshootingIf you have followed the instructions in Adding a Printer but are unable to successfully print, you may find your answer here. Here are some solutions to common printing problems: A test page prints but it is all garbled: this typically means that you are using the wrong driver. If your specific model was not listed, click the "Change" button in the "Driver Details" section of the "Settings" tab of the printer and try choosing another driver model that is close to your model number. If trial and error does not fix the problem, see if there are any suggestions for your model in the Open Printing database[219]. A web search for the word freebsd followed by the printer model name may also help you to find the correct driver to use. Nothing happens when you try to print: in this case, type tail -f /var/log/cups/error_log in a console and then print a test page. The error messages should appear in the console. If the solution is not obvious from the error messages, try a web search for the error message. If you are still stuck, post the error, the model of your printer, and your version of PC-BSD® to either the Hardware Support[221] forum or the Support Mailing List[100].
ScannerBeginning with PC-BSD® 9.1, Control Panel provides an icon for accessing XSane[222], a graphical utility for managing scanners. To use your scanner, make sure the device is plugged into the PC-BSD® system and click Control Panel ➜ Scanner icon, or type xsane from the command line. A pop-up message will indicate that XSane is detecting devices and will prompt you to accept the XSane license if a device is detected. If a device is not detected, search for your device at the list of supported scanners[223].
Figure 8.14a shows the XSane interface running on a PC-BSD® system attached to an HP OfficeJet. The XSane Documentation[224] contains details on how to perform common tasks such as saving an image to a file, photocopying an image, and creating a fax. It also describes all of the icons in the interface and how to use them. By default, XSane uses the default browser when you click F1 to access its built-in documentation. How to configure the default browser varies by window manager so you may need to do an Internet search if you need to set that configuration setting and can not find it.
Network ConfigurationDuring installation, PC-BSD® configures your Ethernet interfaces to use DHCP and provides a post-install configuration screen to configure your wireless connection. In most cases, this means that your connected interfaces should "just work" whenever you use your PC-BSD® system. For desktops that provide a system tray, a wireless configuration icon will appear if PC-BSD® detects a supported wireless card. If you hover over the wireless icon, shown in Figure 8.15a, it will indicate if the interface is associated and provide information regarding the IP address, IPv6 address, SSID, connection strength, connection speed, MAC address, and type of wireless device. If you right-click the wireless icon, you will see a list of detected wireless networks. Simply click the name of a network to associate with it. The right-click menu also provides options to configure the wireless device, start the Network Manager, restart the network (useful if you need to renew your DHCP address), and to close the Network Monitor so that the icon no longer shows in the system tray. If you have multiple wireless devices, each will have its own icon in the system tray. If you do not use one of the devices, click Close the Network Monitor to remove it from the tray. To view or manually configure all of your network interfaces click Control Panel ➜ Network Configuration or type pc-su pc-netmanager. If a new device has been inserted (e.g. a USB wireless interface), a pop-up message will open when you start Network Configuration, indicate the name of the new device, and ask if you would like to enable it. Click Yes and the new device will be displayed with the list of network interfaces that PC-BSD® recognizes. In the example seen in Figure 8.15b, the system has one Realtek Ethernet interface that uses the em driver and a wireless interface that uses the wlan driver. The rest of this section describes each tab of the Network Configuration utility and demonstrate how to view and configure the network settings for both Ethernet and wireless devices. It will then present some common troubleshooting scenarios, known issues, and suggestions for when a device does not have a built-in driver. Devices: Ethernet AdaptersIf you highlight an Ethernet interface in the Devices tab and either click the Configure button or double-click the interface name, you will see the screen shown in Figure 8.15c: There are two ways to configure an Ethernet interface:
By default, PC-BSD® will attempt to obtain an address from a DHCP server. If you wish to manually type in your IP address, check the box "Assign static IP address". Type in the IP address, using the right arrow key or the mouse to move between octets. Then, double-check that the subnet mask (Netmask) is the correct value and change it if it is not. If the Ethernet network uses 802.1x authentication, check the box "Enable WPA authentication" which will enable the "Configure WPA" button. Click this button to select the network and to input the authentication values required by the network. By default, the "Disable this network device" box is unchecked. If you check this checkbox, PC-BSD® will immediately stop the interface from using the network. The interface will remain inactive until this checkbox is unchecked. The "Advanced" tab, seen in Figure 8.15d, allows advanced users to change their MAC address[225] and to use DHCP to automatically obtain an IPv6 address[226]. Both boxes should remain checked unless you are an advanced user who has a reason to change the default MAC or IPv6 address and you understand how to input an appropriate replacement address. The "Info" tab, seen in Figure 8.15e, will display the current network address settings and some traffic statistics. If you make any changes within any of the tabs, click the "Apply" button to activate them. Click the "OK" button when you are finished to go back to the main Network Configuration window. You can repeat this procedure for each network interface that you wish to view or configure. Devices: Wireless AdaptersIf your wireless interface does not automatically associate with a wireless network, you probably need to configure a wireless profile that contains the security settings required by the wireless network. Double-click the wireless icon in the system tray or highlight the wireless interface displayed in the "Devices" tab of Network Configuration and click the "Configure" button. Figure 8.15f demonstrates that this system's wireless interface is currently not associated with any wireless networks as none are listed in the "Configured Network Profiles" section: To associate with a wireless network, click the "Scan" button to receive the list of possible wireless networks to connect to. Highlight the network you wish to associate with and click the "Add Selected" button. If the network requires authentication, a pop-up window will prompt you for the authentication details. Input the values required by the network then click the "Close" button. PC-BSD® will add an entry for the network in the "Configured Network Profiles" section. If the network is hidden, click the Add Hidden button, input the name of the network in the pop-up window, and click "OK". If you add multiple networks, use the arrow keys to place them in the desired connection order. PC-BSD® will try to connect to the first profile in the list and will move down the list in order if it is unable to connect. When finished, click the "Apply" button. A pop-up message will indicate that PC-BSD® is restarting the network. If all went well, there should be an IP address and status of "associated" when you hover over the wireless icon in the system tray. If this is not the case, double-check for typos in your configuration values and read the section on Troubleshooting Network Settings. PC-BSD® supports the types of authentication shown in Figure 8.15g. You can access this screen (and change your authentication settings) by highlighting an entry in the "Configured Network Profiles" section and clicking the "Edit" button. This screen allows you to configure the following types of wireless security:
If you wish to disable this wireless interface, check the Disable this wireless device box. This setting can be desirable if you want to temporarily prevent the wireless interface from connecting to untrusted wireless networks. The Advanced tab, seen in Figure 8.15k, allows you to configure the following:
The Info tab, seen in Figure 8.15l, shows the current network status and statistics for the wireless interface: Network Configuration (Advanced)The Network Configuration (Advanced) tab of the Network Configuration utility is seen in Figure 8.15m. The displayed information is for the currently highlighted interface. If you wish to edit these settings, make sure that the interface that you wish to configure is highlighted in the Devices tab. If the interface receives its IP address information from a DHCP server, this screen allows you to view the received DNS information. If you wish to override the default DNS settings or set them manually, check the Enable Custom DNS box. You can then set the following: DNS 1: the IP address of the primary DNS server. If you do not know which IP address to use, click the Public servers button to select a public DNS server. DNS 2: the IP address of the secondary DNS server. Search Domain: the name of the domain served by the DNS server. If you wish to change or set the default gateway, check the Enable Custom Gateway box and input the IP address of the default gateway. The following settings can be modified in the IPv6 section: Enable IPv6 support: if this box is checked, the specified interface can participate in IPv6 networks. IPv6 gateway: the IPv6 address of the default gateway used on the IPv6 network. IPv6 DNS 1: the IPv6 address of the primary DNS server used on the IPv6 network. If you do not know which IP address to use, click the Public servers button to select a public DNS server. IPv6 DNS 2: the IPv6 address of the secondary DNS server used on the IPv6 network. The Misc section allows you to configure these options: System Hostname: the name of your computer. It must be unique on your network. Enable wireless/wired failover via lagg0 interface: the lagg[227] interface allows you to seamlessly switch between using an Ethernet interface and a wireless interface. If you want this functionality, check this box.
If you make any changes within this window, click the Save button to apply them. Proxy SettingsThe Proxy tab, shown in Figure 8.15n, is used when your network requires you to go through a proxy server in order to access the Internet. Check the Proxy Configuration check box to activate the settings. The follow settings can be configured in this screen: Server Address: enter the IP address or hostname of the proxy server. Port Number: enter the port number used to connect to the proxy server. Proxy Type: choices are "Basic" (sends the username and password unencrypted to the server) and "Digest" (never transfers the actual password across the network, but instead uses it to encrypt a value sent from the server). Do not select "Digest" unless you know that the proxy server supports it. Specify a Username/Password: check this box and input the username and password if they are required to connect to the proxy server. Proxy settings are saved to the /etc/profile and /etc/csh.cshrc files so that they are available to the PC-BSD® utilities as well as any application that uses fetch. Applications that did not come with the operating system, such as web browsers, may require you to configure proxy support using that application's configuration utility. Troubleshooting Network SettingsWhile Ethernet networking usually "just works" on a PC-BSD® system, users sometimes encounter problems, especially when connecting to wireless networks. Sometimes the problem is due to a configuration error; sometimes a driver is buggy or is not yet available. This section is meant to help you pinpoint the problem so that you can either fix it yourself or give the developers the information they need to fix or create the driver. Useful Files and CommandsWhen troubleshooting your network configuration, use the following files and commands: /etc/rc.conf This file is read when the system boots up. In order for the system to configure an interface at boot time, an entry must exist for it in this file. Entries are automatically created for you during installation for each interface that is active. An entry will be added (if it does not exist) or modified (if it already exists) when you configure an interface using the Network Configuration utility. Here is an example of the rc.conf entries for an ethernet driver (em0) and a wireless driver (run0):
When reading through your own file, look for lines that begin with ifconfig. For a wireless interface, also look for lines containing wlans.
/etc/wpa_supplicant.conf This file is used by wireless interfaces and contains the information needed to connect to a WPA network. If this file does not already exist, it is created for you when you enter the "Configuration" screen of a wireless interface. ifconfig This command shows the current state of your interfaces. When reading through its output, check that your interface is listed, has a status of "active", and has an IP address. Here is a sample ifconfig output showing the entries for the re0 Ethernet interface and the run0 wireless interface:
In this example, the ethernet interface (re0) is active and has an IP address. However, the wireless interface (run0, which is associated with wlan0) has a status of "no carrier" and does not have an IP address. In other words, it has not yet successfully connected to the wireless network. dmesg This command lists the hardware that was probed during boot time and will indicate if the associated driver was loaded. If you wish to search the output of this command for specific information, pipe to grep as seen in the following examples:
pciconf If your interface does not show up in ifconfig or dmesg, it is possible that a driver for this card is not provided with the operating system. If the interface is built into the motherboard of the computer, you can use the pciconf command to find out the type of card. Here is an example:
In this example, there is a built-in Ethernet device that uses a driver that supports the RTL8168/8111/8111c chipsets. As we saw earlier, that driver is re0. The built-in wireless device was also found but the "?" indicates that a driver for the RTL8191SE chipset was not found. A web search for "FreeBSD RTL8191SE" will give an indication of whether a driver exists (perhaps in a version of FreeBSD that has not been released yet) or if a driver is being developed. You can also use a web search to locate a Windows driver and try using the ndisgen command, as described on this testing page[40], to convert it to a FreeBSD driver. The FreeBSD Handbook chapter on Wireless Networking[228] provides a good overview of how wireless works and offers some troubleshooting suggestions. If a Driver Does Not ExistIf a FreeBSD driver does not exist for your wireless card, you may be able to convert a Windows driver to a FreeBSD kernel module using the instructions on the Wireless Testing page. If your chipset is not listed in Table 1 of that page, please add an entry indicating whether or not you were able to successfully convert and use the driver for your architecture. If you are still unable to get your network interface to work, see the section on Finding Help. When describing your problem, include the following information:
Known IssuesThe bge(4) Ethernet driver has a known issue[229] where the interface is seen but does not respond to networking requests. Carefully adding this line to /boot/loader.conf and rebooting should solve this issue.
Firewall ManagerPC-BSD® uses the PF firewall[9] to protect your system. By default, the firewall is configured to let your system make Internet connections, use the ping utility, and to communicate with other Windows and Unix-like systems using SMB and NFS. Advanced users who are already familiar with pf will find the default rulebase in /etc/pf.conf. Users who are not familiar with directly editing this file can instead use the Firewall Manager GUI utility to view and modify the existing firewall rules.
To access the Firewall Manager, go to Control Panel ➜ Firewall Manager or open an xterm and type pc-su pc-pfmanager. You will be prompted to input the administrative password. Figure 8.16a shows the initial screen when you launch this utility: The "General Settings" tab of this utility allows you to:
To view or modify the firewall rules, click on the "Exceptions" tab, seen in Figure 8.16b: In this example, the user has clicked on the "Add entry" button to add a new firewall rule. The following information is needed when creating a rule:
Once you have made your selections, press "Ok" to save the new rule.
Test that your new rule(s) work as expected. For example, if you create a rule to allow an SSH connection, try connecting to your PC-BSD® system using SSH to verify that the firewall is now allowing the connection.
Life PreserverThe built-in Life Preserver utility allows you to automate backups of /usr/home/ which contains the home directory for each user account created on the PC-BSD® system. Backups are stored on a remote system; for the purposes of this section, we will refer to the remote system as a backup server. Life Preserver uses SSH and rsync, meaning that the backup server must have SSH and rsync installed. If the backup server is another PC-BSD® system, these are already installed and configured for you. If the remote system is running another operating system, you will have to ensure that SSH and rsync are installed and that SSH is listening for connections. Regardless of the operating system on the backup server, you will need to open TCP ports 22 and 873 using the firewall software installed on the backup server.
Life Preserver is not the only way to make a backup. For example, you may find it easier to drag and drop the files/directories that you wish to backup to an external device, such as a USB drive, using one of the file manager utilities listed File Managers. You can also find a few PBIs of backup utilities using AppCafe®. The advantage of Life Preserver is that it allows you to easily schedule backups of your home directory to a backup server. Creating a Backup ScheduleA shortcut to the Life Preserver utility, seen in Figure 8.18a, can be found in the system tray. This icon is animated and will indicate when a backup is taking place. If you right-click the icon, the menu provides options to minimize (if the Life Preserver window is open), to perform a restore (if a backup exists), to start Life Preserver whenever the current user logs in, or to quit (remove the icon from the tray). To start the backup wizard shown in Figure 8.18b, double-click the icon, or click Control Panel ➜ Life Preserver, or type life-preserver at the command line. Once you click the "Get Started" button, the "Add New Life Preserver Wizard" will launch, allowing you to configure a backup. Click "Next" to see the screen in Figure 8.18c: You will need to input the following information: Host Name: of the remote system that will store your backup. If the backup server is on your local network, the host name must be in your hosts file or in the database of the local DNS server. You may find it easier to instead input the IP address of the backup server as this will eliminate any host name resolution problems. User Name: this user must have permission to log in to the system that will hold the backup. If the account does not already exist, you should create it first on the backup server. SSH Port: port 22, the default port used by SSH is selected for you. You only need to change this if the remote system is using a non-standard port to listen for SSH connections. In that case, use the up/down arrows or type in the port number.
Once you click the "Next" button, you can decide whether or not to schedule regular backups, as seen in Figure 8.18d: By default, automatic backups are disabled, meaning you will have to manually start a backup when you wish to do so. If you decide to automate backups, you can choose to backup daily or weekly. After making your selection, click "Next" and you will see the informational message in Figure 8.18e: Click the "Finish" button and a terminal will open where you can enter the password for the user account you specified, as seen in the example in Figure 8.18f: If this is the first time using SSH to connect to this host, you will have to type yes to accept the RSA key fingerprint before being prompted to type in the password. If the connection is successful, the terminal will close and your new preserver will be listed in the main panel, shown in Figure 8.18g: The entry contains the following information: Backup Server: will indicate the user account and IP address of the backup server. Last Backup: will indicate whether or not there is a last backup and if there is a successful backup, the time and date of that backup. If you chose to automate backups, the first backup will happen immediately. Otherwise, a backup will not occur until you press the "Start" button. How long the first backup takes depends upon the size of your home directory and the speed of your network. If the backup is unsuccessful, logs can be found in /usr/local/share/lifePreserver/preservers/<preserver_name>/logs/. This post[232] explains the meaning of the various characters found in the logs. Frequency: will indicate "disabled", "daily", or "weekly". Status: Running… indicates that the backup is occurring now, otherwise it will show as Not running. The backup will be stored on the remote system in the home directory of the user that was used by Life Preserver to login. The contents of the backup will be found in the life-preserver/<backup>/ subdirectory where <backup> is named according to the date and time stamp of the backup. The contents of the directory will mirror the directory structure of your home directory, making it very easy to find and restore individual files or directories from the backup server to your PC-BSD® system. Configuration OptionsIf you right-click a preserver and select "Edit", you will see the configuration screen shown in Figure 8.18h. This screen allows you to configure the following: Number of backups to keep: make sure that there is enough disk space on the backup server to store this amount of backups. If you do daily backups, a setting of 7 will keep a week's worth. If you do weekly backups, a setting of 4 or 5 will keep about a month's worth. Remove incomplete or failed backups: by default, Life Preserver attempts to conserve disk space on the backup server by removing any failed backups. Uncheck this box if you are troubleshooting Life Preserver. Disable automatic backups: if this is selected, a backup will only occur when you manually press the "Start" button. Backup daily: if this is selected, a backup will occur once per day. Backup weekly: if this is selected, a backup will occur once per week. Remote directory: a subdirectory with the name you specify will be created in the home directory of the user that logs in to the SSH server. This is the location where backups will be stored. The default subdirectory name is life-preserver. Modify include list: provides a graphical List Editor, seen in Figure 8.18i, for adding files/directories to include in the backup. Modify exclude list: opens the List Editor in order to add the files/directories to exclude from backups. When using List Editor, it will indicate whether or not you are editing the include or the exclude list. Use the browse button to select the files or directories that you wish to include or exclude. Alternately, you can type in a wildcard. For example, to select all files ending in the .txt extension, input *.txt. Restoring a BackupTo restore files from a backup, right-click the preserver entry and select "Restore From". Life Preserver will query the backup server and show a list of available backups as seen in the example in Figure 8.18j: When reading the backup name, the number before the "T" is the date in YYYY-MM-DD format and the number after the T is the date stamp in HH_MM_SS format. Highlight the backup you wish to restore and click the "Select Backup" button to open the window seen in Figure 8.17k: If you wish to restore an individual file or directory, input its full path. In the example shown in Figure 8.18k, the user is restoring the directory /usr/home/dru/Documents--in other words, the Documents subfolder backed up from the home directory of the user named dru. If you just input the name of the file or directory and click the "Restore" button, it will be restored to its original location and replace any files with the same name at that location. If you instead check the "Restore Relative to specified directory" box, the selected file/directory will be restored to the location you specify.
Adobe Flash Player preferencesThis utility allows for changes to various configuration settings related to Adobe Flash[233]. Many of the same configurations can be done via right-click within an active flash object in a web browser. To access the utility shown in Figure 8.17a, use Control Panel ➜ Adobe Flash Player preferences or open an xterm and type flash-player-properties. The options available in each tab and when to use them are described at the Adobe website:
Warden®Warden® is an easy to use, graphical jail[238] management program. Using Warden®, it is possible to create multiple, isolated virtual instances of FreeBSD which can be used to run services such as Apache, PHP, or MySQL in a secure manner. Each jail is considered to be a unique FreeBSD operating system and whatever happens in that jail will not affect your operating system or other jails running on the PC-BSD® system.Warden® has been redesigned for PC-BSD® 9.1, and is now part of Control Panel. A command line version is also available for those who prefer to work from the command line or script their jail management. Some of the new features in Warden® include the ability to:
Creating a Jail using Warden®Warden® can be started by clicking on its icon in Control Panel or by typing pc-su warden gui from the command line. You will be prompted for the administrative password as only the superuser can create and manage jails. The first time you start Warden®, you will be prompted to set the network interface as your jails will not work if the wrong interface is configured. Click Yes to set the interface using the screen shown in Figure 8.19a. You can access this screen at a later time from Jails ➜ Configuration. This screen allows you to configure the following:
Once you click the "Save" button to save your interface configuration, you will be presented with the main Warden® configuration screen, shown in Figure 8.19b. To create your first jail, click the "+" button or go to File ➜ New Jail. A jail creation wizard, seen in Figure 8.19c, will launch. The first screen in the jail creation wizard will prompt you for the following information: IP Address: input the IPv4 or IPv6 address to be used by the jail and access its contents. Choose an address on your network that is not already in use by another computer or jail and which will not conflict with the address range assigned by a DHCP server. Hostname: you can change the default of "Jailbird" to another value. The hostname must be unique on your network. Use a hostname that reminds you of the type of jail and your reason for creating it. When finished, click "Next" to select the type of jail, as shown in Figure 8.19d: There are three types of jails supported by Warden®: Traditional Jail: select this type if you are creating the jail in order to install and run network services. For example, this type of jail is appropriate if you wish to run a web server or a database which is accessible to other systems on a network or over the Internet. This is the most secure type of jail as it is separate from the PC-BSD® host and any other jails that you create using Warden®. Ports Jail: select this type of jail if your intention is to install software using FreeBSD packages and ports and you wish to have access to that software from your PC-BSD® system. This type of jail is less secure then a traditional jail as applications are shared between the jail and the PC-BSD® system. This means that you should not use this type of jail to install services that will be available to other machines over a network. Linux Jail: select this type of jail if you would like to install a Linux operating system within a jail. The remaining screens will differ depending upon the type of jail that you select. Traditional or Ports JailIf you select "Traditional Jail", you will be prompted to set the root password as seen in Figure 8.19e. Input and confirm the password then press "Next" to see the screen shown in Figure 8.19f. If you instead select to create a "Ports Jail", you will go directly to Figure 8.19f.
This screen allows you to install the following options: Include system source: if you check this box, make sure that /usr/src/ exists on the PC-BSD system as the source is copied to the jail from this location. If it is not installed, use Control Panel ➜ System Manager ➜ Tasks ➜ Fetch System Source to install it. Include ports tree: if you check this box, the latest version of the ports tree will be downloaded into /usr/ports/ of the jail. This will allow you to compile FreeBSD ports within this jail. Start jail at system bootup: if this box is checked, the jail will be started (become available) whenever you boot your main system. If the box is not checked, you can manually start the jail whenever you wish to access it using Warden®. Once you have made your selections, click the "Finish" button to create the jail. Warden® will display a pop-up window containing status messages as it downloads the files it needs and creates and configures the new jail. Once Warden® is finished creating the jail, a message should appear at the bottom of the pop-up window indicating that the jail has been successfully created. Click the "Close" button to return to the main screen. Linux JailIf you select the "Linux Jail" and click "Next", you will be prompted to set the root password as seen in Figure 8.19e. After inputting the password, the wizard will prompt you to select a Linux install script, as seen in Figure 8.19g. The installation script is used to install the specified Linux distribution. At this time, installation scripts for Debian Squeeze and for Gentoo are provided. Scripts for other distros will be added over time.
Once you select the install script, the wizard will ask if you would like to start the jail at boot time as seen in Figure 8.19h. Click the "Finish" button to begin the Linux installation. Managing JailsOnce a jail is created, an entry for the jail will be added to the "Installed Jails" box and the tabs within Warden® will become available. Each entry indicates the jail's IP address, hostname, whether or not it is currently running, and whether or not any updates are available for the meta-packages installed within the jail. The buttons beneath the "Installed Jails" box can be used to start or stop the highlighted jail, add a new jail, or delete the highlighted jail. This section provides an overview of how to manage jails using the tabs within the Warden® interface. Info TabThe "Info" tab, as seen in the example in Figure 8.19i, provides an overview of a jail's configuration. If you have created multiple jails, the "Info" tab displays the configuration of the currently highlighted jail. In the example shown in Figure 8.19i, three jails have been created. The first jail is a traditional jail, the second is a ports jail, and Debian Squeeze has been installed into the third jail. The "Info" tab contains the following information:
You can sort the jail listing by clicking on the "Jail", "Hostname", "Status", or "Updates" header name. The "Updates" column will indicate if a software or system update is available for a jail. Tools TabThe "Tools" tab, shown in Figure 8.19j, allows you to manage common configuration tasks within a jail.
This tab provides the following buttons:
Snapshots TabIf you chose to use the ZFS filesystem when you installed PC-BSD®, you can use its snapshot feature to make point in time filesystem backups of jails. A snapshot is essentially a picture of what the filesystem looked like at that point in time. Snapshots are space efficient in that they take up zero space when created and the snapshot only grows in size as files contained within the snapshot are modified after the snapshot was taken. In other words, ZFS manages the changes between snapshots, providing a way to return to what a file looked like at the time a snapshot was taken. Since jails share the filesystem used by PC-BSD®, any type of jail, including a Linux jail, can take advantage of this ZFS feature if the ZFS filesystem was selected during the installation of PC-BSD®. The "Snapshots" tab, shown in Figure 8.19k, is used to create and manage snapshots within the currently highlighted jail.
To create a snapshot of the jail, click the "+Add" button. A snapshot indicating the date and time will be added to the slider bar. If you create multiple snapshots at different times, use the slider bar to select a snapshot. Once you have created a snapshot, the following actions can be used to manage the snapshot. Make sure that the desired snapshot is highlighted in the slider bar before clicking these buttons:
This screen also allows you to schedule automatic snapshots. To enable this feature, check the box "Scheduled Snapshots". Use the drop-down menu to set the frequency to daily or hourly. You can also type in or use the arrows to configure the number of days to keep each snapshot. Packages TabThe "Packages" tab, shown in Figure 8.19l, allows you to install meta-packages within the specified traditional or ports jail. Software installed using this method will be tracked by Update Manager, meaning that Warden® will be notified when updates are available for the installed software.
The following meta-packages are available:
Hover over a package to receive a short description. If you right-click a package, it will indicate which packages and versions will be installed. Right-Click MenuA jail's right-click menu contains the following options:
Importing a JailThe "File" menu can be used to create a new jail, import a jail, or exit Warden®. If you click File ➜ Import Jail you will be prompted to browse to the location of a previously created .wdn file. Once selected, you will be prompted whether or not to use the same IP address for the new jail. If you are creating a new jail on the same system that still has the original jail installed, select "No" and input the IP address for the new jail. However, if you have deleted the original jail or need to restore that same jail on another computer (for example, there was a hardware failure on the system containing the original jail), you can choose to use the same IP address. You will then be prompted whether or not to use the same hostname. Only select "Yes" if that hostname is no longer in use; otherwise, select "No" and input a unique hostname for the jail. Warden® will then recreate the jail with all of the original settings. Whether or not those settings include the original IP address and hostname depends upon your selections. Using the Command Line Version of Warden®The Warden® GUI is based on a Bourne shell script. This script can be manually run from the command line on a PC-BSD® server or by users who prefer using the command line. Advanced users can also refer to the command line version in their own scripts. If you type warden at the command line, you will receive a summary of its usage:
Each command has its own help text that describes its parameters and provides a usage example. For example, to receive help on how to use the warden create command, type:
You do not need superuser access to use the view commands but will for any commands that create or manage a jail. The warden command will display an error message if a command requires superuser access and you currently are not the superuser. On PC-BSD®, you can put pc-su at the beginning of the warden command to be prompted for the administrative password. On a FreeBSD server, you can type su to become superuser, then repeat the warden command. Creating and Accessing a Warden JailBefore creating a jail, make sure that the correct interface is specified in /usr/local/etc/warden.conf. In this file, the default interface is set to:
To create a jail, specify a unique IP address and hostname for the jail:
The first time you create a jail, it will take a few minutes in order to download the freebsd environment. Subsequent jails will use the downloaded environment and will create almost instantaneously. Before you can access the jail, you will need to start it:
As the jail starts, the SSH host keys will be generated and sshd will start. However, you will need to create a user before you can ssh into the jail. To access the jail in order to create the user:
Follow the prompts of the adduser script in order to create a user. When you get to this prompt, don't press enter. Instead type in wheel so that the user can use the su command to become the superuser within the jail.
When you are finished creating the user, you can type exit to exit the jail. Test that ssh works by specifying the username that you created:
Additional SettingsIf you have an existing FreeBSD or Linux jail that you would like to import or if you want to create a new jail with a specific world environment, create a tar archive of that jail or environment. Then, when using the warden create command, include the --archive name_of_tarball.tgz option if it is a FreeBSD jail or the --linuxarchive name_of_tarball.tgz option if it is a Linux jail. The warden set command can be used to set additional flags to pass to the jail at jail startup time and the warden get command can be used to determine if any flags have been set. For example, this command will enable raw sockets (which allows ping) and chflags on the specified jail. Note that the flags are separated by a comma with no space. Available flags are listed in the "allow.*" section of jail(8)[249].
The Warden® configuration file is located in /usr/local/etc/warden.conf. It can be manually edited to change the default interface, the directory used for compressing/decompressing files, and the location of the created jails.
Managing Software Not Available in Packages TabThe rest of this section demonstrates how to install and upgrade software that is not available in a jail's "Packages" tab. Note that the software you install into a traditional jail will not be available to your PC-BSD® system. In other words, software installed into a traditional jail is meant to be used within the jail, or, in the case of network applications such as a web server, to be configured to be available over the network. Traditional or Ports JailThe commands demonstrated in this section can also be used to install software inside a ports jail. The software you install into a ports jail will be available to your PC-BSD® system. If you are interested in installing software on your PC-BSD® system that is not available as a PBI or you wish to learn how to use FreeBSD packages and ports without affecting the software that came with your PC-BSD® system, install the software within a ports jail.
All of the commands in this section assume that you have highlighted the jail that you wish to install software into and clicked Tools ➜ Launch Terminal. Installing FreeBSD PackagesThe quickest and easiest way to install software inside the jail is to install a FreeBSD package. A FreeBSD package is pre-compiled, meaning that it contains all the binaries and dependencies required for the software to run on a FreeBSD system. When dealing with FreeBSD packages, the following command line utilities are used:
A lot of software has been ported to FreeBSD (currently nearly 24,000 applications) and most of that software is available as a package. The best way to find FreeBSD software is to use FreshPorts.org[187]. If you are using the firefox PBI, it provides a FreshPorts search plugin for quickly finding software. Figure 8.19m shows the search results for electric; the search was performed using the firefox plugin. Each listing in the search results includes the name of the software, the version, a description, the category (e.g. security), the email address of the port's maintainer, a CVSWeb link containing the details of the port, and a link to the software's main website. Each entry includes the command used to compile the port (as described in the next section) and the pkg_add -r command used to install the package. To install a package, use the pkg_add command using the remote (-r) switch to install the specified package from the FreeBSD packages repository. For example, this command will install the electric package:
You should receive a message indicating that the package was successfully fetched, then your prompt back. Depending upon what is already installed within the jail, your messages may indicate that dependent packages were also fetched. Some packages include post-installation instructions that will be displayed in the message. Occasionally you will see a warning about a version mismatch; you can ignore these as they do not affect the installation of the package. Unless the message includes an error indicating that the system was unable to fetch or install the package, the installation was successful. You can confirm that the installation was successful by querying the package database:
Most packages install their binary (executable) in /usr/local/bin and configuration files in /usr/local/etc/. You can find out exactly what was installed using the -L (list) switch. If you include -x, you will not have to type in the entire name and version of the package as pkg_info will match any installed packages containing your query string.
The pkg_delete command can be used to uninstall either a package or a port. If you include the -x switch, you do not have to give the full name and version of the software. Be sure to give enough of a name so that you do not inadvertently uninstall other software matching the name:
If you just get the command prompt back, the delete was successful. You can verify this by checking that the package no longer exists in the package database:
You will just get your prompt back if no installed software matches that name. If the software has other applications that depend upon it, pkg_delete will refuse to uninstall it. If you wish to override this setting, you can use the -xf switch to force the delete. However, use the force switch with caution as forcibly removing software can adversely affect the applications that required it as a dependency. Compiling FreeBSD PortsTypically, software is installed using the pkg_add command. Occasionally you may prefer to compile the port yourself. Compiling the port offers the following advantages:
Compiling the port yourself has the following dis-advantages:
FreshPorts will indicate if a port has any configurable compile options. To continue the example shown in Figure 8.18m, Figure 8.18n shows the configurable options for electric. Before you can compile a port, you must first install the ports collection into the jail. If you did not choose to do so when the jail was created, you can install the ports collection using the following command. You will know that you have the ports collection when /usr/ports/ is populated with many subdirectories, each representing a category of software.
If you compile additional software at a later date, you should make sure that the ports collection is up-to-date using this command:
Once you have the ports collection installed into your ports jail, change to the subdirectory of the application you wish to install, for instance /usr/ports/cad/electric, and issue the command to make and install the application. FreshPorts provides the location to cd into and the make command to run.
If the port's Makefile includes OPTIONS, a configure screen will be displayed. The example in Figure 8.19o shows the options for the openvpn port. To change an option's setting, use the arrow keys to highlight the option, then press the spacebar to toggle the selection. Once you are finished, press enter. The port will begin to compile and install.
If the port has any dependencies with options, their configuration screens will be displayed and the compile will pause until it receives your input. It is a good idea to keep an eye on the compile until it finishes and you are returned to the command prompt. How long the compile will take can range from a few minutes to many hours, depending upon the size of the application and the speed of your system. The make command will spit out many messages, most of which you can ignore as they are simply an indication of which source is currently being compiled. Occasionally, make will encounter an error and will stop with an error message. If the solution for the error is not obvious to you, try a web search for the keywords in the error message.
Once the port is installed, it is registered in the same package database that manages packages. This means that you can use the pkg_info command to determine what was installed, as described in the previous section. Keeping Software Up-to-DateAny software that you install using the "Packages" tab within Warden® can be kept up-to-date using Update Manager. Simply highlight the jail and go to Tools ➜ Check for Updates. Update Manager will also indicate when security patches and newer versions of the operating system are available and should be used to keep the jail's operating system patched and up-to-date. However, you will need to manually upgrade any software that you installed using pkg_add or any ports that you compiled yourself within a traditional or ports jail. In order to do this, you will need to:
These steps are demonstrated in more detail in this section. Update the Ports CollectionIf you used pkg_add to install the software, you may not have the ports collection installed within the jail. This is the case if /usr/ports does not exist or is empty. To install the latest version of the ports collection, use this command:
If the ports collection is already installed, use this command to make sure that it is up-to-date:
Install an Upgrading UtilityAt this time, the portmaster command is the recommended utility for upgrading software installed using packages or ports. To install this program within the jail, use this command:
Read /usr/ports/UPDATINGBefore upgrading installed software, always read through /usr/ports/UPDATING first. This file contains any gotchas or special instructions that are needed to upgrade certain ports. Ports maintainers add to this file as new gotchas are discovered. However, you will want to start reading the file at the entry that is closest to the date that your version of PC-BSD® was released (if you have not upgraded anything yet) or the date you last upgraded, and read your way up to the top of the file. For example, this entry indicates that FreeBSD 9.0 was released on January 12:
As you read through the entries from that date up to the last entry at the beginning of the file, make note of any entries that match the software that you have installed. If you are unsure of what software is installed, this command will tell you:
Occasionally, a software upgrade (e.g. perl) may affect many applications. If you come across such entries that affect your installed software, be sure to follow the instructions carefully. If your software is up-to-date and you prefer to be notified as new entries are added to /usr/ports/UPDATING, consider subscribing to its RSS feed[251]. Perform the UpgradeAfter using the portsnap command to update your ports collection and reading /usr/ports/UPDATING, you are ready to upgrade your installed software using the portmaster command. The following command will look for out-dated ports and offer to upgrade them for you. If any of the software has configuration options, you will be presented with their configuration menus to make your selections.
If you press enter to accept the default of yes, the upgrade will begin. As each upgrade completes, you will be asked if you want to delete the source for the old version of the software (which can save disk space). If you do not want to be prompted, include -D or -d with the portmaster command. There are many switches available for portmaster so it is a good idea to man portmaster to see which ones interest you.
Using PC-BSD®This section discusses how to perform common tasks that were not discussed in the Control Panel section. This section contains the following categories: -->
Java, Flash, and FontsThis section demonstrates how to install and configure Java, Flash, and fonts to improve your desktop experience. JavaThe OpenJDK PBI provides an open source implementation of the Java Platform. It includes the IcedTea Java browser plugin which automatically works with the FireFox, Chrome, and Opera web browsers without any additional configuration. To install this PBI, search for "jdk" within AppCafe®. Adobe FlashPC-BSD® installs and configures the Adobe Flash player (version 10) plugin for you. This means that flash should "just work" when browsing the web. You will find several web browsers in the Web Browsers category of AppCafe®, including Firefox, Opera, and Chromium.If Adobe Flash does not seem to be working, invoking the following command from an xterm as your regular user account should fix the problem:
The Adobe Flash Player preferences icon in Control Panel can be used to modify how websites interact with your browser using Adobe Flash. Installing Custom FontsPC-BSD® installs Microsoft TrueType fonts for you which includes the Times New Roman, Courier New, Georgia, Trebuchet MS, Comic Sans MS Arial, Arial Black, Verdana, Andale Mono, and Impact fonts. If you have a collection of fonts that you have downloaded or purchased, you can configure your PC-BSD® system to also use these fonts. Which utility you use depends upon which window manager you have logged into.
The rest of this section demonstrates how to install fonts that you have downloaded manually or purchased from the Internet. Using KDETo install custom fonts within KDE, go to System Settings ➜ Font Management. In Figure 9.1a, "All Fonts" is currently selected under the "Group" column, showing all of the fonts installed on this system. To install your fonts, highlight "Personal Fonts" under the "Group" column, then click the "+Add" button. This will allow you to browse to the font you wish to add. You can add multiple fonts in the same directory by holding down the Ctrl key while making your selection. Click the "Open" button, which will install the font for you. When it is finished, a pop-up message will indicate that you will need to restart any open applications for the font change to take affect. Your newly installed font(s) should now show up in the "Personal Fonts" section in the "Group" column and be available to the applications you use. Using GNOMETo install custom fonts within GNOME, go to Applications ➜ Utilities ➜ File Manager. Navigate to the location of the font that you would like to install and either double-click the font name or select "Font Viewer" from the icon's right-click menu. This will open the font in "Font Viewer", allowing you to view it. If you like the font, click the "Install Font" button to make it available to your applications. In the example shown in Figure 9.1b, the user is installing the BlackFlag font. Using XFCETo install custom fonts within XFCE, use Applications ➜ System ➜ Thunar File Manager. Once you browse to the location of the font and double- or right-click it, you will see the same Font Viewer used by GNOME. Using Other DesktopsFor any desktop, you can use XFCE's thunar to install fonts. Depending upon which desktop(s) you have installed, this utility may or may not already be installed. If nothing happens when you type thunar, install it using AppCafe®. From the Command LineIf you prefer to install fonts from the command line, become the superuser and copy the downloaded font to the /usr/local/share/fonts/ directory. Then, refresh the fonts cache with the fc-cache -f -v /usr/local/share/fonts/name_of_font command.
MultimediaPC-BSD® has been pre-configured to support most multimedia formats and makes it easy to install most open source media applications using AppCafe®. In addition, the following Control Panel icons are available, regardless of the desktop:
If you insert a CD/DVD media into an internal CD/DVD device and your desktop does not notify you, you can still mount the media manually as the superuser. This command will mount a CD inserted into the first internal CD device:
If you install your web browser using AppCafe®, you should be able to play most media formats, including Youtube videos, Internet radio, and many trailer and movie sites. NOTE: if you happen to come across a file that you can not play in a web browser or media player, it is probably because it is in a proprietary format that requires a licensing fee or restricts distribution of the codec that is required to play that media format. The "Multimedia" category of AppCafe® contains several dozen applications for playing and editing multimedia. It includes these popular applications (click the links to view screenshots):
Files and File SharingThis section describes the various file managers that are available for managing the files on your PC-BSD system. It then shows how you can configure your PC-BSD system to share files with other systems in your network using Samba. File Managers and File StructureDepending upon which window managers you have installed, different graphical file manager utilities may already be installed for you. You do not need to be logged into a specific window manager to use an installed file manager. For example, if KDE is installed, you can run its file manager from any window manager by typing dolphin. KDE, GNOME, LXDE, and XFCE install their own file managers while most of the unsupported desktops assume that you will install your favorite file manager. Table 9.3a summarizes the available file managers and indicates which desktop they are installed with. Some file managers can be installed independent of a desktop using AppCafe® to install the PBI. Once a file manager is installed, type its name if you wish to run it from another desktop.
When working with files on your PC-BSD system, save your own files to your home directory. Since most of the files outside of your home directory are used by the operating system and applications, you should not delete or modify any files outside of your home directory, unless you know what you are doing. Table 9.3b summarizes the directory structure found on a PC-BSD system. man hier explains this directory structure in more detail.
SambaSamba[273] allows any operating system to share volumes using Microsoft's CIFS protocol. There are two components to Samba:
This section will demonstrate how to access shares using the Samba client as well as how to configure your PC-BSD system as a Samba server. Using the Samba ClientSince the Samba client libraries are pre-installed for you, you simply have to decide which utility you prefer to access existing Windows shares on your network. If a desktop is installed, you do not have to be logged into that desktop in order to use that utility. Table 9.3c summarizes the available utilities (type a utility's name to launch it in any desktop), which desktop it installs with and whether or not a separate PBI is available, and a short description of how to access the available shares using that utility.
Configuring the Samba ServerIf you would like to share folders or a printer attached to your PC-BSD system with other users in your network, configure the built-in Samba server. In order to create shares, Samba's configuration file, smb.conf[274], needs to be modified. You can either edit this file manually or use a GUI utility such as SWAT[275]. This section will demonstrate both methods. Edit smb.conf ManuallyTo modify the file manually, become the superuser and copy the sample file to the configuration directory:
Open the copied file in your favorite editor and review the default settings, editing them to match your network. In particular, check these global settings:
In the share definitions section, review the [homes] settings. You can also define your own shares. This example will share the Downloads directory of user1 as read-only:
To test your changes, restart the Samba service:
and try browsing to the share from another system. Note that you may have to first map a drive to the share in order for it to appear in Windows Explorer or within the file manager utility of another PC-BSD or Linux system. SWAT provides a graphical front-end to smb.conf through a web browser. To enable SWAT, remove the # at the beginning of this line in /etc/inetd.conf:
Add the following line to /etc/rc.conf:
And start inetd:
To connect to SWAT, open a web browser and input the IP address of the PC-BSD computer followed by :901. When prompted, input the username root and the password associated with the superuser account. In the example shown in Figure 9.3a, the user has clicked on the "Globals" button in order to view the global settings. One of the nice features of SWAT is the built-in help system. If you need more information about an option, simply click its "Help" hyperlink to access that section of the Samba documentation. The "shares" button allows you to quickly create shares and the "view" button allows you to review the current configuration.
MythTVMythTV[277] is an open source software digital video recorder (DVR) that is an alternative to Tivo or Windows Media Center. It allows you to pause and rewind live TV shows, skip commercials, schedule TV show recordings, and control a set-top box[278] using an infrared remote or firewire. In order to use MythTV, you will need a video capture card. Hardware requirements are described on the MythTV Wiki[279].
During the installation of PC-BSD® the installer provided an option to install MythTV. If you wish to install MythTV afterwards, use Control Panel ➜ System Manager ➜ System Packages ➜ Misc. Once MythTV is installed, an entry should be added to the "Multimedia" section of the application menu of your desktop. You can also run MythTV from the command line by typing /usr/local/share/pcbsd/scripts/mythtv.sh. Running MythTV for the First TimeThe PC-BSD® version of MythTV provides an initialization script to properly setup the database backend used by MythTV. The first time you run MythTV, you will be prompted for the superuser password in order to configure MythTV. After inputting the superuser password, a console will temporarily open indicating that the MySQL service is starting and that the MySQL database is being created. Once that is complete, you will see the configuration GUI shown in Figure 9.4a. The initial screen will prompt you to select your "Country" and "Language". Once the desired options are highlighted, click the "Save" button. You should see the MythTV front-end screen shown in Figure 9.4b. Navigate to the configuration screen you wish to access, then press enter. To leave a screen, press ESC. To exit the front-end completely, press ESC from the main configuration menu. Chapters 10-12 of the MythTV Howto[281] demonstrate the possible configurations and how to schedule recordings. Additional Resources
XBMCXBMC[284] is a GPL licensed software media player and entertainment hub for digital media. XBMC can play most[285] popular audio and video formats. It can play CDs and DVDs from a disk or image file and even files inside ZIP and RAR archives. It can scan all of your media and automatically create a personalized library with album covers, descriptions, and fan art.
During the installation of PC-BSD® the installer provided an option to install XBMC. If you wish to install XBMC afterwards, use Control Panel ➜ System Manager ➜ System Packages ➜ Misc. Once XBMC is installed, an entry should be added to the "Multimedia" section of the application menu of your desktop. You can also start XBMC by typing xbmc from a command prompt. If you have never used XBMC before, take some time to skim through the XBMC Quick Start Guide[287] and the XBMC Online Manual[288].
Windows EmulationWine[289] is an application that allows you to create a Windows environment for installing Windows software. This can be useful if your favorite Windows game or productivity application has not been ported to Linux or BSD. Wine is not guaranteed to work with every Windows application. If you are unsure if the application that you require is supported, search for it in the "Browse Apps" section of the Wine Application Database[290]. The Wine Wiki[291] contains many resources to get you started and to refer to if you encounter problems with your Windows application.Installing and Using WineWine can be installed from AppCafe®. In Figure 9.6a, the user has performed a search to find the Wine PBI. You should install the version that is correct for your architecture (32-bit or 64-bit). Once installed, an icon for Wine Configuration will be added to the Control Panel and, depending upon your desktop, a desktop icon may be created as well. Double-clicking the icon will load the Wine configuration menu shown in Figure 9.6b. You can also start this program by typing winecfg at the command line. Click the "Add application" button to browse to the application's installer file. By default, the contents of your hard drive will be listed under "drive_c". If the installer is on a CD/DVD, use the drop-down menu to browse to your home directory ➜ .wine ➜ dosdevices folder. The contents of the CD/DVD should be listed under d:. If they are not, the most likely reason is that your CD/DVD was not automatically mounted by the desktop. To mount the media, type the following as the superuser:
You should hear the media spin and be able to select the installer file. Once selected, press "Apply" then "OK" to exit the configuration utility. To install the application, click the Winefile desktop icon or type winefile to see the screen shown in Figure 9.6c: Click the button representing the drive containing the installer (in this example, D:\) and double click on the installation file (e.g. setup.exe). The installer should launch and you can proceed to install the application as you would on a Windows system.
Once the installation is complete, browse to C:\ and find the application's location. Figure 9.6d shows an example of running Internet Explorer within winefile. Using SwineThis is a helpful configuration application available from AppCafe®.
Remote DesktopOccasionally it is useful to allow connections between desktop sessions running on different computers. This can be handy when troubleshooting a problem since both users will be able to see the error on the problematic system and either user can take control of the mouse and keyboard in order to fix the problem. Typically this is a temporary situation as providing access to one's computer allows a remote user the ability to both view and modify its settings. This section will demonstrate two remote desktop scenarios: how to configure an RDP connection to another computer from PC-BSD® and how to invite another computer to connect to your desktop session. Connecting to Another Computer With RDPThe remote desktop protocol (RDP)[292] can be used to make a connection to another computer. This section will demonstrate what is needed on the remote computer for an RDP connection, how to connect using KDE's KRDC, and how to connect using VNC.Preparing the Remote SystemDepending upon the operating system, you may have to first install or enable RDP software on the remote computer:
If the remote system is protected by a firewall, you will need to check that it allows connections to the TCP port required by the type of connection that you will be using:
If you need to manually add a firewall rule, it is best to only allow the IP address of the computer that will be connecting. You should immediately remove or disable this firewall rule after the connection is finished so that other computers do not try to connect to the computer. Since your PC-BSD® system is considered to be the client and will be initiating the connection, you do not have to modify the firewall on the PC-BSD® system. Connecting with KDE's KRDCIf your PC-BSD® system has the KDE desktop installed, you can initiate a connection request using KRDC. To launch this application, go to Applications ➜ Internet ➜ Remote Desktop Client within KDE or type krdc at the command line within any desktop. If you click F1 while in KRDC you can access the Remote Connection Desktop Handbook to learn more about how to use this application. Figure 9.7a shows the initial KRDC screen which allows you to specify which system you wish to connect to. Use the drop-down menu to indicate whether the remote system is using RDP or VNC for the connection. Then type in the IP address of the system you wish to connect to. If you are connecting to a VNC system, the IP address needs to be followed by a colon and a number indicating the number of the session. Typically, the number will be 1 unless the VNC server is hosting multiple simultaneous connections. Once you press enter, the connection will be initiated and, if it is an RDP connection, you will see the screen shown in Figure 9.7b. Here is a quick overview of the settings: Desktop resolution: since the contents of the screen are sent over the network, select the lowest resolution that still allows you to see what is happening on the other system. If you have a very fast network connection, you can choose a higher resolution; if you find that the other system is very slow to refresh its screen, try choosing a lower resolution. Color depth: choose the lowest color depth that allows you to see the other system; you can choose a higher color depth if the network connection is fast.Keyboard layout: this drop-down menu allows you to select the desired keyboard layout. Sound: this drop-down menu allows you to choose whether any sounds heard during the connection are produced on this system, the remote system, or to disable sound during the connection. Console login: if you are connecting to a Unix-like system, you can check this box if you wish to have access to the other system's command line console. Extra options: allows you to specify rdesktop switches[295] that are not covered by the other options in this screen. Show this dialog again for this host: if you plan on using the same settings every time you connect to this computer, you can uncheck this box. If you need to change the settings at a later time, you can right-click the connection (which will appear in a list as a past connection) and choose Settings from the right-click menu. Remember password: KWallet[296] is KDE's password storage system. If this box stays checked, you will only need to input the password the first time you make this connection as it will be saved for you. If this is the first time you have stored a password using KWallet, it will prompt you for some information to set up your wallet. If it is a VNC connection, you will be able to choose your connection type (speed), screen resolution, and have the option to remember the password.Once you press OK, the connection should be initiated and you will receive pop-up messages asking for a username then a password; the details you provide must match a user account on the system you are connecting to. Once your authentication details are confirmed, you should see the desktop of the other system. If you move your mouse, it will move on the other desktop as well. Click the button View Only in the top toolbar whenever you wish to disable this mouse behaviour. When you are finished your session, you can click the button Disconnect in the top toolbar.
Connecting with VNCIf you prefer to install VNC software instead of using KDE's KRDC, use AppCafe® to install TightVNC. If you use VNC, the VNC server must be installed on the remote desktop. Once TightVNC is installed, type vncviewer to start the VNC client. A small window will appear, allowing you to type in the IP address of the remote system in the format IP_ADDRESS:5801. Change the 5801 if the VNC server is listening on a different port. Allowing Another Computer to Connect Using Desktop SharingIf you wish another user to connect to your computer and have the KDE desktop installed, you can use the KDE Desktop Sharing application to generate a connection invitation. To launch this application within KDE, go to Applications ➜ Internet ➜ Desktop Sharing or type krfb from the command prompt of any desktop. If you press F1 while in this application, it will open the Desktop Sharing Handbook where you can learn more about using this utility. Figure 9.7c shows the initial screen for this application. There are two types of invitations that you can create: Personal Invitation: if you click this button it will display the hostname that the other person will use to connect, a temporary password to use for the connection, and a connection request expiration time of one hour. It will include a warning reminding you to only give this information to the person you wish to connect as anyone can connect using that information. The connection itself can be made from any VNC client. If the person is using PC-BSD®, they can use kdrc or vncviewer as described above. On other operating systems, they will need to check if VNC is installed and download a VNC client if it is not. Once you press the "Close" button, the invitation expiry date will be listed in the main screen. Figure 9.7d shows an example of a personal invitation. Email Invitation: if you click this button it will display a warning that anyone who reads the email containing the invitation can connect. Once you click the "Continue" button, the default email program will open the invitation so that you can input the email address of the recipient and send the email.It should be noted that the most secure way to convey the invitation information is through an alternate communications channel such as a phone call. Ideally, you are speaking to the other person as they connect so that you can walk them through the problem you are experiencing and they can let you know what they are doing to your system as you watch them do it. Once the other person has the invitation, they should input the information in the invitation into their VNC client in order to start the connection. You will know when they try to connect as a pop-up message will appear on your screen similar to Figure 9.7e. In this example, a computer with an IP address of 192.168.1.111 is trying to connect. Buttons are provided to either accept or refuse the connection. You can also check or uncheck the box to "allow remote user to control keyboard and mouse". If you accept the connection, the other user will be prompted to input the invitation password. Once the password is accepted, they will see your desktop.
Thin ClientThe pc-thinclient script has been improved for PC-BSD® 9.1 by adding the following features:
This section demonstrates how to configure and use both the PXE Boot Desktop Server and the PXE Boot Install Server. Creating a PXE Boot Desktop ServerA PC-BSD® PXE Boot Desktop Server allows you to automatically configure a network of diskless computers[297] where each computer has a network interface card capable of PXE[298] booting. When a client boots from their network interface instead of their hard disk, they automatically connect to the PXE Boot Desktop Server and receive a login window. Once authenticated, they can use PC-BSD®, even if PC-BSD® is not installed on their own computer and even if their computer does not have a hard drive. To prepare your PC-BSD® system for a PXE Boot Desktop Server configuration, perform these tasks first:
To configure the PC-BSD® system as a PXE Boot Desktop Server, run the following script as the superuser:
If your intent is to install a PXE Boot Desktop Server, input r and press enter. If the DHCP server is not already installed, you will receive a configuration menu for compiling the DHCP port. You can press enter to accept the defaults. Once the DHCP server is installed, the tools needed in the PXE environment will be installed:
Input the FreeBSD device name of the interface that is attached to the local network containing the diskless workstations. This interface will run the DHCP server and should not be connected to a network with another DHCP server running. In the example shown here, the user has input the em0 interface. If you are unsure of the device name, type ifconfig from another terminal. The script will now configure the specified interface and start the required services:
Go to Control Panel ➜ GDM Configuration and check the box Enable XDMCP. If you forget this step, clients will not be able to receive an X session when they connect. The installation creates a chroot directory that contains a small PXE image that is used by clients to launch Xorg and connect to the PXE Boot Desktop Server. You can access this chroot by typing this command as the superuser:
Running pkg_info within the chroot will show which X components and drivers are available. Should you need to install additional video drivers, use pkg_add within the chroot. When you are finished using the chroot, type exit to leave it. The thin client script installs and configures the following services: NFS: the Network File System is a protocol for sharing files on a network. It has been configured to allow clients on the network attached to the interface that you specified to connect to the thin client server. Its configuration file is located in /etc/exports. TFTP: the Trivial File Transfer Protocol is a light-weight version of FTP used to transfer configuration or boot files between machines. The PXE network cards on the diskless computers will use TFTP to receive their configuration information. This service was enabled in /etc/inetd.conf with a home directory of /home/thinclient. DHCP: the Dynamic Host Configuration Protocol is used to configure IP addressing info on the diskless workstations. It has been configured to assign addresses for the network attached to the interface that you specified. Its configuration file is located in /usr/local/etc/dhcpd.conf. The thin client script also creates the pxeboot user with the default password thinclient. This username and password is used to save the working Xorg configuration files for each of the diskless computers. It is highly recommended that you change this password right away by running this command as the superuser:
You will also need to create the users that will connect to the system. You can do so using User Manager or by typing adduser at the command line and following the prompts. Connecting to the PXE Boot Desktop ServerAfter a successful installation and reboot of the PXE Boot Desktop Server, the DHCP service will be running on the NIC you specified. Make sure that this NIC and a PXE capable client are connected to the same hub or switch. When you boot up the client, PXE should automatically obtain an IP address and begin to load PC-BSD®. If it does not, review the boot order settings in the BIOS on the client to make sure that PXE is listed first. After the boot process has finished, the client will be brought to this prompt:
If you wait 10 seconds, this message will timeout, and the client will bring up X in 1024x768 mode. If this is not the resolution that you wish to use, type "Y" at the prompt and hit enter to bring up the Xorg Configuration screen. In this menu, you will be able to setup your own custom xorg.conf file, auto-detect settings, and test the new configuration. When finished, choose "Save working config" to send this configuration to the PXE Boot Desktop Server. This will prompt for the password of the pxeboot user. Once authenticated, the file will be saved by the client's MAC address in /home/pxeboot/mnt/xorg-config/<mac>.conf. The next time you boot the client, it will automatically use the saved xorg.conf file and bring the system to the PC-BSD® login screen.
The client's boot environment is located in /home/pxeboot. This is mounted read-only during the PXE boot process to allow the client to bootup and create an XDCMP connection to the server. Once logged in to the PXE Boot Desktop Server, using PC-BSD® will be the same as if you had installed PC-BSD® on the client system. You will be able to use AppCafe® to install software and to save and use the files in your home directory. Uninstalling the PXE Boot Desktop ServerUse the -remove option if you wish to uninstall the PXE Boot Desktop Server:
This will remove the PXE environment from the system. If you are finished using the PXE boot services, you can stop them using these commands:
and prevent them from restarting by removing these lines from /etc/rc.conf:
Your interface name and IP address may differ from those in the example. Creating a PXE Boot Install ServerA PC-BSD® PXE Boot Desktop Server can be used to install PC-BSD®, FreeBSD, or TrueOS® onto computers who connect to the server using PXE. The installations can be interactive or fully automated. The PXE Boot Desktop Server supports multiple, concurrent installations with the only limiting factor being the server's disk I/O and the network's bandwidth. The installation of the PXE Boot Install Server starts the same way, except this time you select i when prompted:
Connecting to and Customizing the PXE Boot Install ServerOnce the PXE Boot Install Server is installed, try to PXE boot a client which is connected to the same network. If the client boots successfully, you will see the installation screen shown in Figure 9.8a. By default, selecting "install" from the boot menu will use the /usr/home/thinclient/installscripts/pc-sysinstall.example script which installs a basic FreeBSD system. In addition to starting an installation, this menu provides an emergency shell prompt. This can be useful if you have a system which can no longer boot and you wish to either access the disk's contents or attempt to repair the installation. Any scripts that you create and place in the /usr/home/thinclient/installscripts/ directory will be selectable as an installation option within the PXE client boot menu. Tables 5.4a and 5.4b in Creating an Automated Installation with pc-sysinstall summarize the available configuration options when creating an installation script. Alternately, every time you install PC-BSD, the installation script is automatically saved to /root/pc-sysinstall.cfg. This means that if you wish to repeat an installation, you simply need to copy that file to the /usr/home/thinclient/installscripts/ directory on the PXE Boot Install Server. The PXE Boot Install Server also supports completely unattended installations. To perform fully-automated installations over the PXE interface, create a configuration script named /usr/home/thinclient/installscripts/unattended.cfg. When a PXE client first boots, it checks for the existence of the unattended.cfg file, and if found, it will automatically use it for installation. Some caution should be taken when using this method since simply plugging a PXE boot client into the wrong LAN cable could cause it to be re-installed.
ownCloudownCloud[299] is open source software that allows you to create your own cloud storage. This allows you to share data, contacts, and calendars with other devices and users. In PC-BSD®, you can create your own private cloud service by installing ownCloud either into a traditional jail that you created using Warden® or into a TrueOS® installation. For security reasons, installing ownCloud directly onto a desktop installation is not recommended, as the web and database services it requires may expose the desktop to security vulnerabilities. If you are installing ownCloud on a PC-BSD® system, create a traditional jail as it isolates the software installed into the jail from your desktop operating system. Install and Start the Required ServicesIf you are installing ownCloud into a traditional jail, make sure that the jail has been started, then go to the "Packages" tab of the jail as seen in the example in Figure 9.9a. Check the boxes for Database-Servers ➜ MySQL, Languages ➜ PHP, and Web-Servers ➜ Apache, then click the "Apply" button to install these packages. Once installed, go to Tools ➜ Service Manager which will open the screen shown in Figure 9.9b. Highlight the apache22 service and click the "Enable Service" button and then the "Start" button. Repeat for the mysql service. Verify that you can reach the web server by typing the IP address of the jail into a web browser. You should receive an "It works!" message. You will need to first allow incoming TCP port 80 on the jail interface using Firewall Manager if you use a web browser on a different computer. If you are installing ownCloud onto a TrueOS® system, you will need to create the jail and install the dependencies from the command line. When creating the jail, specify the jail IP address and hostname as seen in this example:
Once the software is installed, access the jail by its IP address in order to edit the /etc/rc.conf file within the jail so that the required services start when the jail is available:
Add these two lines to that file:
Save your edits then start the services:
Verify that you can reach the web server by typing the IP address of the jail into a web browser. You should receive a "It works!" message. You will need to first edit /etc/pf.conf in order to allow incoming TCP port 80 using if you use a web browser on a different computer. An example would be to add a line to the "Nic specific rules" section:
You may wish to replace any with just the IP addresses of the systems on your network. re0 should be replaced with the interface used by the jail. Configuring ownCloudYou are now ready to download and configure ownCloud. If you are using a traditional jail on your desktop, go to Tools -> Launch Terminal to access the jail's command line. If you are using TrueOS®, use the warden chroot command to access the command line of the jail.
Test your changes from a web browser by adding "owncloud" to the end of the IP address of the jail. For example, type http://10.0.0.1/owncloud/. You should see the setup screen shown in Figure 9.9c. Input the name of the user and password that will be used to administer ownCloud, then click the " "Advanced" button. In the advanced settings, click the "MySQL" tab and input the MySQL username, password, and database name that you configured previously. Click the "Finish setup" button to save your changes and enter your new cloud interface -- shown in Figure 9.9d. Click the left panel of the interface to access a type of media. For example, if you click "Files" and then the "New" button, you can upload a file, folder, or from a URL. If you click "Contacts", you can add a contact or import/export the address book. Click the "Settings" icon at the bottom of the left panel to add users, configure applications, change the administrative configuration, and to access "Help". Instructions for synchronizing the calendar and address book, integrating with a file manager, and integrating with a media player can be found in the documentation section of the ownCloud website[300]. Synchronization clients are available from the owncloud site[301].
SecurityYour PC-BSD® system is secure by default. This section provides an overview of the built-in security features and additional resources should you like to learn more about increasing the security of your system beyond its current level. The security features built into PC-BSD® include:
If you would like to learn more about security on FreeBSD/PC-BSD® systems, man security is a good place to start. These resources provide more information about security on FreeBSD-based operating systems:
AccessibilityThe GNOME and KDE desktop environments included with PC-BSD provide accessibility features to assist users with vision and mobility impairments. This section provides an overview of these features and references to additional accessibility information.
GNOME Accessibility ToolsTo install the GNOME accessibility tools, make sure that the "GNOME-Accessibility" box is checked (it is by default) when selecting to install GNOME either during installation or afterwards using System Manager ➜ System Packages ➜ Desktops. The GNOME-Accessibility component installs the following software:
The GNOME-Accessibility component also adds the following options to the login Accessibility screen shown in Figure 4.8b:
More information about GNOME-Accessibility can be found in the GNOME Desktop Accessibility Guide[316]. KDE Accessibility ToolsTo install the KDE accessibility tools, make sure that the "KDE-Accessibility" box is checked (it is by default) when selecting to install KDE either during installation or afterwards using System Manager ➜ System Packages ➜ Desktops. The KDE-Accessibility component installs the following software:
More information about KDE-Accessibility can be found in the KDE UserBase Wiki[322].
Finding HelpWhile professional PC-BSD® support is available from iXsystems[323], most users turn to the Internet for help. We are doing our best to make PC-BSD® as easy as possible for newcomers. Should you need help, there are plenty of ways to get in touch with the PC-BSD® community. This section discusses the following help resources: As your teacher may have told you, "Do or Do Not, there is no try," or more likely, that "there is no such thing as a stupid question." However, there are better ways to ensure that you receive the response you seek and that it will be a productive exchange for all parties involved. The two articles below help to describe how and why it is important to follow certain protocols when requesting help:
PC-BSD® ForumsThe PC-BSD® Forums[101] contain a wealth of information, tips and solutions which you can access from a web browser. There are many active members and you will find that most questions are replied to quickly. If you are having problems with something on your PC-BSD® system, try using the forum's search utility. You will often find that someone else has posted a similar question and that other users have responded with a fix or a how-to. The Forums have been categorized, allowing users to skim through the categories that interest them while learning some things along the way. You do not have to create a login account in order to search or read through the forums. However, if you wish to ask or answer a question on a forum or subscribe to a forum or a thread (to be automatically notified when a new post is added), you will need to be logged in. To subscribe to a forum, open the page for the forum and select Forum Tools ➜ Subscribe to this Forum. You will be prompted to choose how often to be notified whenever a post is added to the forum. If you wish to subscribe to a specific post, open the post and select Thread Tools ➜ Subscribe to this Thread. You will be notified whenever someone responds to that post. The current categories and the forum descriptions are described below: The General category contains the following forums:
The PC-BSD® Software category allows developers to become aware of any problems with current PBIs or software installed using pkgng and to receive requests for software that should be made into a PBI. If you start a post in any of these forums, subscribe to it so you can be notified of any responses to your post. The forums in this category include:
The Support category deals with the following types of support questions. PC-BSD® developers are subscribed to this list so they can help determine what is causing the problem, and if a fix is made available, can commit it for the next version of PC-BSD®. If you start a post in any of these forums, subscribe to it so you can be notified of any responses to your post.
The Hardware Support category is for reporting hardware-related problems. PC-BSD® developers are subscribed to this list so they can help determine what is causing the problem, and if a fix is made available, can commit it for the next version of PC-BSD®. If you start a post in any of these forums, subscribe to it so you can be notified of any responses to your post. Be sure to read the README first[344] before posting.
The Development category contains the following forums:
The Testing category is for PC-BSD® beta testers to report problems found in upcoming versions of PC-BSD®. It contains the following forums:
The Hardware Compatibility category contains forums to help users determine if their hardware is compatible with PC-BSD®. It contains the following forums: The Server Administration category contains forums for discussing system administrative tasks system administration topics and questions for PC-BSD®, TrueOS®, FreeBSD, and Warden®. It contains the following forums: The International category contains forums for non-English speakers for PC-BSD® related discussions in their native language. Each forum has its own categories for organizing posts. The following forums are available: While logged into the forums, a link called "UserCP" will appear in the upper left hand corner. This is your control panel and it contains many settings to customize your forums experience. You should review the settings in your Control Panel. Before asking a question on the forums or starting a new thread, first use the search utility to see if a similar thread already exists. If one does, you can add to the conversation by using the "Reply" button. If you find a thread useful, feel free to click the "Thanks" button to let the original poster know that you benefited from their knowledge. If a similar thread does not already exist, review the forum categories to determine which one is the best fit for your post. When creating a new thread, use a useful "Title" name to describe your problem or question -- remember, other users may be researching a similar issue and you want them to find your thread. Include enough details in your message so that others can quickly understand what you are experiencing -- otherwise, they will have to ask you additional questions to understand your problem. Make sure you are subscribed to your thread so that you will receive a notification when someone responds to it. You can ask a question by clicking on the "New Thread" button in the forum category that most closely matches your question. For example, if you are having problems with your video settings, you should create a new thread in the "Graphics Card" forum. If you do not see a category that matches your question, try the "General Support" category. In addition to the forums available from the PC-BSD® Forums website, the following forums may assist you in troubleshooting your PC-BSD® system:
IRC ChannelLike many open source projects, PC-BSD® has an IRC channel[384] to connect supporters and users. To get connected, use the following information in your IRC client:
AppCafe® has an IRC category where you can find PBIs for IRC clients. If you do not wish to install an IRC client, you can instead use the the web interface to #pcbsd[385]. IRC is a great way to chat with other users and get answers to your questions. A few things to keep in mind if you ask a question on IRC:
Mailing ListsMailing lists are a handy way to discuss problems, solutions, and requested features as they create a searchable archive of discussions. The PC-BSD® Project offers the following mailing lists[388] to cover a wide variety of discussion topics:
Each mailing list includes a description of topics suitable for discussion on that list, and indicates if it is read only or available for user discussion. Anyone can read the archives of a list. If you wish to send an email to a mailing list, you will need to first subscribe to the list. The link for each mailing list provides an interface for subscribing to that list. When you send an email to the list, remember to use the mailing address that you used when you subscribed to the list. Several of the mailing lists are archived at gmane[400]. Gmane allows you to read the archives in several different formats. It also provides RSS feeds in various formats for keeping up-to-date on new messages and topics. In addition to the official mailing lists, there are mailing lists set up by PC-BSD® users. Many of these lists are designed for discussion in other languages. A list of alternative PC-BSD® mailing lists can be found at Google Groups[401].
FreeBSD Handbook and FAQPC-BSD® uses FreeBSD as its underlying operating system, so everything in the FreeBSD Handbook[104] and FreeBSD FAQ[402] applies to PC-BSD® as well. Both documents are very comprehensive and cover nearly every task you can accomplish on a FreeBSD system. They are also an excellent resource for learning how things work under the hood of your PC-BSD® system.
Social MediaThe PC-BSD® project maintains several social media sites to help users keep up-to-date with what is happening and to provide venues for developers and users to network with each other. Anyone is welcome to join.
Search and PortalsMany BSD related search portals exist. If you can not find the answer that you are looking for in the forums or mailing lists, try searching these websites:
Other ResourcesThe following BSD sites and resources may also contain useful information:
Supporting PC-BSD®PC-BSD® is a community project and relies on involvement from its users and supporters. This section lists some ideas for becoming involved. We also have a list of Tasks Looking for People if you are looking for a specific task to assist with. |