Add a Network Printer to an Ubuntu Desktop – The Easy Way?

The Rant

It’s no secret that I am a fan of Ubuntu Linux. BUT.. one of the annoying things about using Ubuntu is trying to set up a network printer on a desktop or workstation. Regarding nearly all administrative tasks under most Linux systems that would require root permissions, Ubuntu has done a nice job of making it possible to operate a system as a “normal” user without elevated privileges, and then easily gain the elevated (root) privileges temporarily assigned to complete some specific administrative task. Ubuntu detects when a user is trying to do something requiring the elevated (root) privileges and pops up a small window asking for the current user’s password to gain the required permission. All the magic happens behind the scene and the user never has to issue a text command. It wasn’t long ago that users would have had to open a command terminal and issue all the instructions by hand. Well.. we’ve come a long way.. With the exception of installing a network printer. For some reason, when installing a printer in Ubuntu, the user is not prompted with the normal su password pop-up that presents itself for all other administrative tasks. Instead, the CUPS system prompts the user for the root password – and under Ubuntu, there is no root password by default meaning that root can not complete any direct action requiring a password. In fact, root can not log directly into the system at all. Fortunately, the solution is fairly easy.

The Solution

Do not try to install a printer from System > Administration > Printing menu. It won’t work. Sure, it will allow you to go through the wizard and give you the false impression that you’re actually accomplishing something – until you reach the point where a driver needs to be installed and you’re prompted for the root password. Instead, go to the Applications > Accessories menu and select Terminal.

Once the terminal window opens, issue the following command

sudo system-config-printer

The next line in the terminal window will ask for your password. Type in your user password and hit enter. If all is correct, the printer setup and configuration window will open with elevated privileges enabled and you can finish installing and setting up your new printer from comfort of an easy to use GUI.

Sample Setup

Lets take a few minutes and walk through the process. In this example, I will be setting up a Dell 1700 Laser Printer in my Home Office. Before you get started, you will need to know a few things about the printer first.

IP address: What IP address did you assign to your network printer?

RAW Port: Typically, the default RAW Port is 9100. If you assigned something different you’ll need to remember what it is.

Open a Terminal Window: System > Administration > Terminal

Terminal Window
Terminal Window

Issue the command “sudo system-config-printer” (no quotes)

sudo command
sudo command

Provide your password when prompted.

sudo password
sudo password

The Printer Configuration window should have opened

Printer Configuration
Printer Configuration

Press the “New” button to add a new printer.

The “New Printer” window will open after a brief search displaying the “select Device” panel

Under the “Devices” list, expand the “Network Printer” selection by clicking the small black arrow.

Next, Select “AppSocket/HP JetDirect

At the right, new options will be displayed (Host and Port Number)

In the host field, type the IP address of the network printer you’re installing.

In the Port Number field, type the RAW port number for the network printer. If you did not change this directly in the Printer’s Settings, or you are not sure, then leave the default value 9100.

Select Device
Select Device

Press the “Forward” button: The next panel is the “Choose Driver” panel

Choose the “Select Printer from Database” option

Highlight the “Generic” option under the “Makes” list

Chose Driver Panel 1
Chose Driver Panel 1

Press the “Forward” button: The next panel is the “Choose Driver” panel #2

On this Panel, under the “Model” list, select “PCL 6/PCL XL Driver

Under the “Drivers” Select the “PCL 6/PCL XL Driver – CUPS + Gutenprint v5.2.3 [en] (recommended)

Choose Driver Panel 2
Choose Driver Panel 2

Press the “Forward” button: The next panel is “Describe the Printer

Printer Name: in this field, type a name for your printer as it will appear in you installed printers list. I’ll call mine “Dell1700” Note that spaces are not permitted here.

Description (optional): In this field, type a short description of your printer to help identfy it in you installed printers list. I described mine as “Dell Printer Home Office”. You can leave this blank if you want.

Location (optional): In this field, put a location descriptor that will help to identify the location of the printer in the installed printers list. For this field, I used “Home Office”. You can leave this blank if you want.

Describe the Printer
Describe the Printer

When you finish, click the “Apply” button. You’ll be prompted and asked if you want to print a test page, which might be a good idea at this point to make sure you got everything set up correctly.

Test Printing
Test Printing

If everything went well, you will now see a new printer added to your installed printers list under “Printer Configuration“.

New Printer Installed
New Printer Installed

Note: This walkthrough was completed using a Dell 1700 Laserprinter and does work with these instructions. This printer does not have linux drivers available. If your printer has supported/avalible drivers provided by your manufacturer, your setup process may be different. This information is provided as a general guide.

I hope you find this information helpful. Leave a comment to let me know what you think. Is there a better / easier way to do this? Did I miss anything? Leave a comment.

8 Replies to “Add a Network Printer to an Ubuntu Desktop – The Easy Way?”

  1. Sir, you are a life saver! I just got a 1700 Dell printer from a friend who is moving. Following your notes I was able to install it in a perfect manner (slight modification to the names of the options might be noticed). Many thanks indeed.

  2. You Rock!! Installed it over and over again in App/socket and it always said ready to print, but then i got errors…

    After installing it as sudo, it worked right away. It’s always the simplest things that take the most work and effort to accomplush!!

    Thanks so much.

  3. This is just ridiculous. As of April 2012 your 2009 post is still right: Ubuntu printing config is broken and CUPS ask for a non-existent root password.

    Thanks man for you post, save me a lot of time.

  4. Sadly this didn’t work for me. I am at my wit’s end with this dumb computer. I lost the ability to print a couple of weeks ago and I have not been able to fix it. Oh well.

Comments are closed.