Beruflich Dokumente
Kultur Dokumente
Second Edition
Written By
David Childers
Creative Common License
This body of work is released under the Attribution-ShareAlike version 3.0, Creative Common License.
The work may be freely distributed or modified for commercial or non commercial purposes.
If this work is modified, compliance with the Attribution-ShareAlike version 3.0, Creative Common License is
required.
- Alterations, transforming, or building upon this work requires distributing the resulting work only under the
same, similar or a compatible license.
Cover graphic - the X Window System running Tom's Window Manager, GNU Free Documentation License.
en.wikipedia.org/wiki/File:X-Window-System.png
WARRANTY NOTICE
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO
THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE
COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT
HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED
ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
About The Author
David Childers is the Content Manager and Senior Editor for the International Broadcasting portal
www.BroadcastingWorld.net. He is also the webmaster of the SHOUTcast video streaming information
resource, www.scvi.net. He is very active in the Internet broadcast industry.
Mr. Childers' work has been cited in several national and International publications, such as:
Video Podcasting in Perspective: The History, Technology, Aesthetics and Instructional Uses of a New Medium
Journal of Educational Technology Systems
Video Podcasting: When, Where and How it's Currently used for Instruction
The National Convention of the Association for Educational Communications and Technology
I have updated the FreeBSD easy Gnome desktop installation script and software guide to stay current with
FreeBSD and Gnome.
It is my desire to provide the FreeBSD community with the ability to easily install a complete Gnome desktop
and associated software using one simple script. Using a shell script allows the installation of complete
binary packages instead of using ports that require local compilation. A shell script also enables the ability to
do automated system configuration.
The inspiration for this was an older FreeBSD port called “Instant Desktop Installation” that would install a
complete desktop. Unfortunately, this port was removed because there was no designated maintainer to
keep the port current.
I would like to thank Cub69 and J. Lenz for providing technical assistance with developing the script, Scarlet
Coker for providing assistance with the editing of the manuscript and James Davey at Broadcasting World for
allowing me the opportunity to create this handbook.
It is my sincere hope that the reader finds this software script beneficial.
David Childers
April 2011
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.
Dennis Ritchie
Please Donate
If you find this guide useful, please consider making a small donation to show your appreciation of my work.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10870717
Index
- Changes
- Introduction
- FreeBSD Installation
- Wireless Networking
- Webcam Support
- Additional Software
- References
Changes
Updated - Introduction
Updated - References
FreeBSD is a free Unix compatible computer operating system that has developed into a very secure and
stable operating system. The FreeBSD system architecture is well organized and designed for excellent
reliability, and can be used for either a desktop or server computer environment.
GNOME is a desktop environment / graphical user interface that runs on top of the computer operating
system. GNOME is part of the GNU Project and can be used with various Unix-like operating systems. It is a
derivative of the original KDE desktop project.
There are several distributions of FreeBSD that provide a complete desktop installation, however these are
based on KDE. These distributions also use a modified system architecture.
This script installs the Gnome desktop environment and system tools, on a fresh FreeBSD installation. Users
have the option of installing additional software created for the FreeBSD operating system from the free
software repository.
This desktop installation script can be easily modified to suit specific requirements, such as installing XFCE
desktop or other special requirements.
FreeBSD Installation
www.dan.me.uk/blog/2010/09/25/freebsd-8-1-install-guide/
blog.up-link.ro/freebsd-how-to-install-freebsd-freebsd-8-installation-guide/
2.10 Post-installation
www.freebsd.org/doc/en/books/handbook/install-post.html
2.11 Troubleshooting
www.freebsd.org/doc/en/books/handbook/install-trouble.html
Using The Desktop Installation Script
This script will automate the installation and configuration of the Gnome desktop environment on a FreeBSD
installation.
Login as root.
- Use pkg_add and install wget. (This software is used to retrieve files from the Net via HTTP(S) and FTP.)
# pkg_add -r wget
- Use the mv command and rename the file extension from .txt to .sh.
# mv Desktop.txt Desktop.sh
- After the script has been executed and the desktop has been installed, remove the installation script file.
# rm -f Desktop.sh
No firewall has been installed with this script. It is highly recommended that you proceed to the Additional
Software page in this guide and install the Fwbuilder Firewall Builder software application after the desktop
software has been installed.
This script requires some additional actions to be performed after the installation is complete. The additional
actions to be performed are highlighted in bold face text.
#!/bin/sh
##################################################################
##################################################################
#
# The FreeBSD Easy Work Station Installation Script.
# David Childers - 15 Dec, 2009 / Updated 15 April, 2011
#
# This software is released under the Attribution-ShareAlike version 3.0 Licence.
# www.creativecommons.org/licenses/by-sa/3.0/
#
##################################################################
##################################################################
#
# If you find this script useful, please consider making a small donation.
# https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10870717
#
##################################################################
##################################################################
#
# Portions of the script that are marked with bold face type require additional steps to be
# performed. If these additional steps are not completed, then the changes initiated by this
# script will not function properly.
#
##################################################################
##################################################################
#
# > If you modify the script, make absolutely sure that you use standard quotation marks '' '' and not word
# > processor quotation marks “ “ in elements that you use the echo function for adding entries to files.
# > Using word processor quotation marks ” “ inside the script will cause the script to not function
# > properly.
#
##################################################################
##################################################################
#
# It is advisable to begin with a fresh installation of FreeBSD.
#
# This script can be used with either an i386 or amd64 system.
#
##################################################################
##################################################################
#
echo "Updating the FreeBSD installation."
#
freebsd-update fetch
freebsd-update install
#
##################################################################
##################################################################
#
echo "Installing the ports tree."
#
portsnap fetch
portsnap extract
#
##################################################################
##################################################################
#
echo "Installing desktop software."
#
# X.Org complete distribution metaport.
#
pkg_add -r xorg
#
# The "meta-port" for the GNOME 2 integrated X11 desktop.
#
pkg_add -r gnome2
#
# The 'Geektoys' for the GNOME 2 power user.
#
pkg_add -r gnome2-power-tools
#
##################################################################
##################################################################
#
echo "Installing system utilities."
#
# Nano's ANOther editor, an enhanced free Pico clone. (Basic text editor – much better than Vi.)
#
pkg_add -r nano
#
# Allow others to run commands as root.
#
pkg_add -r sudo
#
# Midnight Commander, a free Norton Commander Clone.
#
pkg_add -r mc
#
##################################################################
##################################################################
#
echo "Installing printer utilities."
#
# Common UNIX Printing System: Metaport to install complete system.
#
pkg_add -r cups
#
# GutenPrint Printer Driver.
#
pkg_add -r gutenprint-cups
#
# Administration tool for cups (Gnome).
#
pkg_add -r gnome-cups-manager
#
##########
##########
##
## You may need to install additional device drivers for for specific printers.
##
## Drivers and utilities for HP Printers and All-in-One devices:
## # pkg_add -r hplip
##
## Printer listings
## www.openprinting.org/printers
##
## Printer driver listings
## www.openprinting.org/drivers
##
## Search for the printer you wish to install and download the correct ppd file.
##
## Install the ppd printer file using the cups web interface.
## This interface can be accessed from any web browser at this URL/address:
## http://localhost:631
##
##########
##########
#
echo "Enabling cups printing."
#
##########
##########
##
## You must manually edit these two individual files:
## (#indicates a typed command.)
##
## /usr/local/etc/cups/mime.types
## /usr/local/etc/cups/mime.convs
##
## # nano /usr/local/etc/cups/mime.types
## # nano /usr/local/etc/cups/mime.convs
##
## You must uncomment the following line contained in each file:
##
## application/octet-stream
##
## Remove the ; from the front of this line to uncomment it.
##
##########
##########
#
echo '[system=10]' >> /etc/devfs.rules
echo 'add path 'unlpt*' mode 0660 group cups' >> /etc/devfs.rules
echo 'add path 'ulpt*' mode 0660 group cups' >> /etc/devfs.rules
echo 'add path 'lpt*' mode 0660 group cups' >> /etc/devfs.rules
echo 'add path 'usb/X.Y.Z' mode 0660 group cups' >> /etc/devfs.rules
#
echo 'cupsd_enable=”YES”' >> /etc/rc.conf
echo 'devfs_system_ruleset=”system”' >> /etc/rc.conf
#
# Restart cups system.
#
/etc/rc.d/devfs restart
/usr/local/etc/rc.d/cupsd restart
#
# Reference:
# Configuring the CUPS Print Server
# www.freebsd.org/doc/en/articles/cups/printing-cups-configuring-server.html
#
##################################################################
##################################################################
#
echo "Configuring Gnome to automatically launch when the computer starts up."
#
# Starting with version 7.4, Xorg can use HAL to autodetect keyboards and mice. The sysutils/hal and
# devel/dbus ports are installed as dependencies of x11/xorg, but must be enabled by the following
# entries in the /etc/rc.conf file:
#
echo 'hald_enable="YES"' > /etc/rc.conf
#
# Enabling Gnome start up.
#
echo 'gdm_enable="YES"' >> /etc/rc.conf
echo 'gnome_enable="YES"' >> /etc/rc.conf
echo 'dbus_enable="YES"' >> /etc/rc.conf
#
echo 'proc /proc procfs rw 0 0' >> /etc/fstab
#
# Reference:
# Desktop Environments
# www.freebsd.org/doc/en/books/handbook/x11-wm.html
#
# 5.4 X11 Configuration
# www.freebsd.org/doc/en/books/handbook/x-config.html
#
# FreeBSD GNOME Project: GNOME FAQ
# www.freebsd.org/gnome/docs/faq2.html
#
##################################################################
##################################################################
#
echo "Sound card configuration."
#
# This command probes the sound card and determines which drive is suitable.
#
kldload snd_driver
#
##########
##########
##
## (#indicates a typed command.)
##
## You must check to see which sound card is detected with this command:
## # cat /dev/sndstat
##
## You must add the detected sound driver manually to the /boot/loader.conf file.
## # nano /boot/loader.conf
##
## This line needs to be added to the /boot/loader.conf file:
##
## snd_xxx_load="YES"
##
## xxx is the sound card driver that is detected by the cat /dev/sndstat command.
##
## The sound card driver must be added using lower case letters.
##
##########
##########
#
# Reference:
# Setting Up the Sound Card
# www.freebsd.org/doc/en/books/handbook/sound-setup.html
#
##################################################################
##################################################################
#
echo "End of script."
#
Post Script Installation Notes
This script will automate the update of the FreeBSD installation, FreeBSD Ports, installed software and clean
your system from installation files no longer needed.
- Login as SU.
# cd /etc/
- Use the mv command and rename the file extension from .txt to .sh.
# mv Update.txt Update.sh
Note: Leave the FreeBSD update script in the /etc/ directory, so that it can be used again.
This script requires some additional actions to be performed after the installation is complete. The additional
actions to be performed are highlighted in bold face text.
#!/bin/sh
##################################################################
##################################################################
#
# The FreeBSD Update Script
# David Childers - 15 Dec, 2009 / Updated 15 April, 2011
#
# This software is released under the Attribution-ShareAlike version 3.0 Licence.
# www.creativecommons.org/licenses/by-sa/3.0/
#
##################################################################
##################################################################
#
# This script can be used with either an i386 or amd64 system.
#
##################################################################
##################################################################
#
# If you find this script useful, please consider making a small donation.
# https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10870717
#
##################################################################
##################################################################
#
# > If you modify the script, make absolutely sure that you use standard quotation marks '' '' and not word
# > processor quotation marks “ “ in elements that you use the echo function for adding entries to files.
# > Using word processor quotation marks ” “ inside the script will cause the script to not function
# > properly.
#
##################################################################
##################################################################
#
# Including this command will eliminate the user interactive prompts when upgrading ports and will use
# the default configuration for installing them.
#
echo 'BATCH=yes' >> /etc/make.conf
#
# Update FreeBSD core.
#
freebsd-update fetch
freebsd-update install
#
# Update ports collection.
#
portsnap fetch update
#
# Install ports status and safe update utility.
#
pkg_add -r portmanager
#
# Updates ports in the correct order based on their dependencies.
#
portmanager -u
#
# Install tool set for working with ports and packages.
#
pkg_add -r portupgrade
#
# Clean up all temporary work directories.
#
portsclean -C
#
# Remove all distfiles that are no longer referenced by any ports.
#
portsclean -D
#
# Remove all distfiles that are no longer referenced by any port currently installed on your computer.
#
portsclean -DD
#
##################################################################
#
echo "End of script."
#
Linux Emulation Configuration
Linux emulation allows the installation and execution of Linux compiled software on the FreeBSD operating
system.
Install the packages for Linux mode – I386 / Amd64 (Linux Fedora 10).
# cd /usr/ports/emulators/linux_base-f10/
# make install clean
Use the brandelf utility to help the FreeBSD kernel distinguish between a FreeBSD elf binary from a Linux
binary.
# brandelf -t Linux my-linux-elf-binary
Note:
Depending on the Linux software that is selected to be installed, additional Linux libraries may be required.
Wine is a software application that allows computer programs written for Microsoft Windows to run on Unix-
like operating systems. Wine is not an emulator, it creates a compatibility layer for Windows software.
Wine
Microsoft Windows compatibility layer for Unix-like systems It is written for the 386 architect but can be run
under the AMD64 architecture.
Winetricks
A script to download and install various redistributable runtime libraries that may be needed to run Windows
applications in Wine.
wiki.winehq.org/winetricks
Q4wine
A Qt4 GUI for wine. It is designed to help manage wine prefixes and installed applications. It is written for
the 386 architect but can be run under AMD64 architecture.
q4wine.brezblock.org.ua
Wine-doors
# pkg_add -r wine-doors
Wireless Networking
# sysinstall
OR
Once the wireless network device has been installed or identified, it must be loaded on boot and included in
the /boot/loader.conf file.
These modules must be loaded at boot time to enable cryptographic support for security protocols.
The control of the wireless connection and the authentication (key negotiation or authentication with a
server) is done with the wpa_supplicant utility.
WEP
The wpa_supplicant can be used to configure the wireless network device with WEP encryption.
Initializing interface:
-i ifname
Use the specified wireless interface.
-c config-file
Use the settings in the specified configuration file when managing the wireless interface.
WAP
The wpa_supplicant is used to configure the wireless network device with WAP encryption.
Initializing interface:
-i ifname
Use the specified wireless interface.
-c config-file
Use the settings in the specified configuration file when managing the wireless interface.
www.michielovertoom.com/freebsd/wifi-configuration/
albertux.ayalasoft.net/2010/02/28/freebsd-wireless-wep-wap/
www.howtobsd.com/?p=186
jasonk2600.wordpress.com/2010/01/09/quickie-howto-wireless-access-in-freebsd-8/
www.unix.com/man-page/FreeBSD/8/wpa_supplicant/
www.freebsd.org/doc/en/books/handbook/network-wireless.html
Wifimgr is a GTK+-based GUI for management of WiFi networks on BSD systems. It acts as an interface to the
existing /etc/wpa_supplicant.conf network configuration file, and supports WEP and WPA-PSK security.
Install wifimgr:
# pkg_add -r wifimgr
Support for the FreeBSD wifimgr must be included in the /etc/rc.conf file.
Once you are connected to a wireless access point – you must use this command to acquire a network
address:
# dhclient wlan0
# pkg_add -r v4l_compat
# pkg_add -r libv4l
# pkg_add -r pwcview
# pkg_add -r cuse4bsd-kmod
# pkg_add -r webcamd
Restart devd
# sudo /etc/rc.d/devd restart
Load cuse4bsd
# sudo kldload cuse4bsd
# pwcview
www.selasky.org/hans_petter/video4bsd/
forums.freebsd.org/showthread.php?t=15224
www.rockafunk.org/InstallWebcamd.html
wangjianjun.wordpress.com/2010/09/29/webcam-on-freebsd
Virus Detection And Removal
Software installation:
(# indicates a typed command.)
# pkg_add -r clamav
Configuring clamav.
To initiate the clamav daemon at system boot time requires several things.
FreeBSD can be configured to access remote computer hard drives or networked hard drives.
GVFS is an application that provides a virtual filesystem for the GNOME desktop. This application allows users
easy access to remote data using several transport protocols It provides an abstraction layer for the reading,
writing and execution of files.
GVFS uses FUSE and is a replacement for the earlier GnomeVFS application.
Software installation:
(# indicates a typed command.)
# pkg_add -r gvfs
ph7spot.com/musings/in-unix-everything-is-a-file
Common System Commands
Mount CD / DVD:
# mount -t cd9660 /dev/acd0 /media/cdrom
Power down:
# shutdown -p now
Reboot:
# reboot
This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for
advanced users.
cb.vu/unixtoolbox.xhtml
Additional Software
GNUcash Transmission
Quicken-like money and finance manager The "meta-port" for Transmission BitTorrent client
pkg_add -r gnucash pkg_add -r transmission
Scribus Gimp
A comprehensive desktop publishing program The "meta-port" for The Gimp
pkg_add -r scribus pkg_add -r gimp
Vlc Xsane
Multimedia streaming server and player for various Gtk-based X11 frontend for SANE (Scanner Access
audio/video formats Now Easy)
pkg_add -r vlc pkg_add -r xsane
Pidgin Xchat
Multi-protocol messaging client (GTK+ UI) An X11 IRC client using the GTK+ 2 toolkit
pkg_add -r pidgin pkg_add -r xchat
Firefox Thunderbird
Web browser based on the browser portion of Mozilla Standalone mail and news that stands above
pkg_add -r firefox pkg_add -r thunderbird3
Lightspark Xchm
An alternative Flash Player implementation Windows HTML Help (.chm) viewer for UNIX
pkg_add -r lightspark-devel pkg_add -r xchm
OpenJDK Xpdf
Open-source implementation of the Java Platform, Display PDF files, and convert them to other formats
Standard Edition. pkg_add -r xpdf
pkg_add -r openjdk6
Gnome-commander2
Fwbuilder File manager for Gnome2
Firewall Builder GUI and policy compilers pkg_add -r gnome-commander2
pkg_add -r fwbuilder
Gkrellm
A GTK based system monitor
pkg_add -r gkrellm
Please check the Configuration Options for each software package or port you install.
You can view the Configuration Options for software packages here: www.freshports.org
References
FreshPorts has everything you want to know about FreeBSD software, ports, packages, applications, whatever
term you want to use.
www.freshports.org
FreeBSD Handbook
www.freebsd.org/doc/en/books/handbook/