We will configure the X Window System from X.org, which is available in the base FreeBSD distribution at system installation time.
There is a utility which will probe your hardware and automatically generate a suitable configuration file. With a modern monitor it will also be able to work out your monitor capabilities.
# Xorg -configure
# mv /root/xorg.conf.new /etc/X11/xorg.conf
It is possible to change xorg.conf if you do not like the resolution at which your graphics are displayed, or if no suitable graphics modes can be found for your monitor.
You should get into the habit of starting X as a non-root user. Otherwise all the work you do within X will be as root, which (as you know) is a risk if you accidentally mistype something.
So start a non-root shell, and then type
$ startx
Unless you have installed a fancier desktop, at this stage you will get an old, ugly and rather unfriendly window environment, with a few shells open. You can control it by various combinations of control- and shift-clicking the left, right or middle button on the desktop.
If you can't find the option to exit the system, then there is an emergency exit from X you can use: press Ctrl-Alt-Backspace (not Ctrl-Alt-Delete!)
The KDE environment is a lot more friendly, although a lot bigger. Insert FreeBSD disc 1 into your cdrom drive, mount it, and then install the package 'kde-lite':
# mount /cdrom
# pkg_add /cdrom/packages/All/kde-lite-3.3.0.tbz
This is actually a small dummy package which causes a number of other KDE components to be installed as dependencies. It takes a while, even from CD-ROM; don't attempt to do this over the network!
Remember to unmount the cdrom so you can eject it:
# cd /
# umount /cdrom
Now you need to go back to your non-root account, and configure it to use
the new desktop. This is configured in the file .xinitrc
in your home
directory.
$ cd
$ vi .xinitrc
exec startkde
Save and quit as usual (:wq). Now enter X again:
$ startx
If all is well, you will be taken through the KDE setup wizard. You will then be in the K Desktop Environment, complete with its web browser Konqueror. If you want mozilla, it's on the CD too.
Emergency exit from X is Ctrl-Alt-Backspace. However this immediately kills the X server and won't allow KDE to save your preferences. Use the 'logout' option from the KDE menu instead.
I find KDE's shell application 'Konsole' to have very ugly fonts and to waste screen space. Try an xterm instead:
$ xterm &
If you prefer the look of this, then create a new menu item for it:
K -> Settings -> Menu Editor
Click 'Internet'
File -> New Item...
Name your item 'xterm'
Click in 'Command' and type:
xterm -sb -sl 500 -ls
(this gives you an xterm with 500 lines of scrollback buffer)
Click on the blank document icon to choose a new icon
File -> Save
You can fit four of these xterms on a standard 1024x768 display.
If you are using ssh key pairs to login to systems, then you can make ssh-agent the parent of the entire window session; that is, instead of startx, run
$ ssh-agent startx
This allows you to type 'ssh-add' in one window, but all your windows will be able to ssh without prompting for your passphrase.
If you find the terminal beep annoying, you can disable it with $ xset b off
A good instant-messenger client can be built from /usr/ports/net/gaim
.
However, building a large and complex port like this just using 'make'
may well demonstrate some dependency issues:
===> Checking if devel/glib20 already installed
===> An older version of devel/glib20 is already installed (glib-2.4.6_1)
You may wish to `make deinstall'' and install this port again
by `make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of devel/glib20
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1
Stop in /usr/ports/devel/glib20.
Rather than manually going through the dependent ports and upgrading them, you can have sysutils/portupgrade handle this for you:
# portinstall net/gaim
You are advised not to try Games - Tactics & Strategy - KSokoban, as you can find yourself wasting large amounts of time!