Printing from a Raspberry Pi to a Printer Shared from Windows
-
Assumptions: You are printing from a Raspberry Pi running Raspberry Pi OS (formerly Raspbian Linux) to a printer ared from a Windows computer.
The challenge here is that Windows by default only shares printers out over SMB. And Raspberry Pi OS, by default, to keep the install size small does not include the SMB protocol (the Samba package.) You can install it, but using a printer over SMB is often unnecessarily complicated and requires extra packages on every end point. The simpler, cleaner way to handle this so that you aren't stuck storing user credentials on Linux is to install the LDP Print Service on to Windows (this is available for both desktop and server editions.)
So on Windows, install LDP Server. Then find your printer that you want to share and in sharing make sure that its share name is in a simple, standard format (no spaces, special chars, and best to avoid caps.)
Now on Raspberry Pi OS, if you haven't done so, you'll need to install CUPS (the Common UNIX Print Service) in order to get a print mechanism (typically on Linux this is installed by default, but RPiOS is all about keeping things tiny) so let's install that and configure it:
sudo apt install cups -y sudo usermod -a -G lpadmin pi systemctl restart cups
Now on your desktop, open your web browser and navigate to http://localhost:631 and this will open your printer configuration screen. Go to Administration, Add Printer and enter your username and password (the "pi" user for many of you) and now you can choose to add an "LDP Printer" manually. When it asks for a connection string, it should look like this:
lpd://192.168.1.23/myprinter
You can use an IP address or a hostname and "myprinter" is the share name you created earlier. That's it! Select your driver and print your test page.
-
@scottalanmiller How many printers do you have still being used that do not have built in networking?
-
Along the lines of Travis' question - why are you bothering to print through Windows? Why not direct to the printer?
Additionally - the LDP printer doesn't require authentication? or the LDP protocol supports it, and you're still storing a Windows Username/Password on R Pi anyway...
-
A USB based printer can be incredibly handy from time to time, but I agree it should also have networking.
-
@DustinB3403 said in Printing from a Raspberry Pi to a Printer Shared from Windows:
A USB based printer can be incredibly handy from time to time, but I agree it should also have networking.
Well sure - but how often are you sharing a USB printer (he asks then looks around his office at the 10 USB Dymo labelers he has around the office that are shared using Dymo's USB to network print server). LOL
-
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
Well sure - but how often are you sharing a USB printer (he asks then looks around his office at the 10 USB Dymo labelers he has around the office that are shared using Dymo's USB to network print server). LOL
When you say network print server, do you mean a windows server sharing the printer? Are many of those Dymo's on local user machines?
-
@pmoncho said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
Well sure - but how often are you sharing a USB printer (he asks then looks around his office at the 10 USB Dymo labelers he has around the office that are shared using Dymo's USB to network print server). LOL
When you say network print server, do you mean a windows server sharing the printer? Are many of those Dymo's on local user machines?
Dymo makes a print server software that offers network printing, which IIRC needs to be installed on the local computer where the printer is connected via USB.
Otherwise sharing through the windows menu doesn't get you access to the printer functionality (ie margins, labels etc don't print properly).
-
While I am going the other direction- Windows to an rPi print server- this may be helpful.
My biggest issue was renaming the Printer in CUPS, the name string was extremely long , IIRC..
Been a while, have to try again.
-
@travisdh1 said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@scottalanmiller How many printers do you have still being used that do not have built in networking?
Tons, mostly Dymos which don't offer networking. But loads and loads of people randomly putting them on Windows even when they are networked. You'd not believe how often we are told that Windows sharing is a requirement.
-
@pmoncho said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
Well sure - but how often are you sharing a USB printer (he asks then looks around his office at the 10 USB Dymo labelers he has around the office that are shared using Dymo's USB to network print server). LOL
When you say network print server, do you mean a windows server sharing the printer? Are many of those Dymo's on local user machines?
no, I mean a box the size of a R Pie that has a USB port for the Dymo itself, and a ethernet jack for the network.
From there I do create Windows print queues and publish the devices via GPO, etc...
-
@DustinB3403 said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@pmoncho said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
Well sure - but how often are you sharing a USB printer (he asks then looks around his office at the 10 USB Dymo labelers he has around the office that are shared using Dymo's USB to network print server). LOL
When you say network print server, do you mean a windows server sharing the printer? Are many of those Dymo's on local user machines?
Dymo makes a print server software that offers network printing, which IIRC needs to be installed on the local computer where the printer is connected via USB.
Otherwise sharing through the windows menu doesn't get you access to the printer functionality (ie margins, labels etc don't print properly).
huh? really? I've never seen that. When I install the normal canon drivers I get all the functionality on the client (because the client pulls that same driver from the server). and I do the same for these Dymos... I install nothing special for the Dymos on the server, just the normal Dymo label printer driver.
-
@scottalanmiller said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@travisdh1 said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@scottalanmiller How many printers do you have still being used that do not have built in networking?
Tons, mostly Dymos which don't offer networking. But loads and loads of people randomly putting them on Windows even when they are networked. You'd not believe how often we are told that Windows sharing is a requirement.
Uh - hate that - personally, I'd move those devices onto a RPie and then map all the devices to it... oh yeah.. that's exactly what I am doing. It does help that I don't have a stationary computer to attach the Dymo to... laptops move in and out of the area, which meant either plugging/unplugging the label printer all the time - or doing what I did - find a way to get it on the LAN, and everyone just network prints to it.
-
FYI - Dymo now has (for a year or so) a WiFi enabled Dymo labeler - no need to do anything crazy with USB to Network boxes.
-
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
FYI - Dymo now has (for a year or so) a WiFi enabled Dymo labeler - no need to do anything crazy with USB to Network boxes.
You sure? I've not seen any networked Dymo yet.
-
Cool, but our customers will never do it. THey demand Windows printing.
-
@scottalanmiller said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
FYI - Dymo now has (for a year or so) a WiFi enabled Dymo labeler - no need to do anything crazy with USB to Network boxes.
You sure? I've not seen any networked Dymo yet.
I installed one six months ago, so yes, I'm sure.
-
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@scottalanmiller said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
FYI - Dymo now has (for a year or so) a WiFi enabled Dymo labeler - no need to do anything crazy with USB to Network boxes.
You sure? I've not seen any networked Dymo yet.
I installed one six months ago, so yes, I'm sure.
Does it work like a print server? Or is it a part of an application. They show the smart phone needing special software (again) and not using it as a printer.
-
@scottalanmiller said in Printing from a Raspberry Pi to a Printer Shared from Windows:
Cool, but our customers will never do it. THey demand Windows printing.
I don't follow - using these has nothing to do with them using Windows or not. Windows machines can definitely still use these printers, That's what my customer prints to them from.
-
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@scottalanmiller said in Printing from a Raspberry Pi to a Printer Shared from Windows:
Cool, but our customers will never do it. THey demand Windows printing.
I don't follow - using these has nothing to do with them using Windows or not. Windows machines can definitely still use these printers, That's what my customer prints to them from.
It does. They only allow them to be shared from Windows for use from everything else.
-
@scottalanmiller said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@scottalanmiller said in Printing from a Raspberry Pi to a Printer Shared from Windows:
@Dashrender said in Printing from a Raspberry Pi to a Printer Shared from Windows:
FYI - Dymo now has (for a year or so) a WiFi enabled Dymo labeler - no need to do anything crazy with USB to Network boxes.
You sure? I've not seen any networked Dymo yet.
I installed one six months ago, so yes, I'm sure.
!
Does it work like a print server? Or is it a part of an application. They show the smart phone needing special software (again) and not using it as a printer.
Yes, works like a print server - my installation of them was perhaps, been 6 months of Covid don't recall exact details, used a cellphone to do the original configuration (or just to make it easier), but assuming you can find it's IP from the DHCP server, you just http to the IP and configure it. then map it as an IP printer in windows, and bob's your uncle..