I solved the problem, but first the question I had asked, (which wasn't really the problem).
Thanks to Scott Granneman and his great book,
Linux Phrasebook, here's how to find the printer(s):
More available in the man pages.
Now, on to making the linux printer work with the XP VM... I've only done this twice and both times muddled my way through. Once the Samba shares are all set up, preferably with the Samba Server Configuration graphical tool, which works splendidly and beats trying to do it all from Bash, then the next part comes inside the virtual machine itself.
The "net use" statement is a Windows statement, issued from inside the Windows environment. Therefore, it only makes sense that it would be using what Windows thinks are your printers. Aha! The way to determine the resource names there is to use
. Thus, the actual script (batch file) that I need to run each time I open the VM is:
Code: Select all
:: sets network document folder to be accessible, uses "mememe" creative passwd
net use \\keith-desktop\Documents mememe /user:keithxp
:: sets lpt1 to printer in resource list (use "net view" to see)
net use lpt1: \\keith-desktop\HL-5240-series mememe /user:keithxp
:: print new.txt /d:lpt1
:: Comment out above line after a few days of use!
If the lpt1 is a persistent assignment, which happens sometimes, or if it was knackered, I now have another batch file:
Code: Select all
:: get rid of the old setting
net use lpt1: /delete /y
:: reset the rascal
net use lpt1: \\keith-desktop\HL-5240-series mememe /user:keithxp
Hope this helps save someone else some hours of frustration. Having muddled through the process once over a year ago and once recently, it'll be a snap next time I have to do it... hopefully not before Spring 2013. LTS versions, I love ya.
Keith