header01
header02 Products Services Support Contact
header01

Installing, configuring and sharing printers

How to find out if your printer will work in Linux

Unfortunately, there are printers that will not work in Linux. Most of the time it's because the printer manufacturer refuses to write drivers, or release their drivers so others can do it for them. Therefore, before purchasing a new printer, look up your printer in the LinuxPrinting.org database and make sure it's supported. Generally, HP and Epson have the best reputation for working in Linux.


How to install a printer using CUPS

Up until a few years ago, Linux had a reputation for having poor printer support. The CUPS project has changed all that. CUPS stands for Common Unix Printing System and was developed by Easy Software Products. CUPS provides a scheduler daemon that implements a printing system based on the Internet Printing Protocol.

To install a printer using CUPS, connect the printer to the computer (both USB and Parallel Port are now supported), turn it on, and point to Applications->System Settings->Printing. Provide the root password if prompted for it. Click New to start the Add a New Printer Wizard. Click Next to begin. The steps are:

  • Queue Name Name the printe queue. It must begin with a letter. Keep it short and remember it, because you'll need it later when setting up print shares on other computers. If desired, you can also provide a short description of the printer.

  • Queue Type Since we're configuring a locally-connected printer, choose Locally-connected from the pull-down. Your printer should be displayed in the list. If it's not, then something is wrong. Either your cables are bad, or your printer is not turned on, or your ports (usb or parallel) are not working. Investigate each of these until your printer shows up. Highlight your printer in the list and click Forward.

  • Printer Model Choose your printer manufacturer from the pull-down list, then choose your printer model from the scroll list. Click Forward.

  • Finish, and create the new print queue Look over the summary of what's about to be done and double check your choices. If any are wrong, click Back and fix them. Otherwise, click Finish.

  • Print a test page It's probably a good idea to print a test page, so click Yes to do so. If it doesn't print, choose No to see the log of the print transaction. You may find some information there that's useful.


How to share a printer with Linux users

To share a printer with other Linux users, you'll need to have both tcp and udp allowed on port 631, so modify your firewall accordingly.

Open the Printer configuration dialog box (Applications->System Settings->Printing), hightlight the printer to be shared, and click Edit. Click the Sharing... button to open the Sharing properties dialog box.

Check the This queue is available... box. If you'll be sharing this printer with all hosts, leave 'All hosts' in the Allowed hosts list. Otherwise, remove it. Then click Add. You can share your printer with all requests on a particular network interface, with a range of network IP addresses, or a particular IP address. For example, to share a printer with all hosts from 192.168.1.1 to 192.168.1.254, type:

192.168.1.0 / 255.255.255.0

in the 'Network address' boxes. When you've finished allowing hosts, click OK, then OK again to close the 'Sharing properties' dialog box. Click OK again to close the 'Edit a print queue' dialog box. Click Apply to save your changes.

Now you need to configure the Linux clients that will be connecting to use the shared printer. On the client machine, open the Printer configuration dialog box and click New. Click Forward to begin the wizard, then:

  • Queue name Choose a name for the printer queue. As before, start it with a letter and keep it short. If desired, provide the short description as well.

  • Queue type Choose Networked CUPS (IPP) from the 'Select a queue type' pull-down. In the server box, type the hostname of the computer where you installed the printer. The Path will probably be /printers/[name] where [name] is the Queue name you had to remember when you originally installed the printer. To make sure, open a Web browser on the print server and point to http://localhost:631/. Click Manage Printers, then click the Queue name of the printer you shared. The Path to use will be whatever comes after the http://localhost:631 portion of the URL. Type it in the Path box (on the client) and click Forward.

  • Printer model Choose your printer manufacturer and model as you did when you set up the printer on the server.

  • Finish, and create the new print queue Again, review your choices and click Finish if all looks ok. Print the test page to test it out

Share not working? Here are some things to look at:

  • Did you remember to open port 631 for both tcp and udp on the print server?

  • Are both computers connected to the same network that's listed in the 'Allowed hosts' in the Sharing properties on the server?

  • Did you double-check your network and print cables?


How to share a printer with Windows users

To share a printer with other Windows users, you'll need to have Samba installed and both tcp and udp allowed on ports 137-139, so modify your firewall accordingly.

Set up Samba On the print server, point to Applications->System Settings->Server Settings->Samba. Click Preferences->Server Settings and make sure the Workgroup is the same as the Workgroup on the Windows computers you're networking with. Click the Security tab and choose Share from the Authentication Mode pull-down. Click OK.

Click Preferences->Samba Users. For each Windows login that will need to access the printer, follow these steps:

  • Click the Add User button.

  • Choose nobody from the Unix Username list.

  • Type their Windows login in the Windows Username box.

  • Type their Windows password in the Samba Password and Confirm Samba Password boxes.

  • Click OK.

Close the 'Samba Server Configuration' dialog box.

Now you need to configure the Windows clients that will be connecting to use the shared printer. First, make sure you have the regular Windows drivers for the printer available. Go through the 'Add printer' Wizard, and choose 'Network Printer'. The shared printer should be listed if you click the Browse button. If it's not, something's wrong with your Samba configuration on the print server. If you're sure your Samba config is set up correctly but your printer share is still not listed, type in the Network path or print queue box:

\\hostname\name

where 'hostname' is the hostname of the print server, and 'name' corresponds to the queue name you have been remembering all this time. Note in this case you should just use the queue name without the /printers prepended to it. This is slightly different than configuring a Linux client.

Then step through installing the drivers, and print a test page.

Share not working? Here are some things to look at:

  • Did you remember to open ports 137-139 for both tcp and udp on the print server?

  • Are both computers connected to the same network that's listed in the 'Allowed hosts' in the Sharing properties on the server?

  • Did you double-check your network and print cables?

  • Does the Windows client have a firewall that doesn't allow it to connect to the print server?


Linux News courtesy of /.

What's the Damage? Measuring fsck Under XFS and Ext4 On Big Storage
2012-02-03

Linux Game Publishing CEO Resigns
2012-02-01

Greg KH Leaves SUSE For Linux Foundation
2012-02-01

Why Linux Vendors Need To Sell More Than Linux
2012-01-31

New Spark Tablet To Come Loaded With KDE's Active Plasma Interface
2012-01-29

Exploits Emerge For Linux Privilege Escalation Flaw
2012-01-25

KDE 4.8 Released
2012-01-25