Page MenuHomeSolus

Support driverless printing
Closed, ResolvedPublic

Description

Add support for so-called "driverless" printing that autofetches CUPS drivers, without the need for us to package up a billion PPD files, like
the ones we can't distribute.

Also investigate if this bails us out of the sorry mess of Brother drivers

Edit: Also add https://github.com/google/cloud-print-connector because popey said so. (USB printer attached to Solus box and print from a phone. yay)

Event Timeline

ikey added a subscriber: ikey.
ikey triaged this task as High priority.Aug 12 2017, 12:34 PM
ikey updated the task description. (Show Details)
ikey edited projects, added Hardware, Platform Integration; removed Lacks Project.
UPDATE: D809 is a per-requisite because there is a dependency with the cups.service and the current package doesn't have it.

I think driverless printing should already work and it shouldn't be hard to setup since D530 was already rolled out.

Here are the basic instructions to configure it:

Make sure the printer is turned on and connected to the computer ?

Make sure to enable cups-browsed if not already done:
sudo systemctl enable cups-browsed.service

Edit the file /ect/cups/cups-browsed.conf and uncomment one of these lines:
CreateIPPPrinterQueues driverless
CreateIPPPrinterQueues All

Start or restart the service:
sudo systemctl restart cups-browsed

Check the existence of the queue with:
lpstat -t (the device-uri should begin ipp:// or most likely usb:// for usb printers)

Check the queue options with:
lpoptions -p <queue_name> -l

Could anyone try this please ?

Make sure to enable cups-browsed if not already done:
sudo systemctl enable cups-browsed.service

Edit the file /ect/cups/cups-browsed.conf and uncomment one of these lines:
CreateIPPPrinterQueues driverless
CreateIPPPrinterQueues All

Start or restart the service:
sudo systemctl restart cups-browsed

Check the existence of the queue with:
lpstat -t (the device-uri should begin ipp:// or most likely usb:// for usb printers)

Check the queue options with:
lpoptions -p <queue_name> -l

Could anyone try this please ?

I just tried this and I cannot restart the cups-browsed service. However it did create the symlink to enable the service so I have no idea what is wrong with it.

Failed to restart cups-browsed.service: Unit cups.service failed to load: No such file or directory.

Also I do this all the time too but I think you meant /etc/cups/cups-browsed.conf :)

@alecbcs with which version of cups & cups-browsed did you try ?

@kyrios123 I received the same as above, using cups 2.2.3 on Solus Shannon, fully updated

@kyrios123 I received the same as above, using cups 2.2.3 on Solus Shannon, fully updated

Then you missed the update. I tried to make it visible. ?
The update of cups might be released very shortly. It's being tested atm.

@kyrios123 @ikey @alecbcs I just got this working on a fully updated, fresh install utilizing Shannon. Done in a VM to ensure no contamination from anything else.

Required package: nss-mdns - This is the only additional package I had to install after a clean install of Solus and fully updating via Shannon repository.

sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service

Our default /etc/nsswitch.conf is effectively empty. I borrowed one from an Arch install, and did the following: change the hosts line to include mdns_minimal [NOTFOUND=return] before resolve and dns

Following this, open print settings, unlock it, and add a printer. It almost immediately found my printer by IP address. Give it a minute, and it'll find it by IPP. In my case, the address is Canon59fc21.local. As displayed from Arch system-config-printer GUI this is ipp://Canon59fc21.local:631/ipp/print - Unsure why I am unable to view this full address from print settings in Solus.

Tested with a Canon MF229DW connected to my LAN via WiFi. Below is the /etc/nsswitch.conf I am using.

Packages/versions used:

  1. cups 2.2.3
  2. cups-filters 1.16.1-15
  3. print settings 1.5.7-5
  4. nss-mdns 0.1
  5. avahi 0.6.32-7

In short, this appears to be a dependency, config, and service issue. Not a cups version issue.

#Begin /etc/nsswitch.conf

passwd: compat mymachines systemd
group: compat mymachines systemd
shadow: compat

publickey: files

hosts: files mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

# End /etc/nsswitch.conf

@broken6r actually the only line you need in /etc/nsswitch.conf for this to work is the the hosts: one and the below line is probably better unless you have to lookup both ipv4 and ipv6 for .local hosts on your network.

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

@ikey is there a way to update /etc/nsswitch.conf when nss-mdns is installed without having to use comar ?
The idea would be to comment the host line and replace it with the above one when the package is installed to have something working out of the box.

Pre-enabling avahi service is perhaps a good idea as desktops are almost always connected to a network nowadays.

What do you think ?

We want a stateless nsswitch.conf ideally tbqh. Also we want to specify mdns_minimal to be non fatal.

^ Not going stateless just yet, need to unfuck the stateless glibc patches into a fresh set..

ikey claimed this task.

So, driverless printing works. Thanks all for helping get this to work!

Screenshot from 2017-10-10 01-01-05.png (1×1 px, 1 MB)