Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

USB Printing in VE

541 bytes added, 14:04, 28 November 2008
no edit summary
Please note that ownership/permission/devices are referred to my system and you have to adapt to YOUR configuration: they are reported only as an EXAMPLE.
* Install '''usbutils ''' in both HN and VE.
* In a shell on HN type '''lsusb''' and you'll get the list fo the usb devices on your system:
Bus 002 Device 006: ID 0dda:2026 Integrated Circuit Solution, Inc. USB2.0 Card Reader
** in the numbered subdirectory '''1 file for every usb device attached to this bus''', the first one is the usb port:
***<code>crw-rw-r-- 1 root usb 189, 896 Nov 24 16:16 001</code>
***<code>crw-rw-r-- 1 root usb 189, 902 900 Nov 28 14:14 007005</code>
* Now that you have an idea fo the general structure of your usb devices you have to replicate them on your VE.
** enter your VE: <code>vzctl enter VE_NUMBER</code>
** create in /dev (if not present) the usb directory
** create in /dev/usb the printer device typing: <code>mknod lp0 c 180 0</code>
**** <code>chmod 660 lp0 </code>
**** check with <code>ls -l lp0</code> if the new device is '''IDENTICAL''' to the one in HN --> <code>crw-rw---- 1 root lp 180, 0 Nov 28 14:14 lp0</code>
** go back to /dev and create a symlink to the printer device: <code>ln -s /dev/usb/lp0 /dev/usblp0</code>
** create all the needded directories:
*** <code>mkdir /dev/bus</code>
*** <code>mkdir /dev/bus/usb</code>
*** <code>mkdir /dev/bus/usb/008</code>
** swith to /dev/bus/usb/008 directory and create there the needed devices: one for the usb port and one for the printer
*** <code>mknod 001 c 189 896</code>
*** <code>mknod 005 c 189 900</code>
** assign ownership/permissions:
13
edits