Operating System - HP-UX
1819803 Members
3098 Online
109607 Solutions
New Discussion юеВ

Remote printer on Windows XP ?? How to Add in HPUX

 
Shiv Sharma
New Member

Remote printer on Windows XP ?? How to Add in HPUX

hello Gurus,

I want to add a remote printer in HPUX which is attached to lpt1 port of a windows XP machine.

Please suggest me. I have already tried the known possible ways i could. here is an example of command i ran to add this printer in HPUX.

#lpadmin -pPR -v/dev/null -mrmodel -ormTEST -orpPR -ocmrcmodel -osmrsmodel -ob3
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: Remote printer on Windows XP ?? How to Add in HPUX

I thought the name of the remote machine specified in orm needed to be a network name as in TEST.com unless it is specified as an alias in /etc/hosts.

Otherwise, I see nothing wrong compared to what I would do.


Pete

Pete
Shiv Sharma
New Member

Re: Remote printer on Windows XP ?? How to Add in HPUX

Yes the machine name TEST is in /etc/hosts.

But no response. the Printer name on remote machine is PR and on UNIX also PR.

Any idea guys.
Matti_Kurkela
Honored Contributor

Re: Remote printer on Windows XP ?? How to Add in HPUX

Welcome to ITRC Forums!

You're probably assuming that Windows XP and HP-UX are using the same network protocol for sharing printers. This assumption would be incorrect.

If you want to use Unix printing protocol with Windows XP, you must install an optional Windows component called "Print services for Unix".

Go to Control Panel -> Add or Remove Programs -> Add/Remove Windows Components.

From the dialog, select "Other Network File and Print Services", click on "Details" and select "Print Services for Unix".

Click on "OK", "Next", insert a Windows installation CD if necessary, then click "Finish".

Then, right-click on "My Computer" and select "Manage". Open the "Services and Applications" tree branch and select "Services". Find "TCP/IP Print Server" from the list on the right side of the window. Right-click on it, select Properties. Change the "Startup type" to Automatic, then Start the service and click OK to exit the dialog.

Now your Windows XP is ready to receive remote print jobs from Unix systems using the Unix-style printing protocol.

MK
MK
Bill Hassell
Honored Contributor

Re: Remote printer on Windows XP ?? How to Add in HPUX

Before anything will work, you have to enable Unix printing on your XP system (lots of steps). Use add/remove Programs in the Control Panel. Click on Add/Remove Windows Components in the left frame. Scroll down the list to Other Networking ...Services. Highlight and click the details to verify it has the Print Services for Unix box checked. Then check the Other Network... box and Next.

Now your Printers and Faxes in Settings, and rename any printer with white space and a long name. For example: HP Laserjet 2600n should be named HP2600n or perhaps lj2600n. Spaces in printer names are like spaces in filenames -- they create special handling requirements on the HP-UX side. Keep the names short on the PC side, typically 8 characters. MiXeD case or UPPERCASE names might work but I simplify everything to lowercase. Unlike PCs, HP-UX differentiates UPPERCASE and lowercase characters. If you get the PC's printer name wrong on the HP-UX side, it won't work and there will be no help available.

Finally, rightclick on MY Computer (or Control Panel -> Administrative Services -> Services) and select Manage, then select Services... and scroll down to TCP/IP Print Server and rightclick to see the Properties. In the General tab, select Automatic for the startup option. This will keep the service running when you reboot.

Now delete the printer you added (lpshut then lpadmin -xPR). Now add the printer again. Unless you know that you have a DNS system that tracks your PCs IP address, I would turn off DHCP for this PC and pick a permanent address, then use it rather than a PC hostname.:

lpadmin -plj2600n -v/dev/null -mrmodel -orm12.34.56.78 -orplj2600n -ocmrcmodel -osmrsmodel -ob3

Follow the lpadmin command with:
accept lj2600n
enable lj2600n

When setting up remote printing through a PC, that PC becomes a fixed requirement for the HP-UX system. Think twice about using a laptop -- it isn't always on or available. A cheap whitebox can sit in the corner with a fixed IP address and do nothing but provide print services for your HP-UX system. The PC can provide the driver conversion necessary for printers that do not support simple ASCII text (like the HP 2600n LaserJet or any non-HP printers).

If it still doesn't work, check the PC logs (a pain to find). Rightclick My Computer, then Manage -> Event Viewer then go through each log looking for error messages.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: Remote printer on Windows XP ?? How to Add in HPUX

One additional note: For XP and printing Postscript files from HP-UX, you may need to set SimulatePassThrough in the registry. See this document:

http://support.microsoft.com/kb/150930

If all of this seems like a royal pain, you'd be correct. HP-UX lives in the dark ages when it comes to printing except when using HP-only, PCL-5 (or lower) printers connected directly to the network with an HP network card (called JetDirect). Many, many printers (mostly cheap) are incompatible with HP-UX because they require rasterized images and cannot print simple text like "abc". All-in-one printers are particularly incompatible. You can usually guess which ones will work by looking at the supported operating systems -- Windows-only, especially WinVista or Win7.

And if you get the printer to actually print something through a print server (Windows or an external non-HP adapter), you may find plain ASCII text stair-stepping down the page. This is due to the text from HP-UX having only a linefeed. ASCII files will have to be printed through a filter such as ux2dos as in:

ux2dos /tmp/myfile | lp -dmyprn

An alternative for HP printers using JetDirect is to use hpnpf directly rather than lp:

hpnpf -x 12.34.56.78 -N /tmp/myfile


Bill Hassell, sysadmin
Shiv Sharma
New Member

Re: Remote printer on Windows XP ?? How to Add in HPUX

Thanks it was helpful.

I tried the same process on two different machine. one machine started working perfectly but on another windows xp machine it shows "connection to 192.168.172.146 is down" when this ip is alive.

any idea?