Ubuntu uses the CUPS
(Common UNIX Printing System)
service which is installed by default.
CUPS uses printer definition (PPD) files as print drivers.
Common printers such as the Postscript printer in the lab already
have a suitable PPD file in Ubuntu's foomatic database and
Ubuntu makes the installation completely brainless.
Activate the Printer config tool via:
System
Administration
Printing.
Activate the
New Printer
button.
In the Select Device popup, the lab printer found on
the 10.42.1.* subnet as:
HP LaserJet P4515
Click Forward.
A suitable driver is automatically set up.
Lastly, in the
Describe Printer, change the
Printer Name to something simpler, like:
labpr
Convert Man Pages to PDF
You can create a high-quality PDF document containing the contents
of a man page with a few simple steps. Let's say we want to
do this for the rsync command. First run
man rsync
Note the top line:
rsync(1)
which means that we're looking at "section 1" of the man pages.
The entirety of man pages are located in the directory:
/usr/share/man
Doing a listing of this directory reveals the subdirectory man1,
which is the "section 1." Inside this directory we obtain the
actual compressed source file:
/usr/share/man/man1/rsync.1.gz
This file is what we need to do the conversion.
Conversion command
It is done using
the following command:
$ man -l -Tps /usr/share/man/man1/rsync.1.gz | ps2pdf - rsync.pdf
What is happening is:
the man command with the "-l" option
does the conversion
of the actual compreesed
file to postscript format (-Tps) and sends
that to standard output.
the pipe symbol, |, connects the standard output of the man
command to the standard input of the ps2pdf command.
the ps2pdf (postscript to pdf) command takes standard input
represented by
the following "" and converts to PDF format as the
output file rsync.pdf.
If you want easy reference of this document, move it to the
your Desktop and double-click to read and/or print.
$ mv rsync.pdf ~/Desktop
Alternatively,
the default PDF or Postscript reader is called evince, and you
can summmon it from the command shell by:
$ evince rsync.pdf &
xml2 on other systems
The xml2 executable is part of a suite of
executables which perform simple
conversions to and from a variety of formats. The website is: