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.
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
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.
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
Issue the command “sudo system-config-printer” (no quotes)
Provide your password when prompted.
The Printer Configuration window should have opened
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.
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
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)”
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.
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.
If everything went well, you will now see a new printer added to your installed printers list under “Printer Configuration“.
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?”
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.
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.
Apprecaiiton for this information is over 9000Â—thank you!
Great help – you da man!
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.
THANK YOU!! I really needed this.
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.
Thanks, that solved the problem I was having.
Comments are closed.