Make Your Machines Fit to Print

1. How can I set up a printer under lpd?

1. How can I set up a printer under lpd?

Let’s set up an old Okidata Microline ML-182 dot matrix printer as a log printer on the parallel port.

If you’re using GNOME, you can use the GNOME printer configuration utility (KDE has a similar utility). Under Red Hat 7.3, it’s located under GNOME Start, Programs, System, Printer Configuration. If you’re (wisely) not logged in as root, the utility will ask for your root password. Then, using the new printer wizard:

  1. Click on New and Next.

  2. Choose a local printer (LOCAL) and give it a name, for example, lp. Click on Next.

  3. Enter the name of the device that the printer is attached to. For this example, assume the device is /dev/lp0. Click on Custom Device, enter /dev/lp0, and click OK. Click on Next.

  4. Select the printer driver. Here, choose Okidata, Microline 182, and Oki182. Click on Next, review the settings, and click Finish.

To test the printer type date | lpr -Plp at a shell prompt. If the date comes out on the printer, you’re ready to use the printer from the local machine.

If you’re connected to the Internet or have several machines on your network, you should configure access to your printer using /etc/lpd.perms. Securing your printer is as important as securing any other network service: if you do not have a firewall and you do not restrict access to your printer, your system can accept print jobs from any other machine connected to Internet. Some of the privileges you can grant are: control print jobs; remove print jobs; query the status of print jobs; and accept remote print jobs.

If your internal addresses are in the space of 192.168 .232.0 with a network mask of, you can use REMOTEIP= If your addresses or netmask is different, adjust the line accordingly. If you want to grant access to a specific host, you can add REMOTEIP=hostname.

Once you have confirmed the permission configuration in /etc/lpd.perms, you can test the printer from your remote machines. If it doesn’t work, make sure lpd is running, double check the file, and try again.

2. How can I get my Linux laptop to print to my Windows-based printer?

Printing from Linux to a Windows printer is very common, and is very easy to set up.

First, you must share the printer that’s connected to the PC. For example, under Windows XP, you share a printer as follows:

  1. Install the printer and make sure it works under Windows.

  2. Go to Start, Printers and Faxes.

  3. Select the printer you want to share. In this example, it’s the printer named text on Windows XP host washin. Right click and choose Sharing…

  4. Select the Sharing tab and click Share this Printer, and name the shared device as text. Click OK.

  5. Close the “Printers and Faxes” window.

Next, on the Linux machine, follow Steps 1 through 4 as described in the first question. However, in Step 3, pick Windows printer (SMB). Then, in the configuration dialog box that appears, enter the following text into the named fields:

  1. Share: \\washin\text

  2. Host IP:

  3. Workgroup: Ryu.com

  4. User: \\washin\mascio

  5. Password: mypassword

Then go ahead and test the printer. For some printers, you may need to check the checkbox Translate \n to \r\n. If you need to change any of the properties of the printer, you can go back to the printer configuration tool and edit the printer’s properties.

John R. S. Mascio is a systems and network manager. Email your Tech Support questions to mascio@ryu.com.

Comments are closed.