David Both wrote:
> I am also interested in those details.
> 
> 
> Thanks!
> 
> 
What I did was create a udev rule like this:

--------------------------------------------------

# Rules for VirtualBox USB devices.

ACTION!="add", GOTO="vbox_rules_end"
SUBSYSTEM!="usb", GOTO="vbox_rules_end"

# eBookwise eBook reader.
ATTR{idVendor}=="0993", ATTR{idProduct}=="0002", \
        run="/lib/udev/set-usb-group %s

# VuPoint Film and Slide converter
ATTR{idVendor}=="05a9", ATTR{idProduct}=="1550", \
        run="/lib/udev/set-usb-group %s

LABEL="vbox_rules_end"

--------------------------------------------------

The set-use-group script that it calls looks like this:

--------------------------------------------------

#! /bin/sh
#
# Set group and permissions so that Virtual Box
# can access the USB device.
#
ret=false
if [ "$DEVICE" != "" ]; then
 if [ -e $DEVICE ]; then
  chgrp vboxusers $DEVICE && \
  chmod g+rw $DEVICE && \
  logger udev/set-usb-group: $(ls -l $DEVICE)
    ret=true
 fi
fi

--------------------------------------------------
This script could be improved, but it does what I need. In the
future, I may improve it so you can pass it the user, group, and
permissions you want. The nice thing is that udev passes the USB
device entry in the $DIVICE variable, so only the device being
processed by the rule is affected, and udev is doing the work for
you. It should work regardless of weather the USB file system, or
the sys file system is being used, as udev should adjust $DEVICE to
match.

Let me know if it works for you, and any improvements you make.

Mikkel
-- 

A:  Because it messes up the order in which people normally read text.
Q:  Why is top-posting a bad thing?


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
vbox-users mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-users

Reply via email to