Saturday, December 10, 2016

Linux for Newbie(Part 5.4)

4 Printer and soundcard
4.1 How to setup my soundcard?
Try to run (as root) setup The third button from the top ("sndconfig") sets up the sound card. 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". ("sndconfig" can be also run directly from the command line--type sndconfig.) 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 a root (look here [p 62] ) 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, maybe you need to give (as root) everybody the permissions to read and write to the the file /dev/cdrom : 77 chmod 666 /dev/cdrom (The directory /dev is where all your devices appear as files.) Now, that you got hooked on cdplay, you can play third song, try: cdplay play 3 You can also use the command cdp for rudimentary command line interface to cdplay, but perhaps you preffer 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 you CDROM or issue one of these commands: eject cdplay stop
4.2 How do I setup my printer?
As root, start an X-windows session by typing startx Read here [p 74] if your X-windows is not set up properly yet. Start an X-terminal (the "two-computer" button on your K-bar) 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: lp0 (this is the first parallel port on RH6.0) or lp1 (this is the second parallel port on RH6.0) or lp2 (this is the third parallel port on RH6.0). After upgrading from RH5.2 to 6.0, the printing stopped working because of the names changes of the parallel ports. I had to re-run the printool and adjust the port. 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). These files simply list the names of the machines, one machine per line. Mine looks like this: 78 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 printer 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 (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 my system) or the name of the device on the local machine. "/dev/lp0" is the first parallel port on RH6.0 (it used to be /dev/lp1 on RH5.2). 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 with lprm,both of which work for a user (not only root). You can print from the command line using the command lpr. 79
4.3 Word Perfect 8 does not have a driver for my printer
If you installed your printer in KDE using the printtool and it had a driver which works alright, set up Word Perfect to print using the "passthru postscript" driver.

No comments:

Post a Comment