I'm currently using Ubuntu but I have printing set up with CUPS. Is it possible to share a CUPS printer with a VirtualBox Windows guest? Or, namely Windows 2000.
How do I share a CUPS printer with a Windows VirtualBox guest?
windows;virtualbox;cups
YESSharing a printer from a Linux/CUPS host to a Windows Virtual Machine is easy. I'll show you how to do this on Windows 2000 because it's probably the most old, and difficult (and, somewhat practical) configuration to get working.Add a Host Only Network: File → Preferences → Network → Host Only Networks → Add Host Only Network. This will create your a network to the guest. The host will have the IP address of 192.168.56.1.Add a Network Adapter in the Machine Settings of VirtualBox. Right click the Virtual Machine → click Settings → click Network → Set Attached to on Adapter 1 (or any adapter) to Host Only Adapter.Go to the website http://localhost:631/. On the top tab click Administration → check both Share printers connected to this system and Allow printing from the Internet → click the Change Settings button.On the top tab click Printers → click the printer you want to share, and copy the url. For me, mine is http://localhost:631/printers/Samsung-M262x-282x. You want to replace localhost with 192.168.56.1, and copy that.Now we have two options. One of them is to track down the original driver, the other is to use the PostScript Definition file that Linux is using, and install the ability for Windows to use that. If the printer is a PostScript printer, that's a ton easier. We're going to assume it is.  A sane printer daemon should be able to read .ppd's (PostScript Printer Definitions), but Windows can't. In order to obtain that ability we need to install some third party software.Now you need to share /etc/cups/ppd/. Right click the Virtual Machine → click Settings → click Shared Folders → click Add a Shared Folder (icon on right). In the Folder Path put /etc/cups/ppd/. Click both Automount and Read-only.Now in the Virtual Machine, you want to install the Adobe Universal PostScript Windows Driver I think this may come in versions of Windows newer than win2k. You can download this direct to the Virtual Machine, or you can save it to the host and share the directory you saved it to (just like we did above.)Run the file you just downloaded (winsteng.exe).Click Next.Click ACCEPT (the EULA screen)Click It is connected to the network (Network Printer) to add a Network Printer.Click NextPaste the address from above (in 3.2).. Should looking something like http://192.168.56.1/printers/<something>.Click Yes to install the driver.Click Browse to find a more suitable driver. ;)Click Network.uncheck Reconnect on Loginclick Browse → expand Virtual Box Shared Folders → expand \\Vboxsvr → click \\VBOXSVR\ppd → click the OK button.Click Drive → click whatever drive you just added, defaults to E:.Click the printer on the left.Click the OK button.Make sure the new printer driver is selected (this should be the same screen from Step 5 above.Click Next.Choose to print the test page.Click InstallYou're done! I don't suggest you configure it unless you're special. Click a few Nexts and Finish.These instructions were written with an Abandonware copy of Windows 2k Pro SP4