LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   13.37 VirtualBox and usb. (https://www.linuxquestions.org/questions/slackware-14/13-37-virtualbox-and-usb-926484/)

scam 01-30-2012 07:05 AM

13.37 VirtualBox and usb.
 
Hi all, i used to run VirtualBox on 13.1 and used this http://blog.tpa.me.uk/2010/06/14/sla...irtualbox-usb/ to edit /etc/rc.d/rc.S but i've tried this on 13.37 and it doesn't work.
It worked on 13.1 to let VM's on Virtualbox to access usb devices but can't get it working on 13.37.
Can anyone help?

dolphin77 01-30-2012 07:16 AM

Code:

grep usbfs rc.S
# Mount usbfs only if it is found in /etc/fstab:
if grep -wq usbfs /proc/filesystems; then
  if ! grep -wq usbfs /proc/mounts ; then
    if grep -wq usbfs /etc/fstab; then

Code:

grep usbfs /etc/fstab
none            /proc/bus/usb    usbfs      devgid=83,devmode=664    0  0

And I think this line was added by VirtualBox's scripts automatically.
Everything works as it should for me.

scam 01-30-2012 07:38 AM

Thanks dolphin, that seems to have worked :)

tronayne 01-30-2012 07:54 AM

Open a terminal window and enter
Code:

groups
You should get something similar to this:
Code:

users lp floppy dialout audio video cdrom plugdev power usbfs netdev scanner vboxusers
If you do not see lp, usbfs, vboxusers (if you did not already do that) and, possible scanner (if you have a printer that is also a scanner), add yourself to those groups either by directly editing /etc/group (as root); the entries will look like
Code:

usbfs:x:85:root,yourlogin,vboxusers
vboxusers:x:102:yourlogin,userid2
lp:x:7:lp,yourlogin
scanner:x:93:root,yourlogin

or with (as root)
Code:

usermod -a -G lp,usbfs,scanner,vboxusers yourlogin
You may need to reboot (maybe not).

When you restart VirtualBox and boot a guest operating system if you right click on the icon that looks like a USB stick you ought to see USB devices display there and you should be able to click the associated box to select the device (like a printer, stick or whatever).

You actually do not need to have the entry in /etc/fstab -- won't hurt but may not help; KDE's Notification will pop up when you plug in, say, a USB stick, ignore it and see if you can select the device in the guest.

Hope this helps some.

repo 01-30-2012 07:57 AM

Quote:

You may need to reboot (maybe not).
Logout and login again is enough.

Kind regards

scam 01-30-2012 09:11 AM

hmm..it seemed to work for Virtaulbox, but now my usb modem doesn't work? ..i've removed the line i put in fstab and rebooted but my modem doesn't respond. lsusb shows the modem...anyone have an idea what causing it? i'm using wvdial to connect to my isp.
thanks.

scam 01-30-2012 09:17 AM

Tronayne.
vboxusers:x:102:yourlogin,userid2

Would userid2 be 100

username:x:1000:100::/home/username:/bin/bash

Thanks.

tronayne 01-30-2012 09:37 AM

Nope, userid2 would be if you have more that one user assessing VirtualBox (I do); vboxusers is a group and, on my system, it was added as group identification, GID, 102 -- yours may vary but that group needs to be there. There is no user account for VirtualBox so it's not in /etc/passwd, only in /etc/group, and it should have been added as part of the installation of VirtualBox (chapter 2 of the manual, "Installing on Linux hosts"):
Quote:

The Linux installers create the system user group vboxusers during installation. Any system user who is going to use USB devices from VirtualBox guests must be a member of that group. A user can be made a member of the group vboxusers through the GUI user/group management or at the command line with

sudo usermod -a -G vboxusers username

Note that adding an active user to that group will require that user to log out and back in again. This should be done manually after successful installation of the package.
That how she's done.

Hope this helps some.

scam 01-30-2012 10:00 AM

Yes, that's worked tronayne, without adding anything to fstab and usb modem working fine too.

Thanks for all the help :)


All times are GMT -5. The time now is 06:15 PM.