Newbie trying to get it right: lpt1 as network printer

Having made the transition from a certain widely used operating system to linux, suse 11.2, x64, successfully and pleasantly we are still left with a few problems.

One of these is a few applications i have to use which run only in that old OS. To that end I have installed VirtualBox and got them to run with one glitch. I cannot print from VBox to my HP LaserJet 4000, lpt1 printer, which works fine in suse. Searching and posting on the Vbox forums turned up that lpt1 is not supported in the current vbox and that I need to set up a virtual network, set up the printer as a network printer and set it up as an lpd/lpr printer in Vbox WinXP. Have tried many different ways to do this without success, I think the problem is I do not know how to set up a network printer in Linux.

The virtual network is vboxnet0, which does show up in ifconfig, along with my eth0 net, and I can ping the windows guest, gateway and the host from either side (host:suse/guest:winXP) respectively. Have tried numerous ways of setting up printer in YaST which works in suse but still does not work from WinXP guest. Have read the suse manual and several sources and searched forums with no results.

Finally I am thinking I just don’t know how to set up a network printer in linux. Using cups, kde, suse 11.2, don’t know what else to tell. Samba is installed, although I am not using it to the best of my knowledge.

Can anybody point me in the right direction? And I realize I need to give more info but just don’t know what, so tell me.

Puzzled & perplexed penguin

Since it’s a XP guest OS, possibly the most straightforward way is to configure Samba on openSUSE to serve shares to XP over the network, and those shares will also include any local printers. The advantage is that you also get to share files. Look up swerdna on this forum, he’s got a HOWTO page on Samba.

VMWare supports the parallel port (lpt) since it started, but the later Virtual box consider it’s not so widely used anymore to justify implementing support.

If you don’t mind using vmplayer you could try it, it’s simpler than setting the network, you only need to adjust a few device permissions (there’s good info about this in the hardware forum).

Never heard of vmplayer (not like smplayer, I presume). will look it up.

Been trying to work out the Samba thing but having difficulty. Having finding my netbios name, as well as addresses and name for the Samba server. Have looked through a lot of Swerdna’s howto’s but it still isn’t coming totether for me.

Try it with just IP addresses first. If you are using the default VBox configuration, the host will be at 10.0.2.2 and the first guest at 10.0.2.15.

The first thing I tried was IP addresses. The vboxnet0 I have uses the 192.168.56.* range. I have tried to assign the printer an IP in that range without success using yast. There seems to be something I am missing there. I did study the manual but that didn’t give any insights either.

Vmplayer seems to be for people having trouble with lpt1 in suse. The printer works fine in suse, I just can’t get the windows guest to see it.

VMWare Player (or vmplayer) is a free (for personal use) smaller version of VMWare workstation, that until recently wouldn’t let you create or edit virtual machines (VMs), only run them.

Starting with version 3 you can create/edit VMs, no doubt because of VBox competition.

It’s a hefty download, but IMO worth it. I’ve tried VBox twice already but gone back to vmplayer due to better perceived performance. Of course YMMV.

Why are you assigning the printer an IP address? You said it was a parallel port printer. What I am suggesting is that you run samba on the host OS and share the printer to other networked computers. By default, any local printer that is handled by cups can be shared by samba. Then you can go to another computer on the network and connect to samba. This includes the virtual network between the host and guest OSes.

Actually, the samba route would be fine, I just haven’t been able to get it to work. Samba shows as running and is assigned to runlevels 2,3 & 5. But I don’t know how to connect to samba from the winxp guest.

I read a good bit of stuff about samba on swerdna’s site but is still hasn’t clicked, yet.

Do you have another computer on the LAN running XP you can use to practice connecting to samba?

No; we’re all linux around here. The only winxp here is the vbox guest. But that should connect to samba, shouldn’t it. I just don’t how to do that within xp.

OK, I finally found the samba primer on swerdna’s howto site. Will study that for a while and see if it all comes clear. I don’t think I have samba set up properly yet.

Ok, first try to connect to samba from another Linux computer to make sure that you get the procedure right. Using swerdna’s tute as a guide, see if you can find the services on the samba server like this:

smbclient -L //bob -N

where you replace bob with the Netbios name of the server (usually it’s the same hostname as Linux, but can be configured in the samba setup to what you want). Then try it with an IP address:

smbclient -L //192.168.1.1 -N

Replace with the appropriate address for your server. In both cases you should be presented with a list of services, and the printer should be one of them. If not, adjust the samba settings to make services publicly visible.

Now, from inside the VBox XP, you should be able to connect to the host samba using the address 10.0.2.2, if you used the default NAT setting of VBox. The host is at 10.0.2.2 and the guest is at 10.0.2.15. You may not be able to browse, but you can always reach the server using an IP address. You should be able to connect a network share using the notation:

//10.0.2.2/share

where share is one of the public shares. When you have succeeded in that, try setting up a remote printer from XP that uses the printer share on the host OS.

One other thing you may need to do is adjust the XP firewall to allow you to connect out. As far as the guest XP is concerned, it thinks it’s on a LAN and therefore you have to allow connections out.

Thanks, ken-yap. By golly, I think I am going to get this working yet. Between what you told me and the tut I should be able to get it going. Got to go to work now, but will work on it later today and report back.

Who dat?! Who dat?! Who dat who say dey gonna beat them linux boys!
Certainly not those guys from Redmond.

Followed instructions from swerdna Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x for setting up basic samba, which involves editing samba.conf file and got samba running and was finally able to see my linux host from winxp guest and see my printer, although it didn’t work.

Next step was to go through tut for sharing linux printer with samba for linux and windows guests Printer Sharing: Samba Print Server for Suse/openSUSE Linux & Windows Clients which also involved editing samba.conf and cupsd.conf files. BTW, anytime you edit these conf files you have to restart the daemon; instructions in tut. Got printer installed in xp guest, but still wouldn’t print tp (test page, what did you think I meant?).

Not to worry, rebooted suse and rebooted xp and voila, tp printed. Then printed ms Access report with no problems, which is the entire goal as at this time I need to print reports for business purposes. This brings us very close to dumping the dual boot windows partition.

It was not easy (been working on this off and on for more than a month) but persistence and study finally paid off. Many thanks to all who responded; I did learn something from each responder. One of the things that makes linux so great is the community spirit and helpfulness of those who have gone through these problems themselves.

Now: Who dat?! Who dat?! Who dat say dey gonna beat them Saints! Not anybody from close to the Canadian border I hope.

Oh, yeah. How do you wrap an url like Printer Sharing: Samba Print Server for Suse/openSUSE Linux & Windows Clients with a tag like find it here and when you click on here it takes you there?

I know I have done this, but I don’t remember how.

Excellent, glad you saw it through. It’s great when one more user gains more freedom.

Oh yeah, ken_yap. It does feel so good. Oops, we’d better watch out about using any ‘f’ words.