CSCI 251 Systems and Networks
Lab 4 – Installing the X-Window System and a Desktop
Environment
Wednesday, February 3, 2009
Note: The assignment is to be completed by the end of the lab
session.
Discussion
Introductory Comments
Many
server farms, scientific clusters, and other large groupings of
computers
are 'headless' i.e. the machines neither have nor need monitors. They
will typically be administered remotely when necessary. They have no
need of a gui (graphical user interface). Fortunately, Linux, like
other UNIX variants, does not have an ornate gui entangled with the
underlying OS. It runs quite nicely without a gui and, in this
semi-unbloated state, is a good fit for headless systems. Good
sysadmins find the command line to be preferrable to a gui. The command
line with a powerful shell is more powerful and efficient than
attempting general system administration with a gui. Microsoft has,
quite recently, has added shell capabilities to become competitive in
this arena. In this lab assignment, you will add a gui thereby
demonstrating its modular design in Linux. There are times one prefers
a gui, other times not. With this addition, you will have both.
As mentioned earlier, UNIX has a
modularly
separate gui. It is called the X Window System. This implementation of
this gui used with Linux is not a part of the kernel; it is a separate
body of software. Linus
Torvalds and other kernel maintainers do not maintain this gui. For
Linux, the X Window System is provided by the codebase maintained by
the X.org Foundation. It is used on most BSD variants including
the more recent Mac OS X 10.5 (Leopard) and also on Sun Microsystems'
Solaris
(X86
version, only). In Debian, the associated package name is xorg.
On
top of the xorg server, a
window manager is added to give the 'look
and feel' (desktop) environment. Linux has a wide variety of such
window managers e.g.
There
are many more desktop environments.
In
this assignment you will be working with your vbx system to
-
install
the X Window System as provided by the xorg package
-
install
a desktop environment
-
install
a graphical login
-
install
synaptic, Debian's gui
interface to package management
Instructions
Before starting the various tasks comprising this assignment
- logon to your assigned machine
- then start up your virtualized guest system, vbx
The tasks described below are to be performed on your vbx.
Task #1: Install the xorg package
Let's establish our base size by recording the current report from the
df command:
df | tee df4-0.txt
This next step may take some time, because a
rather large codebase is being installed, but the command (entered as
root) is simply
aptitude
install xorg
Now record the new size of our installation:
df | tee df4-1.txt
and then record the change as given by
diff df4-0.txt df4-1.txt
Task #2: Install the window manager
This step may also take some time. The
command to be entered depends on which window manager you want. It
could be one of these (the one chosen would be entered as root), for
example:
-
aptitude install kde
(somewhat bloated)
-
aptitude install gnome
(also somewhat bloated)
-
aptitude install kde-core
(smaller, and then you could add other packages as desired)
-
aptitude install gnome-core
(also smaller, and then you could add other packages as desired)
-
aptitude install xfce4
(smallest of these shown here, not so fancy, but will be the choice for
this course)
So enter the command:
aptitude install xfce4
Now record the new size of our installation:
df | tee df4-2.txt
and then record the change from the last check as given by
diff df4-1.txt df4-2.txt
Once xfce is installed, you
should be able to
start the X Window System with its desktop environment by entering the
command (either as root or as user):
startx
Now you can investigate the xfce
desktop. For example, does it have a browser? should it have one yet?
etc. To subsequently return to the console mode, logout (see if you can
find out how to do that from xfce).
Record what you find in this investigation.
Task #3: Install a graphical login
You can enter startx after you boot and login or you can install a
graphical login. Then once you boot, you will eventually get a
graphical login, which some people may prefer to logging in at the
console and then entering startx. Three possible choices would be (any
should work with xfce, for example):
- aptitude install kdm, or
- aptitude install gdm, or
- aptitude install xdm
Before making this choice, determine what runlevel the system is in by
entering
/sbin/runlevel
and then record the scripts scheduled to be run when that runlevel is
started. For example if the runlevel command reported 2 then the
scripts referenced in rc2.d would be those of interest and you could
enter
ls -l /etc/rc2.d | tee rc2-0.txt
For this course choose to install xdm:
Again record the new size of our installation:
df | tee df4-3.txt
and then record the change from the last check as given by
diff df4-2.txt df4-3.txt
As we did before installing xdm, record the scripts scheduled to be run
when the appropriate runlevel is started.
For example if the runlevel command reported 2 then the scripts
referenced in rc2.d would be those of interest and you could enter
ls -l /etc/rc2.d | tee rc2-1.txt
and then record the any change caused by installing xdm by
entering
diff rc2-1.txt rc2-0.txt
Finally, now that
xdm is installed, reboot as root by entering:
shutdown - r now
Your subsequent login should be graphical, with
startx no longer required.
Task #4: Install synaptic, the graphical alternative to aptitude,
and try it out
To install synaptic:
aptitude
install synaptic
After it has been installed, find
it on your desktop,
probably lurking in some menu. Activate it, and choose the Reload button from the synaptic interface, a selection
which is really the
same as aptitude's update.
Next try the Mark All Upgrades
button, which is equivalent to aptitude's
upgrade. Now use it for some package work
- remove packages as suggested by the instructor
- install the iceweasel browser
Task #5: Changing Window Managers etc.
We'll not actually carry this task out, but you are to come up with a
written plan for removing
and replacing them with
For starters, assume that you should perform these operations in
console mode with no graphical display present - because you're not
sure what removing xfce4 would do while xfce4 is active. Create a text
file containing your plan, called switchX.txt.
Task #6: Demonstration
Before you leave for the day, ask the instructor to stop by and check
your system for compliance with this assignment and to look at
information you recorded in the various tasks. Once finished, ensure
that the instructor enters that fact in his record book.