The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Hardy Heron, using USB devices in VB how-to

    Discussion in 'Linux Compatibility and Software' started by theZoid, Apr 23, 2008.

  1. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    Fellow Penguins, Mr. VirtualBox here (that's meant to be a joke to certain board members here who have witnessed my trials and tribulations :cool: )

    First off, if you haven't done so already download and install the non-free version of VirtualBox 1.6.2 (no dinero, requires accepting license agreement) from HERE.]

    Now,

    Get the public Key here: http://www.virtualbox.org/debian/innotek.asc

    Save this as innotek.asc to your desktop, then run:

    sudo apt-key add innotek.asc
    to install the key. Then run sudo apt-get update and VB should update with the system in the future.

    I did this in Kubuntu 8.04 RC, but below is for Ubuntu 8.04. This is written to apply to Gutsy also.

    Go through the new VM set up routine in VirtualBox and install, let's say XP in VirtualBox.

    Here's how I got usb devices working in an XP Virtual Machine in Hardy (8.04).

    Add yourself to the group VirtualBox created during install called "vboxusers" The VB install creates this group, find it, don't add another one.

    Create a group named "usbusers" and put yourself in it.

    sudo groupadd usbusers
    sudo gpasswd -a <yourusername> usbusers


    Or do the above in Control Center under 'users and groups'.

    Now uncomment the 4 lines below 'Magic to make /proc/bus/usb work' in mountdevsubfs.sh , they will be commented out by default) so it looks like the following:

    sudo gedit /etc/init.d/mountdevsubfs.sh

    #
    # Magic to make /proc/bus/usb work
    #
    mkdir -p /dev/bus/usb/.usbfs
    domount usbfs /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    ln -s .usbfs/devices /dev/bus/usb/devices
    mount --rbind /dev/bus/usb /proc/bus/usb


    Now then,
    EDIT: Modify the rules in file “/etc/udev/rules.d/40-permissions.rules” for Gutsy, and “/etc/udev/rules.d/40-basic-permissions.rules” for Hardy:]
    Change the lines :

    From:

    # USB devices (usbfs replacement)
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
    SUBSYSTEM=="usb_device", MODE="0664"


    To :

    # USB devices (usbfs replacement)
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usbusers", MODE="0664"
    SUBSYSTEM=="usb_device", MODE="0664"


    Now on to......

    The Grande Finale,

    add this line:

    none /proc/bus/usb usbfs devgid=120,devmode=664 0 0

    to your /etc/fstab file (at the bottom). Just make sure that 120 is your vboxusers group (use your own number).


    Reboot the computer.

    Open VirtualBox and click on "Settings".

    Click on the "USB" item in the left pane to edit the USB prefs.

    Click on the "Add device" button to add a filter and select your printer from the list and click on the "Ok" button.

    Start your VM and Windows should detect your printer.

    The above was taken mostly from various scattered posts in the Ubuntu forums, some from me, and put together here, all mods in one place, in order, for future reference.

    If you have a problem getting the usb devices recognized in VB, please post here. Potential edit recommendations are welcomed.
     
    Last edited by a moderator: May 8, 2015
  2. Element

    Element Notebook Evangelist

    Reputations:
    192
    Messages:
    537
    Likes Received:
    1
    Trophy Points:
    31
    Nice Guide! +rep
     
  3. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    Thank you amigos...it just plain needed to be done :D
     
  4. marc.knuckle

    marc.knuckle Notebook Enthusiast

    Reputations:
    0
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    5
    absolutely brilliant. cheers
     
  5. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    Updated: Add VirtualBox non free repo to your sources.list to update with system.
     
  6. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    Update: New VirtualBox 1.6.0. Trying to get repo info now.....anyone? https://cds.sun.com/is-bin/INTERSHO...-Start?ProductRef=innotek-1.6-G-F@CDS-CDS_SMI

    EDIT: Also install Guest Additions 1.6.0 from within VB. It will uninstall the old 1.5.6. I uninstalled VB 1.5.6 non free first, then installed 1.6.0 and all is fine with regard to usb, etc. (of course do not delete any vm files, just uninstall as 'remove' via synaptic.

    EDIT: I've heard someone on Ubuntu forums say no hacks are required for this version 1.6.0.....if usb doesn't work, I can tell you the above will make it work. I haven't checked this part yet.....
     
  7. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    EDITED the 40 permissions rules lines above and tested to be correct. This was pointed out by Ian on my blog. It worked the other way, but this way is 'more' correct.
     
  8. zephyrus17

    zephyrus17 Notebook Deity

    Reputations:
    646
    Messages:
    1,576
    Likes Received:
    0
    Trophy Points:
    55
    If I download 1.6.0 straight, do I follow the guide per normal?

    How does VB compare to VMware in terms of gaming and stuff?
     
  9. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    Yes, you follow this guide downloading 1.6.0 directly from Sun. I should update on that. I don't think VB or VMware support 3d acceleration for gaming. I was hoping Parallels did, but it's 49 bux U.S. and I'm waiting on a Hardy version (hopefully, they won't respond back about it)
     
  10. zephyrus17

    zephyrus17 Notebook Deity

    Reputations:
    646
    Messages:
    1,576
    Likes Received:
    0
    Trophy Points:
    55
    Darn. That's a bummer. So I guess it's still back to WINE and dual booting, then. I assume 1.6.0 works in Hardy the same, right?
     
  11. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    1.6.0 works just the same in Hardy...that's what I'm using. Yep, I have Vista as a dual boot for gaming :(
     
  12. malty

    malty Newbie

    Reputations:
    0
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    5
    Firstly used this . I have VBox PURL running in gutsy, WinXP guest. In VBox manager I can set up USB devices , they are recognised, but upon opening VBox the USB icon at the bottom right of the screen tells me that they are not, then I tried your
    guide, 2 differences, 1 =

    #Magic to make /proc/bus/usb work

    mkdir -p /dev/bus/usb/.usbfs
    domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    ln -s .usbfs/devices /dev/bus/usb/devices
    mount --rbind /dev/bus/usb /proc/bus/usb

    Yours =
    #
    # Magic to make /proc/bus/usb work
    #
    mkdir -p /dev/bus/usb/.usbfs
    domount usbfs /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    ln -s .usbfs/devices /dev/bus/usb/devices
    mount --rbind /dev/bus/usb /proc/bus/usb

    You leave the # on the 2 empty lines.
    I changed to your method, put back in the #

    2 = your guide

    Now then,
    EDIT: Modify the rules in file “/etc/udev/rules.d/40-permissions.rules” for Gutsy, and “/etc/udev/rules.d/40-basic-permissions.rules” for Hardy:]
    Change the lines :

    From:

    # USB devices (usbfs replacement)
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
    SUBSYSTEM=="usb_device", MODE="0664"

    To :

    # USB devices (usbfs replacement)
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usbusers", MODE="0664"
    SUBSYSTEM=="usb_device", MODE="0664"

    I see in Gutsy...

    # USB devices (usbfs replacement)
    SUBSYSTEM=="usb_device", MODE="0664"

    Only two lines.

    Any suggestions would be gratefully accepted, Malty
     
    Last edited by a moderator: Feb 2, 2015
  13. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    Wait, you didn't install the OSE version did you? If so, usb won't work.
     
  14. malty

    malty Newbie

    Reputations:
    0
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    5
    Thanks for responding, no I didn't use OSE. and...I didn't do nuffink and the USB has started working, VirtualBox is very good, but quirky
     
  15. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    It's been pretty stable for me....I have it in Ubuntu now (again), just keep copying over the same .vdi file, makes it quite easy. Oh, some of those settings require login/logout to take effect, but I'm sure you did that.
     
  16. theZoid

    theZoid Notebook Savant

    Reputations:
    1,338
    Messages:
    5,202
    Likes Received:
    22
    Trophy Points:
    206
    Update for VB 1.6.2....no repos! :(
     
  17. MiamiGuttaMan

    MiamiGuttaMan Notebook Enthusiast

    Reputations:
    0
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    5