Yes, I'm lazy: Windows network printing…

… on a virtual box.
Meet Marcellus. The guy who tried not to kill Archimedes. In other words, the XP VirtualBox running on SuSE in order to spare me running to the network printer all the time (No idea how to print automated duplex from Linux acroread or okular - and the Linux printer driver is a real pain)
After installing VirtualBox (I recommend the newer non-OSS edition from VirtualBox.org, but there are also OSS versions in the official SuSE repos) I set up a virtual hard disk with the nominal size of 10 GB in my home directory and installed XP from an image. Works, apart from the fact that I have to recompile the vbox kernel before each run.
For the network (Details->Network) connection I chose NAT, which seems to be the easiest option (Here your physical netword card acts like a DHCP router). IP configuration worked with DHCP, except I had to set the DNS servers by hand (I just used our university's).
To get a printer running, you have to use the CUPS port of your Linux host (see here. If you check localhost:631 in Konqueror, CUPS should list your printers, which you can access from the guest Windows by supplanting the local host with the virtual IP of your network card, e.g. Set up a network driver with the Windows wizard and that URL.
Getting a shared folder: 1) install the VBox Guest additions. Note: The GuestAddition ISO VBox downloaded by itself was corrupted. I got an alternative image from the TU Vienna and mounted it by hand under Devices->Mount CD-ROM… The HowTo for automatic setup is here. Start the XP Machine. Install the guest additions from the virtual CD-ROM. Shut down the system.
2) In the VirtualBox Main App, define a shared folded (let's call it share). Direct access via \\vboxsvr\share from the Explorer didn't work for me, so I defined a permanent network share as described here:
net use x: \\vboxsvr\share -p
I installed the bare necessities (Adobe Reader, Firefox) and printed blissfully ahead.

And yes, I'm breaking a fly on the wheel here - but maybe I will try adding USB support and get my MD recorder to work … bye, bye, dual boot!

Note: Okular does support automated duplex in the printing options and I have no insurmountably problems with Linux printing on either the HP network printer at work or my Samsung at home right now (new work, new town, new printers). Either Okular fixed this or the drivers got better…

1 comment:

Daniel Kelly said...

Yes, you are lazy but I did a similar thing to keep an SSH tunnel open to get into my company network from the outside. Desperate times call for desperate measures I guess right?

Also, the open source version isn't exactly user-friendly and it's pretty buggy in my experience. Other than that I love VBox, I've used it for LAMPP development etc. I still remember the day I discovered it. Nice blog btw I'll have to stop by more often, maybe we could even trade links. Unfortunately the server is down at the moment because they're upgrading Red Hat :(