Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Printer on Linux cups server - can't print from Windows 7

22 Mar 2012   #1

Windows 7 Home Premium 64 bit
Printer on Linux cups server - can't print from Windows 7

Printer (brother HL-5150D) is connected to Ubuntu 10.04 Linux desktop. I'm unable to print to it from my new hp dm4t running Windows 7 Home Premium 64 bit.

The printer is installed on, and works fine from, a laptop running Windows XT and a desktop running Windows 2000 Professional, and of course from various Linux boxes as well.

I was able to install and use the printer on the Win7 laptop by disconnecting it from the network & connecting it by usb to the laptop (using "generic" driver from Windows Update), but that's not an appealing solution.

The printer is installed on all 3 Windows machines as a network printer with the uri:
http://<server lan address>:631/printers/HL-5150D-series
and this works fine on the two older versions of Windows.

I also tried installing it on the Windows 7 machine as a local printer with that same address.

Note that the Windows 7 printer wizard does report that it was successfully installed -- but it is unable to print a test page. It is also unable to "configure the port"; in other words, after installation I went to printer/properties/ports and clicked to "configure" the checked port, and then just clicked OK on the next dialog without making any changes, but that operation fails with "An error occurred during port configuration. Operation could not be completed (error 0x000000aa)."

A typical cups access_log entry after printing from one of the other Windows machines is:
<WinXP lan address> - - [22/Mar/2012:14:53:35 -0400] "POST /printers/HL-5150D-series HTTP/1.1" 200 158521 Print-Job successful-ok

A typical cups access_log entry after trying to print from Windows 7:
<Win7 lan address> - - [22/Mar/2012:12:58:27 -0400] "POST /printers/HL-5150D-series HTTP/1.1" 200 75 windows-ext client-error-bad-request

Typical cups error_log entries after attempting to print from Windows 7:
E [22/Mar/2012:14:52:27 -0400] Missing printer-uri, job-uri, or ppd-name attribute!
E [22/Mar/2012:14:52:27 -0400] Returning IPP client-error-bad-request for windows-ext (no URI) from <Win7 lan address>

Internet printing client is enabled (in Print and Document Services).

What could be interfering with communication between Win7 and cups?

My System SpecsSystem Spec
22 Mar 2012   #2

Windows 7 Home Premium 64 bit

Correction: the cups error messages I described above don't occur while trying to print from Windows 7. Instead, they occur only while the Windows 7 printer installation wizard is running, immediately after entering the printer's uri in the wizard dialog (and before selecting the printer driver).

After the wizard finishes and reports "successfully installed...", and I try to send something to the printer, I don't think anything is sent over the network at all. I did a wireshark capture, and I don't see any activity that seems to be related to the attempted printing.

Has Windows completely disabled IPP now?
My System SpecsSystem Spec
23 Mar 2012   #3

Windows 7 Home Premium 64 bit

There are a number of threads about this problem on various forums which contain a lot of misinformation. In most of them, people are explaining how to install the CUPS printer as a network printer using procedures that worked for older versions of Windows but don't work for Windows 7 (at least not my Windows 7). In some, people talk about installing the printer in Windows 7 as a local, not a network, printer; that one works for standalone network printers but not printers managed by CUPS attached to a Linux server. And a couple of them talk about adding a "PreferredConnection" entry in the Windows registry under HKEY_CURRENT_USER\Printers\Settings. These solutions may have worked for some people (I'm not convinced) but they don't work for the version of Windows 7 that HP preinstalled in my laptop. HP, or MS, seem to have completely disabled IPP in this version of Windows.

The solution I ended up with (which in retrospect should have been obvious) was to create a Samba share of the printer: Samba makes the printer available to Windows, Samba sends the print job to CUPS, voila!

More details on the Samba solution here.
My System SpecsSystem Spec

05 Apr 2012   #4

Windows 7 Home Premium 64 bit

