LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Printing from guest XP machine in Virtualbox (https://www.linuxquestions.org/questions/slackware-14/printing-from-guest-xp-machine-in-virtualbox-772795/)

Daedra 12-01-2009 06:00 PM

Printing from guest XP machine in Virtualbox
 
So I decided to finally start using virtualbox now that I got a larger hard drive. I installed xp in a virtual machine and it is working fine except that I can't print, I googled around and found that it is possible but was wondering what steps i need to take to get this working.

Thanks.

camorri 12-01-2009 06:16 PM

There are at least two ways. It partly depends on how your printer attaches to the system. USB devices should be no problem. On Virtual box, start it up, and click Settings, and then USB. Create a filter for the device. Once XP can see the device, then install the printer in XP as if it were stand alone.

Second method. Run a samba server on linux, and share the printer. On XP install the printer as a Network Printer.

The second method is much more complex, because of the Samba server. It has the added advantage of allowing you read write access from windoze to your linux shared directories, as well as shared printers.

I had the samba server working, long before I install virtualbox.

The first method is fast, and outside of making the filter to allow XP access to the USB hardware, is about the same as adding a printer in XP.

Last thoughts, if your printer is a parallel port printer, or a serial port printer, you might have to go with method 2. I don't think there is a way to access the parallel port with a printer. There is access for the serial ports, however I think that is for modems, not printers.

Hope this helps.

Daedra 12-01-2009 06:20 PM

ok, I got the printer hooked up via USB in slackware. I just looked under settings in vbox and I dont see any tabs for USB. Do I need to launch XP first?

slackass 12-01-2009 06:47 PM

Are you using the OSE or PUEL version?
If your using the OSE version that is on the SlackBuild site USB is not supported.
The PUEL version doses support USB.
I have the PUEL version on a Slack64 host with a XP guest with an HP all-in-one working via USB.

Daedra 12-02-2009 12:26 AM

I am using the OSE, I will look into the PUEL version.

Daedra 12-03-2009 03:29 AM

So I am thinking about maybe trying the puel version, if I decided to remove my ose edition packages how can I backup my winxp installation? Im guessing just the virtual image and home directories?

JokerBoy 12-03-2009 04:03 AM

Quote:

Originally Posted by Daedra (Post 3778112)
how can I backup my winxp installation?

look into "~/.VirtualBox/HardDisks"

slackass 12-03-2009 08:34 AM

Just save the .vmdk image and use it instead of creating a new drive when you set up the new puel version. I keep mine on a separate partition so I can open it from whatever os I'm using at the time.

catkin 12-03-2009 08:49 AM

Quote:

Originally Posted by slackass (Post 3778386)
Just save the .vmdk image and use it instead of creating a new drive when you set up the new puel version. I keep mine on a separate partition so I can open it from whatever os I'm using at the time.

Yes -- the "whatever os I'm using at the time" is neat. But doesn't VirtualBox use .vdi files for HDD images?

camorri 12-03-2009 08:53 AM

Yes it does use .vdi files. Here is where I store mine.

Quote:

locate *.vdi
/home/cliff/.VirtualBox/HardDisks/XPeeee.vdi
Note the .VirtualBox directory is hidden, ( the period ).

I have removed and re-installed the Virtual Box rpm file several times. It just seems to find the .vdi files without any problem.

slackass 12-03-2009 09:42 AM

Mine is a "vmdk".
The full name of it is winxp.vmdk
It has 2 partitions in it.
20gb for the os & 40gb for drive D

http://i773.photobucket.com/albums/y.../snapshot2.png

Daedra 12-03-2009 05:24 PM

Ok so I got the puel version installed and working, I searched around the forums and can across a post about usbfs permissions so i added the line

none /proc/bus/usb usbfs auto,remount,devmode=0664,devgid=100 0 0

to my /etc/fstab and now I have access to all usb devices that I want except my printer (its greyed out under options) my USB harddrive was available and it workng so I am assuming that usb is working, but for some reason the printer is unavailable.

Anyone got any more ideas?

Thanks in Advance.

slackass 12-03-2009 07:04 PM

I hate to ask this but dose your printer require software for windows that you may have forgot to install? The only reason I ask is because I did that little brain fart myself.

Daedra 12-03-2009 10:42 PM

It's an old laserjet 1200 printer so its well supported in all the operating systems i've used. I think it's something im doing I just have to figure it out.

slackass 12-03-2009 11:39 PM

I see you used /etc/fstab
I was probably doing it wrong but I was unable to get usb working by editing fstab.

what I did was:
Add
/sbin/mount -v usbfs /proc/bus/usb -t usbfs -o devgid=10,devmode=0664
to /etc/rc.d/rc.S

then add my user to:
wheel
vboxusers

then:
In VirtualBox Controll set Network to "Bridged Adaptor"

then:
Check both boxes in the USB section.

This may not be the correct way to do it but it works for me.


All times are GMT -5. The time now is 05:08 AM.