Problem with parallel port read/write access.

Discussions related to using VirtualBox on Linux hosts.
Post Reply
VerDow
Posts: 2
Joined: 25. Jun 2008, 17:21

Problem with parallel port read/write access.

Post by VerDow »

The problem:
I'm trying to use a parallel port in Ubuntu with an XP guest but am constantly getting the error you see in the screenshot for /dev/lp0 and /dev/port. (One at a time.) I've tried adding lakeview and root to the lpadmin and vboxusers groups then relogging on and also this:

lakeview@Server:~$ /bin/ls -l /dev/lp0
crwxrwxr-x 1 root lp 6, 0 2008-06-12 22:48 /dev/lp0
lakeview@Server:~$ /bin/ls -l /dev/port
crwxrwxrwx 1 root kmem 1, 4 2008-06-12 22:47 /dev/port
lakeview@Server:~$

which I do plan on changing for security issues once I've tracked down the problem.

Why:
The computer is a file server for a photography studio and ran the security system for a indoor storage place in the basement. The only problem was Windows kept restarting and being unable to automatically log back on with a password set, would shutdown the entry system locking customers out. We decided to switch to Linux because of the flexibility with Samba and mdadm and to help with the basement but Wine doesn't cut it with the security system software so now we have a separate Windows computer running the basement while I struggle with a virtual machine to take its place.

The idea is to hide the virtual machine from the outside world using NAT so it can be left unsecured and be free to crash/restart itself all it wants. Even if it doesn't restart properly, there is a Linux host running which I can log into remotely and fix the problem without driving into town. (BTW, if you see a flaw in my cunning plan let me know.)

Image
vkov_tinsky
Volunteer
Posts: 218
Joined: 5. Apr 2008, 20:18

Post by vkov_tinsky »

Hi VerDow,

Have you tried to remove the lp module (if you have it installed) before starting virtualbox? (see http://forums.virtualbox.org/viewtopic.php?t=5589)

Please post if you manage to get it all to work (I couldn't and nobody seemed to know)

Regards,
VT
VerDow
Posts: 2
Joined: 25. Jun 2008, 17:21

Post by VerDow »

I ran

lakeview@Server:~$ sudo rmmod lp && sudo chmod 666 /dev/lp0
lakeview@Server:~$ sudo rmmod lp && sudo chmod 666 /dev/port

(I try both because I'm not sure which will work)
like it said in the post and now I get the following:

/dev/lp0:
Host Pipe (Create Pipe checked)
NamedPipe#0 failed to bind to local socket /dev/lp0.
VBox status code: -448 (VERR_NET_ADDRESS_IN_USE).
Host Pipe (Create Pipe unchecked)
NamedPipe#0 failed to connect to local socket /dev/lp0.
VBox status code: -38 (VERR_ACCESS_DENIED).
Host Device
Cannot open host device '/dev/lp0' for read/write access...
VBox status code: -38 (VERR_ACCESS_DENIED).
/dev/port:
Same as above, just replace /dev/lp0 with /dev/port


To me it looks like the module is still loaded or something is using the port even though

lakeview@Server:~$ lsof /dev/port #turns up nothing
lakeview@Server:~$ lsof /dev/lp0 #doesn't exist
lsof: status error on /dev/lp0: No such file or directory

and lp is not listed in /proc/modules, I even looked using vim to double check.

lakeview@Server:~$ sudo rmmod lp && sudo chmod 666 /dev/lp0
ERROR: Module lp does not exist in /proc/modules
lakeview@Server:~$ sudo rmmod lp && sudo chmod 666 /dev/port
ERROR: Module lp does not exist in /proc/modules
Post Reply