Setting up a Local Printer (USB)

Setting Up a Local Printer

Local printing allows you to attach a printer to a users PC, install it on their PC and allow the user to print from Eclipse as well as windows. This is not a network printer.

1. Configure the Printer to Print from Windows. The Printer may be a Networked Windows Printer, or connected locally utilizing a USB Port or a Parallel Printer Port. Make the Printer your Default Windows Printer if using USB. For Parallel Port or Networked Windows Printers, the Printer need not be the Default Windows Printer (although we would RECOMMEND it be the Default Windows Printer.)

2. Login to Eclipse.

3. Select Terminal Setup from the F2-System/System Files… menu.

4. Locate your Terminal ID and place the cursor on that line. If there is not one you will need to setup a Terminal Id. This can be done by accessing the Terminal Setup screen in Eclipse. F2/F/T.

Once your ID is created, Highlight it and select ALT/S to get the Local Printer Menu

Figure 1 Local Printer Menu.

5. Under the Local Printer field hit the F10 key and select the ‘HPLJ’ or HPLJ-1TRAY’  for a Laser Printer or ‘Printronix’ for a Dot Matrix or Zebra Label Printer. Local Laser Printers support One Tray ONLY.

6. Under the Form Loaded field hit the F10 key and select the form you desire.

\*ANY* is the most common form loaded on a Local printer and means that

everything you print from Eclipse will print to your Local printer even if you select another Eclipse printer..

7. Press Esc to exit the Local Printer Assignment screen and save your settings.

8. Access your Eterm Configuration screen by selecting Configure and then Communications from the grey menu bar in Eterm.

Figure 2: Configure/Communications screen.

9. Move the cursor to the ID field and type in your Terminal ID.

Note: It is important to type your User ID exactly as it appears on the Terminal Setup screen, including capitalization where appropriate.

10. Click on OK to save your changes.

11. Access the Configure/Printing menu in eterm and check off ‘Default Printer’ if USB connected, ‘Selected Printer’ may be used if Network or Parallel Port is used. This will give you the option to select the installed printer from your computers installed printers. Once selected click on OK.

Can I use my Linux server as a network print server?

The Eclipse database server running Red Hat Enterprise Linux certainly has the capability to function as a print server for the rest of your network, however most Eclipse customers choose to use integrate both their domain controller and print server duties on the Windows platform.

Eclipse Support will provide assistance with any issues printing from Eclipse, but we support for general network printing issues is not covered under the Eclipse support contract. If you choose to use the RHEL server as a print server and require support, the best contact would be your RHEL support provider:

There is handy reference information on setting up and managing print queues in the Red Hat System Administration Guide.

How do I redirect a printer?

There are a number of different ways by which to redirect print jobs, and the method chosen is typically personal preference.

Redirecting via /etc/hosts

Editing the “lp” hostname entry in the /etc/hosts file redirects network traffic to a new IP address, effectively re-routing print jobs.

vi /etc/hosts

Find the appropriate hostname and change the IP address. Save and quit.

Redirecting via the Print Daemon Configuration

Editing the hostname to which the print daemon connects to redirects communication to a new print server, effectively re-routing print jobs.

On Linux (command line):

vi /etc/cups/printers.conf

On Linux (GUI):

  • Open System -> Administration -> Printers
  • Select the appropriate print queue
  • Change the hostname/address contained in the Device URI field
  • Click Apply

On AIX (command line):

vi /etc/qdaemon

On AIX (smit):

smit queue
  • Change / Show Print Queue Characteristics
  • Select the appropriate queue
  • Select 1 Queue Characteristics
  • Update the HOSTNAME of remote server field
  • Save and quit

Redirecting via UV Spooler Configuration

Open the UniVerse administration interface.

  • Log in as root
cd /u2/uv
./.profile
  • Spooler -> Device Management –> Maintain Devices
  • Navigate to the  Driver field and update the driver name to reflect the new destination
  • Save and quit

Redirecting via UV Driver Files

Editing the queue name contained in each UV driver file will change the queue to which the UV spooler sends jobs, effectively re-routing print jobs.

vi /usr/spool/uv/lp1.dvr

Change the queue name to match the new destination queue. Save and quit.

How do I add a printer in Linux?

To view a step-by-step screencast of this process, click here.

To add a printer:

  • Log into the server as root
  • If you are using Eterm instead of PuTTY (not recommended), make sure to set the appropriate TERM variable:
export TERM=vp
  • Create driver file:
    • NOTE: Replace lp1 with the name of the printer being configured (lp1, lp20, etc.)
echo "lpr -P lp1" > /usr/spool/uv/lp1.dvr
chmod +x /usr/spool/uv/lp1.dvr
  • Create queue in UV:
cd /u2/uv; uv
  • Create queue in UV:
    • NOTE: Replace lp1 with the name of the printer being configured (lp1, lp20, etc.)
    • Spooler -> Device -> Maintain
    • Use ENTER to advance, selecting all defaults unless otherwise specified.
    • Name = LP1 (shows all caps)
    • Path = /dev/null
    • Driver = lp1.dvr (ignore error)
    • Lock = lock.lp1
    • Press Enter several times, accepting the defaults, until done.
    • ESC -> Q -> ENTER to exit
  • Create the Linux print queue, with the following variables adjusted appropriately:
    • lp1: the name of the printer being configured (lp1, lp20, etc.)
    • socket: the communications protocol to be used. While the default socket setting works for most printers, some Zebra and other printers prefer to use the lpd communications protocol (lpd://).
    • lp1 or 192.168.1.123: the hostname or IP address of the printer
/usr/sbin/lpadmin -p lp1 -E -v socket://lp1
  • If you created the print queue using a hostname (ie lp1) instead of an IP address (ie 192.168.1.123) in the previous step, you’ll need to make certain the server can resolve the hostname. If you have not yet added the hostname to your /etc/hosts file, do so now using the following command (take note the double greater-than symbols):
echo "192.168.1.123     lp1" >> /etc/hosts 
  • The printer is ready for use by Eclipse

How do I resolve common printer errors under AIX?

To check the status of an AIX print queue (for example, lp1):

lpstat -plp1

If the status is DOWN, try enabling the print queue:

enable lp1

If the status remains DOWN, try pinging the printer:

ping -c4 lp1

If there is no response to the pings, verify the printer’s network connection.

The best way to verify a printer is working outside of Eclipse is to test the printer with a standard Windows workstation. If you cannot print from Windows, there is a chance the printer is mis-configured. For your convenience, here are the numbers for a few common printer manufacturers:

  • HP: 800-474-6836
  • Okidata: 800-654-3282
  • Zebra: 847-913-2259

If the printer responds to pings, but immediately goes DOWN after attempting to enable the printer, try to cancel all jobs on the print queue:

cancel lp1

If the printer still goes DOWN, remove and recreate the AIX print queue:

  • How do I remove a printer under AIX?
  • How do I add a printer under AIX?