Operating System - HP-UX
1832880 Members
2728 Online
110048 Solutions
New Discussion

Print to Windows Printers from HP-UX

 
Mason Liu
Advisor

Print to Windows Printers from HP-UX

Our developers use desktop PCs with Reflection for X to access the new HP9000 server. These PCs are running NT4 or W2K with various kinds of local LaserJet printers.

Now, how to enable these developers who sit in different offices to print their Unix files and screens to their local printers?

For Linux, we use either Samba service or Windows lpd service. For HP-UX 11.00, I tried to use SAM and Webmin to config a remote printer without success. If someone has done it, could you help. Thanks.

Again, the printers are not networked, they are local to the Windodws PC and shared. JetAdmin and HPDPS are not options.
11 REPLIES 11
Bill Hassell
Honored Contributor

Re: Print to Windows Printers from HP-UX

Since you don't have the printers on the network (ie, JetDirect cards), the PCs will have to enable their remote printing capability (lpr/lpd). How to do this varies greatly on Win95/98 and WinNT/2K. Once enabled, then simply using SAM to setup a remote printer will work...sort of.

To start with, HP-UX ASCII files have only a linefeed (LF) character at the end of every line (record separator) while PCs and printers need both carriage return (CR) and LF at the end of each line. Without this translation, output on the printer will stairstep down and across the paper right off the edge.

HP-UX has a translation tool for this: ux2dos so each time a user needs to print an ASCII file from HP-UX, use this:

ux2dos My_File_Name | lp -dremote_printer

Note also that PCs will not process any options like -oduplex or -olandscape as HP-UX is a SysV flavor of Unix and the -o options must be processed at the destination server.

When setting up the remote printer, SAM (or lpadmin) require 3 names: local queue name on HP-UX, remote hostname (the PC) and remote printer name (as defined by the PC when you enable sharing). Make sure the users do not share printers with special characters in their names like spaces and semicolons, etc.

Also note that if the users are running Xwindow programs, you'll need some research into how to capture graphics screens on the HP-UX side (ie, xwd) and how to translate this Xwindow format into a printable file. You will probably be better off using the Windows screen capture capability (ALT-PrtScr) and pasting it into WordPad so it can be resized and printed locally.

Similarly, don't use xterm or hpterm to communicate with the Unix systems. Instead, start a copy of the VT100 emulator provided by the Reflection/X package, then use the local File->Print keys to capture text data. There is SIGNIFICANT Xwindow overhead with using xterm/hpter/dtterm as a telnet process.


Bill Hassell, sysadmin
Justo Exposito
Esteemed Contributor

Re: Print to Windows Printers from HP-UX

Hello Mason,

You can use the unix services for windows NT and the jetadmin software in HP/UX to declare the printers in the HP. I did it and works fine.

Regards,
Justo.
Help is a Beatiful word
D. Jackson_1
Honored Contributor

Re: Print to Windows Printers from HP-UX

Mason - I will give a shot at this.
Try doing this thru SAM.
Find your way to the Printers and Plotters ICON within SAM.
GO to the tab and select ADD REMOTE PRINTER.
In the first blank give : The UNIX printer name.
In the second blank give : The IP Address of the workstation that your printer is connected too.
In the third blank give : The windows printer name that is assigned to the workstation.
You should be good to go now, you may have to edit a few files on the HPUX side and you will have to restart the lp spooler..

Good luck.
Mason Liu
Advisor

Re: Print to Windows Printers from HP-UX

I tried what you said several times and nothing came out of the printer. Now, I got an already exist error msg and no printer/no queue can be found anywhere. See attachment.

The Linux server (Red Hat 7.1) can print to the printer OK. It's embarrassing to know all your successes and I just couldn't make it to work.
D. Jackson_1
Honored Contributor

Re: Print to Windows Printers from HP-UX

Can you see this printer on the server with a lpstat -amason ?? Make sure that it is enabled and accepting requests.
Also your /etc/inetd.conf file should have this line in it:
printer stream tcp nowait root /usr/sbin/rlpdaemon rlpdaemon -i

You may also want to add the printer to your /etc/hosts file..
Mason Liu
Advisor

Re: Print to Windows Printers from HP-UX

lpstat -amason returned "destination "mason" non-existent" msg.

The "printer stream ..." is in /etc/inetd.conf file. Nothing related to the printer is in the hosts file though.

Do I have to reboot the thing?
D. Jackson_1
Honored Contributor

Re: Print to Windows Printers from HP-UX

A reboot is not needed. From the looks of it the printer was not added thru SAM like I thought it was. Go back into SAM and see if you can remove any remote printers. Try readding the printer thru SAM. Add the ip address of the remote workstation and add the printer name to the hosts file..
Mason Liu
Advisor

Re: Print to Windows Printers from HP-UX

Trust me, all printer related windows are empty. I went into queue, spooler, logical, physical, ..., there is nothing I can delete.

What are the files that may contain printer settings? Someone here is contacting HP support today.
Justin Beeyendeza
New Member

Re: Print to Windows Printers from HP-UX

We have made this work, printing from HP-UX 10.xx to Windows 2000 Printer.
1. We put an IP address entry of the PC into /etc/hosts so that we could use the name of the PC
2. Using SAM, we defined a remote printer, making sure the name of the PC and the shared printer on the PC were in the same case.
3. We started the TCP/IP Print Server service on the PC. We actually set it to automatic and rebboted the PC
4. In SAM, when we checked the BSD printer, it did not work. We left the BSD box unchecked.
5. We sent a job with lp -dxxxx command and everything worked fine.

Hope this helps you.

Bill Hassell
Honored Contributor

Re: Print to Windows Printers from HP-UX

The message:

lpstat -amason returned "destination "mason" non-existent" msg.

means that it was never created. You can verify this with lpstat -v to show all the printers on the system.

In the .pdf attachment, I noticed that BSD was not checked...that needs to be enabled as Windows does not understand the SysV remote spooler ID numbers. This would be the same if you direct HP-UX to the Linux system.

Make sure that SAM reports that the printer was added successfully and shows up in the printer list for SAM. If there are errors, you can get the text of the errors in the SAM log in /var.

Make sure that the Windows system name is resolvable (ie, nslookup) or better yet, just put the IP address in for the name of the remote computer.


Bill Hassell, sysadmin

Re: Print to Windows Printers from HP-UX

I just did this through sam on an HPUX11 box, when I did an lpstat -t I got a message saying the print server was down. So I checked my Win2K box which is the print server and I had to install the printer service for unix. (see below)

On the Win2K box goto
Start
Settings
Control Panel
Network and Dial-Up Connections
Advanced
Optional Networking Components
check other network file and print services
and hit next

Now you can goto the UNIX box and print like crazy :-).
Whats it there for if you can't use it