Alma 9 newbee here, so bear with me.
I’ve got AL9 installed and now I’m building it out. I want to add a printer that is wired and various AL wiki pages point to You configure printers on the Printers page (Configuration Menu > Fulfillment > General > Printers).
But there is no direction as to how to find the Configuration Menu. I can find the Setting gear but nothing there matches the above instructions. I do see in Settings the way to get to the printers and it sees the wired printer (I think) but I am unable to make modifications that stick.
First open a web browser. Make sure that the cups daemon is running. systemctl status cups.service
If not, start it. systemctl enable --now cups.service (This should all be done as root or with sudo, giving root privilege.
Now, in the browser go to localhost:631
This gives the cups interface.
I’m not sure what instructions you’re following, it sounds as if it’s something for Gnome. I’m sure it works, but I’ve never used it. Cups is the more common way.
To spam my own page, I have a command line only method written out at https://srobb.net/cliscanprint.html
The instructions are more for a wireless printer, but should work for a wired one as well.
Great info Scottro! I’ll get on it and report back later. It is still a puzzle though as to where the heck the Configuration Menu lives, and I think you are right that is is probably Gnome, maybe an older pre-40 version and that is why it doesn’t match up to the newer Gnome stuff.
> lpadmin -p HPLJ-MFP-M477fdw -E -v ipp://192.168.1.22/ipp/print -m everywhere
lpadmin: Unable to connect to "192.168.1.22:631": Connection timed out
97 dunwellguitar3:/home/dunwell
> lpinfo
lpinfo never returns anything which implies that cups doesn’t see any printers at all. When I go into the DT print stuff it knows about the printer but doesn’t have it fully configured. When I try to add with another name it fails out.
I also tried going to localhost:631/admin/ and trying to add there but it fails out saying it can’t find a driver. It showed my HP printer with a cups driverless ppd but it still fails with Unable to copy ppd file
I’ll try to figure out how to download some drivers so maybe it will be able to find the proper driver.
Ok, first question. Can you ping the printer? If not, there’s your problem, and you would have to fix that first. That first part you mention, of Connection timed out sounds a bit like that.
Now, if you have a pdf, and can reach the printer, you should be able to use netcat to print, though that’s only for basic printing, with nc 192.168.1.22 9100 < myfile.pdf
(9100 is the port it’ll use, it’s the default jetdirect port, if you remember them.).
I’m on FreeBSD right now so can’t doublecheck this, and of course, have a different printer. When I went to look it showed me it’s using the everywhere driver. (My printer is a Brother MFC and the printer.conf file in the cups directory says MakeModel MFC-L3780CDW series - IPP Everywhere which might indicate that the everywhere driver is different for different printers.
Sooo, I think first I’d make sure the system can ping the printer. Secondly, that the cups service is running, you can check with systemctl status cups
The lpadmin command might require root privilege as might adminstrating the printer with the web interface.
Hopefully, someone with more printer knowledge will chime in.
My only other thought is that it might be SELinux or the firewall. You can test by temporarily stopping the firewall service with systemctl stop firewalld and testing. (I get paranoid doing this, I might only do it if my machine is on the LAN and not open to the outside world, but in practice, it should be safe for a few moments anyway) and trying the lpadmin command again. If it now works, you know it’s the firewall and you’ll have to try to figure out what the issue is.
The same with SELinux, though i don’t get too paranoid when that’s temporarily off for a short time. With root privilege run setenforce 0 and try the lpadmin command. With both of these tests, the firewall and SELinux one, if it’s still failing it means neither of these is the problem so re-enable (the firewall is systemctl enable firewalld and SELinux is setenforce 1) because it’s very easy to forget you turned one or both off.
All good suggestions scottro. I can ping and I tried your trick with netcat and it printed the .pdf file OK. I also used netcat with -vz to verify port 631, all OK. Thinking on your comment about the printers.conf I went and looked and it seems my printer is stopped with reason Type 4 ???
# Printer configuration file for CUPS v2.3.3op2
# Written by cupsd
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
NextPrinterId 7
<Printer HP_Color_LaserJet_MFP_M477fdw_2A9E0E_>
PrinterId 2
UUID urn:uuid:c310826b-e1ab-3186-52f8-5e78167a407a
Info HP_Color_LaserJet_MFP_M477fdw_2A9E0E_
Location 192.168.1.22
DeviceURI file:///dev/null
State Stopped
StateTime 1722962873
ConfigTime 1722962873
Reason paused
Type 4
Accepting No
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
So I’m not sure what is going on there. But at least cups does know about and have my printer. I don’t understand why lpinfo always returns nothing. Maybe because it is stopped.
And what a stupid long name for the printer. I’m wondering if I can edit the conf and change the name to something shorter like HPLJ_M477fdw. I’m thinking here ahead to giving a CL print command and having to remember that long name.
Also, I’ve got selinux set to permissive and nftables has 192,22 set to allow all.
I did download/install hplip to get drivers but I have not yet tried to edit the print deff to point to the specific driver
Ok, that’s good that it sees the printer. I wonder if it might be a filiter issue. Does rpm -q cups-filters and rpm -q cups-filters-libs show that they’re installed? If not, install them.
You should be able to rename the printer in the web cups interface to something like HP-MFP or whatever you want. There’s probably a way to do it with lpadmin too, or delete and re-add it with a new name.
If you get lpadmin working right you can do it
with the lpadmin command (after deleting it) with lpadmin -p HPMFP
and the rest of the command mentioned in my first post. That -p (for printer) can be whatever you want to call it.
Thanks scottro. I’ll check on the cups-filters and cups-filters-libs tomorrow. Just some extra data. Since I’m building out AL9 on the same machine as I have COS7 installed, I can compare the two as I swap in/out the AL9 disks. Look at the difference in these screen shots
The centos7 one can do a test page OK but the Alma/non-cos7 fails. Look at the Connection info on each one. These shot were from https://localhost"631/admin
connections. The non-cos7 one has a longer connection info that I don’t understand with a bunch of uuid blah blah stuff. When I installed/modified the AL9 one I just entered the IP address but maybe I and telling it to be the wrong type of connection???
Hokay, this will be a bit long but I want to summarize what I ended up doing.
As scottro noted the dnssd type connection seemed to be gorffed. So I went back and stepped through again using the
https://localhost:631/admin
This time I selected from the Discovered Printers list the proper make/model and selected the postscript version. That then made the connection be socket://192.168.1.22 After that I just took all the same settings I had before. Now the test page printed OK.
I really didn’t like the e x t r a l o n g name that it gave the printer by default and for sure didn’t want to have to enter that for command line printing. So I became su for a short while to avoid having to enter sudo a zillion times and did the following.
systemctrl stop cups.path
systemctl stop cups.service
systemctl stop cups.socket
cd /etc/cups
cp printes.conf printers.conf-orig
nano printers.conf
------ In nano I then changed the long line that looked like
<Printer longprinternamehere>
to look like
<Printer HPLJ_MFP_M477fdw>
exit nano and save the file
This is still a little bit long but OK.
I still needed to edit the names of the ppd file associated with the printer. So I did changed directory to
cd /etc/cups/ppd
and then made copies of the longprinternamed files with -orig on the end. Then I just renamed the actual file to match the new printer name.
Next step was to restart the three cups services with systemctl start commands just like I did with the stop commands.
At this point I went back into the browser interface and it found the new named printer just fine and printed a test page OK. It now looks like
To make it even easier I edited my personal and root .tcshrc files (I’m using T-shell) and added in an environment variable and an alias
setenv LPDEST HPLJ_MFP_M477fdw
alias lpr lpr -PHPLJ_MFP_M477fdw
When I opened an terminal window I checked with echo $LPDEST
and it came back as expected. Further a simple call to lpr with a text file name printed out the file just slicker than goose poop on linoleum.
So all in all I’m up and running with the printer. Many thanks and appreciation for all the help getting me through it.
Thanks for coming back and letting us know you solved it and how you solved it. I think (though untested by me) that you you could have used the web interface, chosen modify printer and renamed it there, and that would have taken care of the ppd file as well. (I repeat, not tested by me, and I would have just removed the printer and re-added it with the name I wanted).
I also think that you could name it whatever you wanted, like Bob, or HJ-MFP, but again, it’s a lot less important than the fact you got it working. And setting the $LPDEST fixes the nuisance of the awkward name.
In retrospect I think you are right about the web interface. I considered that and though I might hose everything up. but then again like you say, I could have just deleted the whole thing and started over. Anyway, I think we have covered the possibilities. Still no understanding of why lpinfo doesn’t return anything but at this point I’m not going to follow up on that. On to building out Apache!