1
0
mirror of https://github.com/mbirth/wiki.git synced 2024-11-09 13:16:45 +00:00
wiki.mbirth.de/know-how/software/linux/_posts/2009-05-05-enable-usb-sharing.md

1.7 KiB

title layout created updated toc tags
Enable USB Sharing default 2008-09-03 23:08:39 +0200 2009-05-05 12:25:03 +0200 false
know-how
software
linux

To use USB devices under e.g. VirtualBox in Hardy, edit the file /etc/init.d/mountdevsubfs.sh and find the line:

# Magic to make /proc/bus/usb work

Remove the following four comments so that it looks like this:

{% highlight bash %}

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 {% endhighlight %}

Also add the following line to your /etc/fstab (129 is the group-ID of vboxusers)1:

none     /proc/bus/usb     usbfs     devgid=129,devmode=0666    0     0

Now enable the new settings by doing:

sudo /etc/init.d/mountdevsubfs.sh stop
sudo /etc/init.d/mountdevsubfs.sh start

Finally, edit the file /etc/udev/rules.d/40-basic-permissions.rules and find the line containing the usb_device subsystem. Extend the permissions to 0666 like this:

SUBSYSTEM="usb_device", MODE="0666"

Save the file and you should be able to use USB devices inside VirtualBox guest systems.

According to Ubuntu Unleashed, you might have to add 2 lines to the /etc/init.d/mountkernfs.sh for the usbfs to get mounted automatically upon boot.

I'm also not sure about the permissions. It might work also using 0664 or even 0644.