UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a Logitech web cam (usb) connected to my ubuntu 12.04 OS. I also use a virtualization program (VBox) to run another(guest) OS. Now, I want to use the web cam in my guest OS, and in order to do this, I need to "unmount"(without physically disconnecting) the camera from the host OS, so that the guest OS would be able to capture and mount. What are the commands to: (1) identify the camera in the hardware devices, and (2) unmount or unattach the camera from the host (Ubuntu) system?. Thanks for the help.
I need to "unmount"(without physically disconnecting) the camera from the host OS, so that the guest OS would be able to capture and mount.
Not at all necessary. Bring up v-box. Go into Settings - USB and add a filter. I added the vendor ID and
Product ID numbers, and added the manufacturers name in that field. You can get the Vendor ID and Product ID from a lsusb command in a command prompt in ubuntu. The line will look something like this:
Quote:
Bus 002 Device 005: ID 046d:0870 Logitech, Inc. QuickCam Express
046d is the vendor field, and 0870 is the product field.
Once that is added, go to the Devices drop down and the top, click USB devieces, and make sure there is a check beside the web cam. My guest is Win XP. XP detected the new hardware, added the driver, and in the control panel, I clicked on Scanners and Cameras, ran the wizard and took a picture. I'm sure any other web cam app will work with it now.
It should not matter what your guest is, you should only need to make a filter, so you can pass the device over to the guest. What you do in the guest will depend on what your guest system is.
Bring up v-box. Go into Settings - USB and add a filter. I added the vendor ID and
Product ID numbers, and added the manufacturers name in that field. You can get the Vendor ID and Product ID from a lsusb command in a command prompt in ubuntu.
I did all that. My problem is that when I go to Devices > USB ports and try to select the device I filtered, I get a message saying the device is busy, or used by another (the host). That is why I want to know the Linux command to turn OFF/ON (deactivate/activate) a connected device.
There isn't one. Only thing that will own a device, is an application. So, what are you running on the device?
I'm running the latest version of VBox and, yes, I installed the extensions and the guest additions. I'm not running any app on the device. It's just connected. The application to use the device will run on the guest OS.
Have you got gtk-lshw installed ? Its an application that shows hardware information, driver information, in a nice format.
You can run, in a konsole as root, the command 'gtk-lshw' to launch the application. If you get 'command not found' that means you do not have it installed. Go into your package manager, and see if its available. It is for most distros. Install it, run it, and post the information for the web cam. This is what it will look like, your device is probably different than mine.
Quote:
Generic USB device
/0/2/1/6
product: Camera [46D:870]
vendor: Logitech, Inc. [46D]
bus info: usb@2:6
version: 1.00
capabilities:
USB 1.1
configuration:
driver: STV06xx
maxpower: 90mA
speed: 12Mbit/s
Finally, I was able to have the guest OS (Ubuntu) to recognize the camera, as you can see when I run lsusb on a terminal.
Quote:
Bus 001 Device 002: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000
But still it is not working. Someone suggested that I need to install drivers for it, but this camera has been working flawlessly on another Ubuntu 12.04 (not virtualized) and I didn't install any drivers.
I couldn't get the command gtk-lshw, but I could run sudo lshw, but doesn't show the same info. Any suggestion will be welcomed. Thanks.
wp
But still it is not working. Someone suggested that I need to install drivers for it, but this camera has been working flawlessly on another Ubuntu 12.04 (not virtualized) and I didn't install any drivers.
If the camera was plugged in to the system when you installed, the kernel module probably was detected and loaded.
Open a konsole in the host system, where it works. As root run the command 'lsmod | grep stv*' and I think you will see some lines of output.
I suspect your driver will be something like 'gspca_stv0900' or very close to that.
On the guest system, you can try 'modprobe gspca_stv0900' ; adjust the the name to match what you find with the lsmod command. You need a driver for the web cam to operate.
This link shows a way to figure out the web cam, and driver.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.