2016년 3월 5일 토요일

Canon Pixma MG2490 as CUPS print server on Fedora 23

A machine with Fedora 23 installed will act as a print server for both Linux and Windows clients.

What
is really nice is that using ipp, CUPS can now share printers over the
network to Windows clients without messing with Samba configuration!

At first, I naively thought that simply installing cups and xsane would be suffcient:

sudo dnf install cups xsane

However these packages and their dependencies are not sufficient for getting the MG2490 to print or scan.

Initially I also tried installing the package cnijfilter-mg2400-series.rpm.tar.gz
but again, this package alone is not sufficient for setting up the
printer/scanner. I therefore removed this package and was able to get
the printer/scanner working just fine with the pure open-source drivers.

Referring to /var/log/dnf.log Here are all the packages I installed on Fedora 23 server for the Canon Pixma MG2490:

cupsgutenprintgutenprint-libsgutenprint-foomaticgutenprint-cups

foomatic

foomatic-dbsystem-config-printer (optional, but recommended)

sanesane-backends-drivers-scannerssane-backends

xsane (optional, but recommended)

Once everything is installed, start the cups systemd service:

systemctl start cups

Make sure the MG2490 is connected by USB cable to your CUPS print server and then run system-config-printer as root. Select "Add" and choose printer and your MG2490 should appear in a list. Choose the "USB MG2490" entry. The gutenprint-foomatic package includes a postscript PPD file for the Canon MG2400 series, so your printer should appear in the list under Canon printers

Since
you will be sharing this printer on the network, in the printer
properties make sure it is shared for all users. One of the dialog boxes
will also offer to set up rules for CUPS and IPP in firewalld (how
convenient!).

If you don't use system-config-printer, however, you will have to add several rules to firewalld manually using the gui firewall-config or on the command line with firewall-cmd.

In
your default zone, open up port 631/tcp (for CUPS remote administration
http interface) and also allow ipp-client traffic.There might be other
settings required, but these are the ones that occur off the top of my
head (I just used system-config-printer because I'm lazy).

Now from the server machine, open a browser and navigate to http://localhost:631, login to Printer Administration with root:password

for your server, and print a test page. You can also print a test page from system-config-printer.

To add the Canon MG2490 for Windows clients, click on Control Panel -> Add New Printer, and select Network Printer.

In
the address bar, enter the IPP address of your printer listed in CUPS.
You can find this address in the CUPS web admin page on port 631 or
through system-config-printer. In my case, the IPP address is:

ipp://192.168.30.6:631/printers/Canon_MG2400_series

But in the "Add Network Printer" dialog box on Windows clients, change this to http:

http://192.168.30.6:631/printers/Canon_MG2400_series

Note
that the Windows client must have windows drivers for the MG2490
installed. Windows users will be prompted to select the printer driver.
They should select the driver named "MG 2400 series". In the case of Windows 10, however, it will automatically detect the printer and install all drivers for the printer and scanner automatically! Once
the printer is set up, have the Windows user print a test page. In my
experience the initial test page took > 1 minute to print, but
subsequent print jobs from Windows clients were processed much more
quickly (< 30 sec).

It is such a relief to be able
to set up a Linux print server for Windows clients without messing with
Samba shares. Thank you, Linux + IPP!