OpenVZ Forum


Home » General » Support » Samba Printer on USB within a container (How to link a container to the USB printer)
Samba Printer on USB within a container [message #37491] Wed, 16 September 2009 23:13 Go to next message
rewnz is currently offline  rewnz
Messages: 3
Registered: September 2009
Location: New Zealand
Junior Member
Hi,
Newbie: I tried the HOW-TO on printing from within a container http://wiki.openvz.org/USB_Printing_in_VE but when I restarted the container all the folders I created under the /dev folder in my CT 103 disappeared.

I am running CentOS 5.3 as the host and the container, which is running a samba server for file sharing and I want to add my printer to it for all my other PC's to use. I get the brother MFC-240c showing up in the results from lsusb on the host but I can't get anything to stick in the container after restart.

I presume that there is a hardware definition for the distribution that is rewriting the /dev folder each time it is started. But the tutorial just indicated that you go into the container and manually make the changes and the result would remain after restart.

How do I get the CT to retain the USB related details after restart?
Cheers,

Andrew
Re: Samba Printer on USB within a container [message #37492 is a reply to message #37491] Thu, 17 September 2009 03:24 Go to previous messageGo to next message
rewnz is currently offline  rewnz
Messages: 3
Registered: September 2009
Location: New Zealand
Junior Member
I got the /dev/usb/lp0 showing up in the CT using
vzctl set 103 --devnodes usb/lp0:rw --save

here is the result from lsusb:

[CODE][root@openvz 001]# lsusb
Bus 004 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 009: ID 04f9:01ab Brother Industries, Ltd MFC-240C
Bus 001 Device 008: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 0000:0000
/CODE]

and doing ls -l in /dev/bus/usb/001

[root@openvz 001]# ls -l
total 0
crw-r--r-- 1 root root 189, 0 Sep 16 14:35 001
crw-r--r-- 1 root root 189, 7 Sep 17 11:31 008
crw-r--r-- 1 root root 189, 8 Sep 17 11:31 009


so I tried

vzctl set 103 --device c:189:0:rw --device c:189:7:rw --device c:189:8:rw --save

but I couldn't see any change in the 103 container.




Re: Samba Printer on USB within a container [message #37493 is a reply to message #37491] Thu, 17 September 2009 11:41 Go to previous messageGo to next message
Tenyo is currently offline  Tenyo
Messages: 5
Registered: November 2008
Junior Member
Maybe you have udev enabled?
Try to disable it in the container.
I wrote the howto and without udev the procedure explained works without problems.

Hope this helps.
Bye.
Re: Samba Printer on USB within a container [message #37497 is a reply to message #37493] Fri, 18 September 2009 04:51 Go to previous message
rewnz is currently offline  rewnz
Messages: 3
Registered: September 2009
Location: New Zealand
Junior Member
Hey thanks for that, sorry I am a linux newbie.
I followed this how-to on disabling udev:
http:// www.canfield.com/content/openvz-unable-open-pty-no-such-file -or-directory and restarted the container, looked from this link that it is a CentOS thing.
Now I have the bus folder showing up with the appropriate details.
lsusb is returning a result now but I still need to do some trouble shooting.
Seems that there is an issue with cups not detecting some usb printers (like mine Brother MFC-240c) in the device list even with the right driver installed. Not an OpenVZ thing as the host (CentOS) doesn't detect it in cups interface and even trying cat > /dev/usb/lp0 does nothing (was suggested on a site I found as a way to check the usb printer was working.) Something for another forum.

cheers for the help, had me stumped.
Previous Topic: VEs in more than one subnet/with more than one NIC
Next Topic: Add additional eth1 interface to CT for sniffing traffic
Goto Forum:
  


Current Time: Tue Sep 03 06:40:18 GMT 2024

Total time taken to generate the page: 0.05061 seconds