Hello Alan,

(meanwhile, Windows can print to the thing effortlessly....)
I guess, that you are going to configure a network printer.

I will try to explain you my setup; maybe you or others can derive something from this.

Make sure, that the user, which you configure the printer with, is a member of the group "lpadmin":

   $ gpasswd --add <some_user> lpadmin
   $ getent group lpadmin
   lpadmin:x:<some_group_id>:<some_user>

On the server-site, the configuration file "/etc/cups/cupsd.conf" should be configured like so. See comments for explanations:

   # Only listen for connections from the local machine.
   Listen localhost:631
   # custom - 20210706 - rfischer: set custom listen address to
   "192.168.1.80" to make it available via the network
   Listen 192.168.1.80:631
   Listen /run/cups/cups.sock

   # custom - 20210706 - rfischer: make cups available via "hostname"
   or "domain"
   ServerAlias *

   # Restrict access to the server...
   #<Location />
   #  Order allow,deny
   #</Location>
   # custom - 20210706 - rfischer: allow access from "localhost" and
   via the network
   <Location />
      Order allow,deny
      Allow localhost
      Allow from 192.168.1.*
   </Location>

   # Restrict access to the admin pages...
   #<Location /admin>
   #  Order allow,deny
   #</Location>
   # custom - 20210706 - rfischer: make administration page available
   via the network
   <Location /admin>
      Encryption Required
      Order allow,deny
      Allow localhost
      Allow from 192.168.1.*
   </Location>

Restart the daemon on the server-site:

   $ systemctl restart cups

This will also restart the Systemd socket unit "cups.socket" and "cups.path".

Make sure, that CUPS is running on "192.168.1.80:631":

   $ ss -tulpan | grep "631"
   tcp    LISTEN   0        5          192.168.1.80:631 0.0.0.0:*      
   users:(("cupsd",pid=2190,fd=8))
   tcp    LISTEN   0        5              127.0.0.1:631
   0.0.0.0:*       users:(("cupsd",pid=2190,fd=7))
   tcp    LISTEN   0        5 [::1]:631               [::]:*
   users:(("cupsd",pid=2190,fd=6))


If printing via hostname is desired, you can add the following entry for your local DNS server:

   192.168.1.80 cups.intern

This Forward DNS lookup entry can also be entered on the client-site in the configuration file "/etc/hosts".

Your CUPS isntance should be now available via "cups.intern:631". There you should be able to configure your printer.

I configured the server-site via USB:

   usb:/<some_printer_name>?serial=<some_serial_number>

In the best case, CUPS already has a pre-installed printer driver or you have a PPD (PostScript Printer Description) file, which you can upload, when adding the printer.

Once configured, the directory tree of "/etc/cups/" on the server-site should look like this:

   $ tree -ugp --noreport --charset iwantprintableasciiplease /etc/cups
   /etc/cups
   |-- [-rw------- root     lp      ]  classes.conf
   |-- [-rw-r--r-- root     root    ]  cups-browsed.conf
   |-- [-rw-r--r-- root     root    ]  cupsd.conf
   |-- [-rw-r--r-- root     root    ]  cups-files.conf
   |-- [drwxr-xr-x root     root    ]  interfaces
   |-- [drwxr-xr-x root     lp      ]  ppd
   |   |-- [-rw-r----- root     lp      ] <some_printer_name>.ppd
   |-- [-rw------- root     lp      ]  printers.conf
   |-- [-rw-r--r-- root     root    ]  raw.convs
   |-- [-rw-r--r-- root     root    ]  raw.types
   |-- [-rw-r--r-- root     root    ]  snmp.conf
   |-- [drwx------ root     lp      ]  ssl
   |   |-- [-rw-r--r-- root     root    ]
   <some_hostname_from_/etc/hostname>.crt
   |   |-- [-rw-r--r-- root     root    ]
   <some_hostname_from_/etc/hostname>.key
   `-- [-rw-r----- root     lp      ]  subscriptions.conf

Since I do not want to install the printer driver on every client and let the clients render the pages, I want to let the server handle these things.

On the client-site (localhost:631) therefore, I can just add the printer via "http/s" or "ipp/s" and transfer everything either via "IPP everywhere" or "raw":

   ipps://cups.intern:631/printers/<some_printer_name>

Be aware, that "raw" is deprecated and newer versions of CUPS will remove it. So "IPP everywhere" would be the choice, but I stick to "raw", since the former shuffles print jobs for some reason, when I want to print multiple files via "lpr <some_file1> <some_file2>" on either the client- or server-site.

You should now be able to print a test page on the client- and server-site.

Much success and a pinch of luck! :)

-Ramon

On 08/09/2022 18:52, Alan Grimes wrote:
Ok. I'm going to have to do it. I'm going to have to get my blessed printer working.

It is the finest laser printer money can buy. God himself uses it to process the paperwork involved in assigning souls to either heaven or hell... What I'm saying is that the printer is such an immaculate example of printing perfection that linux is going to give me absolute hell getting it working.

I will be sthocked if I can get it working in less than two weeks working full time and without influcting a migraine and/or an ulcer on myself.

(meanwhile, Windows can print to the thing effortlessly....)

Right now linux is so broken that the CUPS web interface will deny all attempts to administer the printer and reject any password. The config file is written in moonspeak, I just need the motherfucking thing to say yes when I tell it to do a thing. I expect it to take 2-3 days just to get over this hurdle.

How can people actually go around installing linux on people's computers as if they were doing them a favor when it really is this bad?


--
GPG public key: 5983 98DA 5F4D A464 38FD CF87 155B E264 13E6 99BF

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to