Thread: Linux Tutorial
View Single Post
  #6 (permalink)  
Old 08-27-2006, 06:58 PM
WatchOut WatchOut is offline
Senior Member
 
Join Date: Aug 2006
Location: Sweden
Posts: 200
Send a message via MSN to WatchOut Send a message via Yahoo to WatchOut
Default

4.4.1 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 (look here) and create the device /dev/cdrom by linking it to the appropriate drive (most likely /dev/hdb), for example (as root):

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 a sound card, a manual configuration is an option. Here is my setup for a SoundBlaster16-compatibile ("no name") soundcard that persistently played at half speed (too slow and with "low voice") 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 that 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 (shutdown to a halt, and then recycle the power).

4.4.2 How do I setup my printer?

Start an X-terminal (perhaps by pressing the proper button) and type in it (as root or you will be prompted for the root password):

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".
Most printers will work perfectly under Linux, but some may not utilize their full capablity due to lack of information/drivers from the vendors. Therefore, when purchasing a new printer, you may want to consult the database of Linux printers: <b>linuxprinting.org/database.html</b>. In brief, it is a good bet is to select ( <b>linuxprinting.org/suggested.html </b>):

- For inexpensive colour printing: an Epson Stylus, for example: Stylus C80 (better) or Stylus C60 (cheaper) (Dec.2001). HP inkjets are generally less recommended than Epson's. Please note that "inkjet-type" printers are (in general) "not-so-great" for black-and-white printing. Also, they are meant to be "personal" printers and do not handle well high volumes. Yet they can offer excellent colour output, particularly on good quality paper. Kids love inkjets.
- For low-end laser printing: a Lexmark or Brother printer. Many Hewlett-Packard (HP) laser printers will also work perfectly, but one has to be more careful when selecting an HP printer due to their more limited support. Lower-cost laser printers are always black-and-white, but they offer excellent quality text printouts. You may avoid some headaches if you select a printer which supports "Postscript".
__________________
WELCOME TO THE BEST HOSTING IN THE WHOLE WORLD
24/7 LIVE SUPPORT Click Here
Enjoy Your Stay!
Reply With Quote