Page 1 of 1
[Invalid] Add guest printer to host?
Posted: 6. Nov 2019, 06:51
by Shmu26
This is backwards from the usual: I have a linux host, and a Windows 10 guest with a bridged network connection. I want the host to print by using the guest. This is so I can access the native Windows printer driver, which works better in my situation. Any way to set this up? Samba? Other?
Re: Add guest printer to host?
Posted: 6. Nov 2019, 08:17
by socratis
You'll set up this as if you were in the same situation with two physical computers.
Is the printer a USB one or a network printer one? How are you going to tie the printer to the Win10 "computer"?
Re: Add guest printer to host?
Posted: 6. Nov 2019, 08:20
by Shmu26
It's a network printer, already set up in Win10.
Re: Add guest printer to host?
Posted: 6. Nov 2019, 08:24
by socratis
Then VirtualBox has absolutely nothing to do with your problem, marking the thread as [Invalid].
But, trying to help you since you came here... As I said, treat it as if the VM was a physical computer. How would you have a Linux computer on the LAN, use another computer on the LAN, to print on a LAN-printer. You got to share the printer from Win10, and then use Samba sharing from the Linux computer to connect to the Win10 computer.
Re: [Invalid] Add guest printer to host?
Posted: 6. Nov 2019, 11:11
by mpack
I'm afraid that the question is fundamentally mistaken, to my knowledge at least.
With a network printer each PC on the network uses their own driver which communicates with the printer via the network. The only thing the network provides is the final, physical connection. I.e. the network is basically just the cable. So there's no way to get a Linux PC to use a Windows printer driver, regardless of which PC on the network the printer is attached to. The only way to use a windows driver is to print from a Windows PC.
Re: [Invalid] Add guest printer to host?
Posted: 6. Nov 2019, 11:20
by Shmu26
Forgive my ignorance, but why not like this? The Windows VM with a bridged connection is set as the samba host, just as if it was a physical machine. Linux is set as the guest for samba, and uses a shared Windows printer.
Re: [Invalid] Add guest printer to host?
Posted: 6. Nov 2019, 11:32
by mpack
I thought I was clear enough the first time? The PC that connects to the printer does not provide a printing service, the printer itself does that. All that the final PC provides is a physical connection, and in the case of a VM it doesn't even provide that, since a VM has no physical connections.
Upshot: if you print from a Linux PC then the Linux printer driver is sending instructions to the printer. Not the gateway PC.
Re: [Invalid] Add guest printer to host?
Posted: 6. Nov 2019, 12:27
by socratis
@'mpack', I kind of disagree over here... If a Linux computer (virtual or physical) does not have printer drivers for the specific printer, then it could use the Win10 computer (virtual or physical) as an intermediate. No harm there. The Win10 computer could provide a "translation" driver, such as Postscript for the Linux computer to use, even though the printer doesn't have a Postscript driver, or doesn't even understand it itself.
@'Shmu26', why do you want to use an intermediate computer (your Win10 VM) to talk to the printer, and not just connect to the printer directly? What's the problem with doing that?
BTW, what printer are we talking about, can you give the maker/model?
Re: [Invalid] Add guest printer to host?
Posted: 6. Nov 2019, 12:38
by Shmu26
socratis wrote:
@'Shmu26', why do you want to use an intermediate computer (your Win10 VM) to talk to the printer, and not just connect to the printer directly? What's the problem with doing that?
BTW, what printer are we talking about, can you give the maker/model?
I put this little project on the side for now, because I am currently working in a different distro without printing issues.
It is an HP officejet pro. I have problems with printing in monochrome, and in reverse order, when I print straight from Manjaro, and from KDE apps in general. This is because they ignore certain printer settings. But no prob when printing from my Windows 10 VM (or from Linux Mint, which I am using right now as host.)
Re: [Invalid] Add guest printer to host?
Posted: 6. Nov 2019, 16:27
by mpack
socratis wrote:then it could use the Win10 computer (virtual or physical) as an intermediate.
I'm not quite sure what you're saying there. Yes, software on the Win10 computer
could do a lot of things, but the fact is, AFAIK, it does not. There is no software that I know of for Win10 that intercepts network packets aimed at some other device, somehow recognizes and unpacks printing instructions understood by a specific printer, repacks with different printer instructions, and sends it to the locally attached printer.
AFAIK, when you enable printer sharing then all that Windows does is act as a gateway / network switch allowing other devices on the network to access the printer. It isn't providing a graphics language translation service.
Re: [Invalid] Add guest printer to host?
Posted: 6. Nov 2019, 17:14
by scottgus1
mpack wrote:when you enable printer sharing then all that Windows does is act as a gateway / network switch allowing other devices on the network to access the printer
Best of my knowledge this is how Windows printer sharing works. Back when I IT'd my boss's office I installed printers on the office W2003 file/print server, and there was a place to add drivers for other versions of Windows for the clients. The client W7/10 machines found and accessed the printer through the 2003 server, but the clients still needed their own drivers for the printer.
Special software could be written or provided to do this:
socratis wrote:If a Linux computer (virtual or physical) does not have printer drivers for the specific printer, then it could use the Win10 computer (virtual or physical) as an intermediate.
but I never ran across it myself. Of course, I never had to run a Linux client in the office either, so that could be the reason I haven't heard of it.
When I have to use a shared printer from an OS that didn't have drivers for the printer, I use a PDF printer on the originating PC as an intermediate, and copy the PDF to a shared folder on the printer host, with a script (you knew that was coming, right, Socratis?) to print the PDF to the printer.