The officially official Devuan Forum!

You are not logged in.

#1 2022-01-19 11:54:56

trabant-rgb
Member
Registered: 2022-01-17
Posts: 8  

system-config-printer-udev: 70-printers.rules

Package: system-config-printer-udev
Provides the udev config file 70-printers.rules, which stops or resumes a matching cups device if a printer is added to or removed from USB.

Said rules file references a systemd service for usb device adds, and uses the program udev-configure-printer (also part of the pkg) for removals.

It is very easy to change /usr/lib/udev/rules.d/70-printer.rules so an added USB printer is activated when not using systemd - udev-configure-printer can handle this as well.

-ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", ENV{ID_USB_INTERFACES}!="*:070104:*", TAG+="systemd", ENV{SYSTEMD_WANTS}="configure-printer@usb-$env{BUSNUM}-$env{DEVNUM}.service"
+ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", ENV{ID_USB_INTERFACES}!="*:070104:*", RUN+="udev-configure-printer add %p"

However it takes some time to figure this out... so the question is if there's some easy way to change this in the package, either by repackaging or by adopting the file conditionally in a post install script and feeding the complete package back to the Debian upstream...?

PS - system-config-printer-udev comes with system-config-printer, which itself came (in my case) with gnome-core.

Offline

Board footer