| Linux Newbie Guide VII - Basic Configuration |
|
|
Page: 1/2 [Printable Version]
How to setup my soundcard?
Try to run (as root)
sndconfig
Unless you have a very fancy sound card, this will work for you. At the end of
the setup, Linus says how he pronounces "Linux". (On RedHat,
"sndconfig" can be also run via the "setup" utility--type setup
. )
You may want to try your soundcard and cdrom using a command line cdplayer.
Put a music CD to your CDROM and type:
cdplay
If this does not work, maybe you don't have /dev/cdrom? Check
if you can mount a data CD as root and create the device /dev/cdrom
by linking it to the appropriate drive (most likely /dev/hdb), for
example:
ln -s /dev/hdb /dev/cdrom
If cdplay works for root, but does not work for a regular user, you
may need to give (as root) everybody the permissions to read and write to the
the file /dev/cdrom or review the permissions on /mnt/cdrom, or
modify /etc/fstab as explained earlier, e.g.:
chmod 666 /dev/cdrom
(The directory /dev is where all your devices appear as files.)
To play third song, try:
cdplay play 3
You can also use the command cdp for rudimentary command line
interface to cdplay, but perhaps you prefer the interfaces available from
under X-windows (e.g., from KDE "K" menu, choose:
Multimedia-"CD Player").
To stop the music either press the button on your CDROM or issue one of these
commands:
eject
cdplay stop
Troubleshooting. If you are having problems with soundcard,
manual installation is an option. Here is my setup for a
SoundBlaster16-compatibile sound card that persistently played at half speed
because it was misdetected. The resource to read turned out to be: /usr/src/linux-xxx/Documentation/sound
(hope you installed the kernel source code, so you have the Documentation).
The file to edit is /etc/modules.conf. The critical line in this file
(after manual edition) is:
options sb esstype=1688 io=0x220 irq=5 dma=0 dma16=5 mpu_io=0x330
The change that I had to make was to insert the "esstype="
option. After modification, the best to test your setup is to cold reboot
(power down, and then recycle the power).
How do I setup my printer?
From the GUI login screen, logon as root. If X-windows is not running, start
an X-windows session by typing (as root):
startx
Read here
if your X-windows is not set up properly yet.
Start an X-terminal (perhaps by pressing the proper button) and type in it:
printtool &
This program does a complete printer setup, you just have to fill up the
information about your type of printer and where it is hooked up.
Specifying the proper printer port is the most important part. If you don't
know which one is yours try:
on RedHat 5.2: lp1 (this is the first parallel port on RH5.2 ) or lp2
(this is the second parallel port on RH5.2) or lp3 (this is the third parallel
port on RH5.2); on RedHat 6.0 (or later): lp0 (this is the first
parallel port on RH6.x) or lp1 (this is the second parallel port on RH6.x) or
lp2 (this is the third parallel port on RH6.x). After upgrading from
RH5.2 to 6.0, the printing stopped working because the name of the parallel
ports changed. I had to re-run the printool and adjust the port. The numbering
of ports changed to bring it in line with numbering of other devices, which
always starts from 0.
Try printing an ASCII test-page straight to the port. Only when this works set
up the bells and whistles.
If you are setting up a remote printer, make sure that your machine has the
permission to use the remote printer. The permissions are set in the file /etc/hosts.lpd
(more secure) or /etc/hosts.equiv (less secure) on the machine
to which the printer is attached. These files simply list the names of the
remote computers that can use a local printer, one computer name per line.
Mine looks like this:
hacker
mars
The file /etc/hosts.lpd did not exist on my system, so I created it.
For quick information about the printers on your machine, you may want to view
the file /etc/printcap :
cd /etc/
cat printcap
Here is the meaning of some codes that I see in my /etc/printcap:
| : |
Field separator (separates the entries in the file). |
|
(at the end of line) Continuation on the next line. |
| lp |
Name of the printer. "lp" is the name of the default printer
on your machine. Subsequent printers are often, by default, given the
the names lp0 or lp1, ... (or whatever you like) but this should not be
confused with the name of the devices (parallel ports) to which they are
connected. |
| sd=/var/spool/lpd/lp |
My spool directory (sd). |
| mx#0 |
Maximum size of print jobs (mx) in blocks. "0" means no
limit. |
| sh |
I want headers to be suppressed (sh). Header is the page with your
name that prints before your printing job (waste of paper if you print
at home). |
| rm=mars |
Name of the remote machine (rm), which on my system is called
"mars (my printer is connected to a different computer). |
| rp=lp
or
lp=/dev/lp0
|
Name of the remote printer (rp), which is the name of the printer on
the remote machine ("lp" on "mars" on my home
network)
or
the name of the device on the local machine.
"/dev/lp0" is the first parallel port on RH6.x (it used to be
/dev/lp1 on RH5.2, the numbering of parallel ports changed).
|
| if=/var/spool/lpd/lp/filter |
Input filter (if). Your printing job will be formatted by this
"filter" before it is sent to the printer. |
| sf |
Suppress the form feed (sf) that is normally sent when printing
is completed (use it if your printer keeps printing an empty page at the
end of each jobs). |
The printer is controlled using the command lpc (as root). Type
"?" to see the options. This program is notorious for its
peculiarities, so don't get discouraged easily. The printer queue can be
viewed with lpq and cleaned up with lprm , both of which
work for a user (not only root). You can print from the command line using the
command lpr. Under KDE, you can control the printer queue from
the program available under the
"K-button"-"Utilities"-"Printer Queue".
|