[Solved] how to install a printer directly connected to dietpi (via USB)

let’s try to replace CUPS config file with ours

systemctl stop cups
rm /etc/cups/cupsd.conf
dietpi-software reinstall 187

Thanks Joulinar ,
Now I can reach the CUPS from the browser. If I use https it says me it’s not safe but I think this is not a problem since I’m using it only from inside my network, isn’t it?
Let me check if I can easily manage the printer installation and I’ll be back to close the topic :wink:

Yes the warning on https is as expected as you don’t have a trusted SSL certificate by default.

I installed the printer and it is working well :wink:
Another problem solved thanks to the community and Joulinar, of course :smiley:

Sorry, I just realize I have another problem. The printer for me is also a scanner but from the Mac I can’t see this function.
Should I install something different in the CUPS?

You mean to use the scanner function?

yes

CUPS can’t share a scanner over the network. For this you would need something like sane (Scanner Access Now Easy)

http://www.sane-project.org/
https://wiki.debian.org/SaneOverNetwork

But I never did something like this myself as my HP MFP is providing this by its own.

mm, also my HP deskjet is an all-in-one (printer & scanner). Does this makes difference?

Still CUPS will not be able to share the scanner function. As said above, this would require a different solution. Maybe you can search the web on how this might be possible for your printer.

I re-open this topic because I don’t know why, but the printer stop to work now.
I can see the first page of CUPS at the usual address HTTP://192.168.1.15:631 but when I try to go on the printer page it says the address is not working… How can I check if CUPS is still running and working well?

systemctl status cups
journalctl -u cups

Looks like it’s not working, isn’t it?

 root@DietPi:~# systemctl status cups
● cups.service - CUPS Scheduler
     Loaded: loaded (/lib/systemd/system/cups.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● cups.socket
       Docs: man:cupsd(8)
root@DietPi:~# journalctl -u cups
-- Journal begins at Sun 2022-02-20 08:17:25 CET, ends at Sun 2022-02-20 18:57:37 CET. --
-- No entries --

How can I restart it?

Did you have done a reboot? If yes, looks like the service is not starting on boot.

To enable start on booot

systemctl enable cups

To start manually

systemctl start cups

Hi again,
I’ve tried with both command and now the cups through the browser is working and I can see the printer installed. The problem is that I can’t see it using other devices in the network…
Looks like it is not shared anymore.
How can I check if it is shared?

should be the Avahi Daemon

systemctl start avahi-daemon

Great! now it’s working again.
Should I give a command to autostart also Avahi Daemon in case of reboot?

usually all services we install should start automatically be default. But you could give the same command to enable start on boot.

Sorry, guys,
I re-open this topic because after a completely new installation of dietpi on a raspberry pi zero, I’ve re-installed also CUPS in order to repristinate the printer, but a strange thing happens: I can see the admin panel on the browser, I can also add the printer. The problem is that even I can see the printer installed, and it let me launch the printing process, the printer does not print anything. The stranger thing is that I can see also the completed printing process in the Jobs list on the CUPS’ admin panel.
Is there something I can do? I also tried to delete the printer and install it again but still the same problem…
Had someone had the same problem?

does the job get processed inside CUPS?