LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how do i get virtualbox to connect to the printer i have (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-get-virtualbox-to-connect-to-the-printer-i-have-828048/)

baronobeefdip 08-23-2010 02:19 PM

how do i get virtualbox to connect to the printer i have
 
i am using ubuntu lucid lynx and the latest verdsion of virtualbox and i have this lexmark printer which lexmark doesn't provide drivers for, so i installed windows xp pro in virtualbox and granted my user account the permission to use the usb interface with virtualbox but one problem it won't let me connect the printer while it lets me connect all the other usb devices (flahs drives and web cams) it worked when i was using pclinuxos but now for some reason its not letting me

i am doing this because my version of windows 7 just crashed anmd will not come up and i have no other choice

catkin 08-24-2010 08:23 AM

IDK Lucid but nobody has answered this yet ...

As it is only the printer that is not working we know that the essentials of VirtualBox/USB are OK and we can focus on printer specifics.

Gathering information ...

All this to be done on the host, not the guest.

Please log on as the VirtualBox user and post the output from
Code:

VBoxManage list usbhost
If you can identify the printer in that output, copy its UUID and post the output from (changing the values in <...>)
Code:

VBoxManage controlvm "<your VM name, e.g. WXP>" usbattach <UUID copied above>
Next we want to know the permissions on the printer's device file. IDK the best way to do that. Can you find something in the /var/log/* files, when you plug the printer in? Here's from /var/log/messages (on Slackware, not Ubuntu) on plugging an HP USB printer in
Code:

1735 Aug 24 12:34:52 CW9 kernel: [    2.420179] usb 2-1: New USB device found, idVendor=03f0, idProduct=2811
1736 Aug 24 12:34:52 CW9 kernel: [    2.425062] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
1737 Aug 24 12:34:52 CW9 kernel: [    2.429854] usb 2-1: Product: PSC 2100 Series
1738 Aug 24 12:34:52 CW9 kernel: [    2.434614] usb 2-1: Manufacturer: Hewlett-Packard
1739 Aug 24 12:34:52 CW9 kernel: [    2.439478] usb 2-1: SerialNumber: blah blah blah ...

If you can find something similar to that, note the usb bus and index numbers like the 2-1 in the example above and post the output from
Code:

ls -l /proc/bus/usb/<bus number>/<index number>
Here's an example
Code:

ls -l /proc/bus/usb/002/001
-rw-rw-r-- 1 root vboxusers 43 2010-08-24 12:34 /proc/bus/usb/


baronobeefdip 08-24-2010 08:15 PM

i ran that first command you showed me and this is what came up

Code:


UUID:              3f710b0a-41a7-4b7f-bf41-1988351c2292
VendorId:          0x043d (043D)
ProductId:          0x0108 (0108)
Revision:          1.0 (0100)
Manufacturer:      Lexmark
Product:            1300 Series
SerialNumber:      20A000080009529
Address:            sysfs:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5//device:/dev/bus/usb/002/005
Current State:      Unavailable


catkin 08-24-2010 09:51 PM

Now you can try the second command using 3f710b0a-41a7-4b7f-bf41-1988351c2292
as the UUID (but run the first command again to make sure it hasn't changed).

EDIT: and you can run ls -l /dev/bus/usb/002/005 or whatever is shown by the first command when you run it again.

baronobeefdip 08-25-2010 06:02 PM

what do you mean by vm name

brianL 08-25-2010 06:15 PM

The name you gave to the virtual machine when you first created it in VirtualBox.

baronobeefdip 08-25-2010 07:43 PM

well my machines name is tux and i just put in my virtualmachines name along with the code you told me to put in and it says that the machine cannot be found

Code:

ERROR: Could not find a registered machine named 'tux'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee nsISupports
Context: "FindMachine(machineuuid, machine.asOutParam())" at line 82 of file VBoxManageControlVM.cpp
baronobeefdip@baronobeefdip-desktop:~$ sudo VBoxManage controlvm "<tux>" 3f710b0a-41a7-4b7f-bf41-1988351c2292
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
(C) 2005-2010 Oracle Corporation
All rights reserved.

http://img529.imageshack.us/img529/5...reenshotdt.png

baronobeefdip 08-25-2010 08:02 PM

alright so i finally got the vm name right but when i put in the vm name and the uuid this is what came up

Code:

ERROR: The USB device with UUID {3f710b0a-41a7-4b7f-bf41-1988351c2292} is not currently attached to the host
Details: code NS_ERROR_INVALID_ARG (0x80070057), component USBProxyService, interface IHost, callee nsISupports
Context: "AttachUSBDevice(usbId)" at line 618 of file VBoxManageControlVM.cpp


catkin 08-25-2010 11:02 PM

Quote:

Originally Posted by baronobeefdip (Post 4077835)
alright so i finally got the vm name right but when i put in the vm name and the uuid this is what came up ...

That's OK, half expected. Can you try the ls -l /dev/bus/usb/002/005 changing 02 and 005 to suit?


All times are GMT -5. The time now is 12:49 PM.