24

Update 2019-01-09: Please see answer below as there is a way to fix this with CUPS 2.2.8.


I have Ubuntu 18.04 LTS installed clean on this system. When I try to add a printer through CUPS 2.2.7 address of http://localhost:631 in the Chrome browser, I can't add the printer as I keep getting Unauthorized. It never asks for a login. How do I add my printer through CUPS using Google Chrome?

BTW, Firefox works fine for adding a printer in CUPS 2.2.7.

Unauthorized: Enter your username and password or the root username and password to access this page. If you are using Kerberos…

  • Why is this question closed? CUPS is broken, and this question is quite valid! – Yanick Rochon Dec 16 '18 at 13:13
  • @YanickRochon We have reopened this question and I have added info below in the answer. – Terrance Jan 9 at 18:39
33

Update 2019-01-09: I have found that CUPS 2.2.8 works without a problem with Google Chrome in Ubuntu 18.04. I downloaded and installed it from https://launchpad.net/ubuntu/+source/cups/2.2.8-5ubuntu1.2

Please note that the bug for CUPS 2.2.7 is filed at: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1769893


CUPS 2.2.8 installation steps

Run all the following from a terminal window.

Install the prerequisites:

sudo apt install autoconf build-essential libavahi-client-dev \
    libgnutls28-dev libkrb5-dev libnss-mdns libpam-dev \
    libsystemd-dev libusb-1.0-0-dev zlib1g-dev

Download CUPS 2.2.8 and extract it and enter the new directory created:

cd /tmp
wget -c https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/cups/2.2.8-5ubuntu1.2/cups_2.2.8.orig.tar.gz
tar zxvf cups_2.2.8.orig.tar.gz
cd cups-2.2.8

Run the configure, make and make install:

./configure
make
sudo make install

You might want to put a hold on CUPS so it doesn't update back to 2.2.7 which still has the issue with unauthorized:

sudo apt-mark hold cups

Then all you should have to do is restart the cups.service:

systemctl restart cups.service

Check if the service is running:

systemctl status cups.service

If CUPS fails to restart, reinstall the daemon then restart the service again:

sudo apt install --reinstall cups-daemon
systemctl restart cups.service

Then access in Google Chrome http://localhost:631

The CUPS homepage might show 2.2.7 still, but try clicking on Administration and it should show 2.2.8.

enter image description here

Hope this helps!

  • 1
    I always had to use a different browser to resolve this issue. Great information. Upvoting for sure. – L. D. James May 6 '18 at 18:06
  • 2
    Yes this seems to work but I can't simply change the printer options. I am given back the page "Not authorized" even though I can add printers !!! – solsTiCe May 8 '18 at 10:03
  • 1
    Well, I used gnome-control-center to do that finally – solsTiCe May 8 '18 at 10:14
  • @solsTiCe Yeah, I think that is a bug between the two. I can't do the administration itself of the printer either. However, I have found that when I add the printer through CUPS this way regardless of the browser, apps in Wine will actually see and use the printer. – Terrance May 8 '18 at 13:05
  • 1
    Using Firefox works. – jrennie Dec 9 '18 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.