The Samba solution turned out to be a bad one. I don't know what caused this, but I discovered that whenever the laptop was on and running Windows 7 (Home Premium), there was a constant stream of network traffic on the order of 300Kbps between the Windows 7 laptop and the Ubuntu 10.05 server, hogging so much bandwidth that other computers in the house had trouble loading webpages. I found this in the Windows 7 Resource Monitor under Network Activity which referred to it as "System" with PID 4. I don't have any more details about this, and I don't know exactly what all this traffic was actually doing, but I did verify that as soon as I deleted the printer (in control panel) the activity stopped, and each time I reinstalled the printer, the activity restarted.

I also monitored this activity in Wireshark -- I can't explain exactly what the packets represented, but they were clearly between the laptop and the server, a continuous stream of messages between the two machines, and they were clearly printer-related (although there were no documents in any print queue).

Anyway, I deleted the printer, disabled the Samba share & searched some more and finally found the answer to the original question.


The thing that was blocking Windows 7 from connecting with the CUPS server was that Windows didn't trust the print server's self-signed SSL certificate. I found the explanation here at Microsoft Support, but the solution given there didn't work for me because my InternetExplorer didn't have any "View Certificates" button to click.

So use Firefox to navigate to https://[servername]:631. It refuses, saying "This Connection is Untrusted". Click on "I Understand the Risks", and then click on "Add Exception", and again on "Confirm Exception". Now Firefox can open the CUPS Admin webpage, so the SSL exception is working. Make note of the name of the printer to be installed.

Now it's easy. Go to Start Menu/Devices and printers.
Click "Add a printer".
Click "add a network, wireless, or Bluetooth printer
Click "the printer that I want isn't listed
Click the RadioButton next to "Select a shared printer by name"
Enter, in the text box, http://[serverName or lan address]:631/printers/[printer name] (printer name must be the exact name listed on the CUPS admin webpage)
Click next, and the printer should be ready to print a test page.
My System SpecsSystem Spec
01 Jan 2015   #5

Windows 7 Home Premium 64bit

Thanks rstiltskin for the post on this.

I don't have firefox, so instead I used Chrome to save the certificate to a file, then used internet explorer to import the certificate to the trusted root certificate store.

Also, I added
" cups_server"
to the hosts file on c:/windows/system32/drivers/etc/hosts
I had been trying to add the printer using
and it turns out the certificate did not match the URL so it wasn't working.
I then added the printer to windows using
and it printed a test page fine.
My System SpecsSystem Spec

 Printer on Linux cups server - can't print from Windows 7

Thread Tools

Similar help and support threads
Thread Forum
Printer problems print button grayed out - test print page fails
Hi, I just purchased an used computer with Windows 7Home Premium x64, this is an HP Slimline s5610f. The problem that I have is with a Brother HL 2040 series printer. It gave me a really hard time to install the drivers that I downloaded from the Brother website I kept getting a "0x00000057" error...
Hardware & Devices
Differences between Linux and Windows Server
I have been studying a web site that uses ASP.NET and so it resides on a Windows Server but it also uses some JScript so it is worth studying. Anyway, I am moving it to a Linux server and I have noticed some differences in the way it handles files. First of all, the Windows Server is not case...
Chillout Room
Server running Windows vs Linux
So I do not know much about servers but I heard that almost 50% of servers are running Linux these days cause they are more secure and cost effective. Is all this true, can someone please educate me. thanks.
General Discussion
Windows 2008 Server or Linux for server
Hi all Have been a LONG LONG user of Linux as a server (hosting VM's XP / W7 mix) and file / print sharing. I used to avoid MS like the plague as far as SERVER environments are concerned - probably because my first experince was Windows NT (Windows NeanderThal or Windows No Thanks) which was...
Network & Sharing
W7 x-64 print problem (printer on Linux)
Hi all I was messing around re-arranging hardware. Since I rarely if ever TOUCH my Linux server I decided to connect 2 printers to it rather than a Windows box - I've been messing around with all sorts of hardware and software mods lately on W7 to get the optimum mix. So Printers are now on...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 23:10.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App