HaâŚDone it!..
Installed an old copy of MS Windows XP in a VM. It had to be 32 bit because of the additional software I used. I set the network adapter to âbridgedâ so the VM could fully share its folders with MY UM host.
Installed my Canon LBP 2900i printer in the VM and set up a permanent USB connection to the printer for the VM.
Installed âFolder Millâ on the VM. This is an MS Windows freeware program that watches a designated folder and automatically prints any files it finds in there. It works best if all the files are in PDF format. This program also required that I installed service pack 3 and .NET framework. This is why I had to use the 32 bit version of XP cos there is no service pack 3 for the 64 bit version of XP. The reason I used XP rather than a later version of Windows is because it has only this one job to do. Therefore, I wanted the least resource-hungry version of windows that was able to operate my printer.
Designated a folder to watch for folder mill in the VM. At this point, I intended to simply share that folder on the network. But, after some messing about, I found that folder mill screws with the network folder sharing capacity of a designated folder it is watching. So, to hack round this, I set up another folder and shared that. Then wrote a simple MS Windows batch script to look in the shared folder every five seconds and, if there was a file in there, copy it to the designated folder mill folder. This worked.
On the UM host I did the following.
I did a startup script start to boot the VM at UM login and then shunt it off to workspace two out of the way.
Then I installed the Generic CUPS-PDF Printer driver for Ubuntu and set this as the default printer. When files are âprintedâ to this printer, they are, in fact, converted to pdf and written as a file in your home folder. This folder is, rather helpfully, called âPDFâ.
I then set up a bash script to look in the âPDFâ folder every five seconds and copy whatever is in there to the samba folder that is being shared on the network by my VM (see earlier) and then to immediately delete all files in the PDF folder.
The upshot of all of the above is that I can open any file in any application in UM and press âprintâ in the usual manner and my printer will print the file. What is actually happening under the hood, however, is the following:
A temporary pdf version of the files is saved to the âPDFâ folder in my home folder
The file is then passed to the VM shared folder and the copy is deleted from the PDF folder.
The file is then passed to the folder mill folder and the copy is deleted from the shared folder
The file is then printed
The file is then deleted from the folder mill folder
The time delay from pressing âprintâ to the file actually being printed is between 5 and 10 seconds. Which is more than acceptable to me.
To finish it all off, I have made modified versions of the logout and shutdown buttons. Now, before they open the shutdown and/or logout dialog boxes, the VM is closed and its current state is saved, then the dialog box comes up. It adds about 5 seconds delay to the dialog boxes appearing. Which, again is quite acceptable to me.
Finally, this solution has added only a tiny amount to my processor load such that it is barely noticeable. In terms of RAM usage, it has added about 300 MB which, given I am running 8GB of RAM is, again negligible.
It seems to me, this is a possible solution to many machines sharing a network printer where there are problems with one or more of the machines being able to install the printer driver.