Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Windows Server 2008 Server Core : Managing Other Hardware - Working with Line Printers

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
9/26/2011 9:11:43 AM
Unless you're working with an older mainframe or UNIX setup, you probably won't ever run into a line printer. Line printer technology is outdated and not used all that often today. Today's modern equivalent isn't even a line printer; it's more likely a high-speed printer configured to provide the equivalent services. It turns out that setting up a line printer is one of the ways you can share your printer (network or local) with a Linux machine. In fact, this technology is so embedded that some vendors like Hewlett-Packard provide print servers to provide Line Printer Daemon (LPD) services.

Windows provides a special LPD service to provide line printer support. The LPD service is an older TCP/IP service that you install with the Print Services for UNIX (found in the Other Network File and Print Services folder in the Windows Components Wizard dialog box). However, installing the server isn't enough. You'll need to configure the LPD service to provide a number of queues that users can use for printing. You can find an excellent procedure for performing the LPD configuration at http://www.le.ac.uk/cc/dsss/docs/print-lpr.shtml.

If you're serious about providing Linux print services through an LPD server, you might want to use one of the better utilities on the market. A good starting product is the SDI LPD server found at http://www.sdisw.com/LPD/default.htm. This server provides a nice graphical interface that makes it easy to manage your print queues. In addition, because this product is share-ware, you can try it before you buy it.


Once you have a printer configured to use LPD, you might wonder how to access it. The LPQ utility lets you see the status of the printer. The LPR utility lets you send output to the printer. Interestingly enough, these same utilities appear on both Macintosh and Linux systems, which is why these systems can access the LPD server on your Windows machine without problem. Both of these utilities work at the command line as described in the following sections.

NOTE

You won't find the LPQ or LPR utilities in the normal location on a Server Core system. Look instead in the \Windows\winsxs\x86_microsoft-windows-p..ting-lprportmonitor_31bf3856ad364e35_6.0.6001.16606_none_b409dc313dc8ecb7 folder of your hard drive for these executables. Except for the odd location, the utilities work the same as they do for older versions of Windows. Microsoft seems to be slating these utilities for departure since they don't appear in Vista at all.

1. Troubleshooting the Line Printer Daemon with the LPQ Utility

The Line Printer Queue (LPQ) utility provides status information that you can use to troubleshoot a LPD server. You can use this utility to display the status of each document in the queue. You may also use the LPD Print Service instead of this utility to obtain maximum functionality. This utility uses the following syntax:

LPQ -Sserver -Pprinter [-l]

The following list describes each of the command line arguments.


-S
server

Defines the name or IP address of the server hosting the LDP service. You use the standard network name of the machine when working with Windows. Notice that there isn't any space between the -S command line switch and the server name. In addition, the command line switches for this utility are case sensitive; typing -s or /s isn't the same as typing -S.


-P
printer

Specifies the name of the LDP printer queue. This isn't the name of the printer, but the name of the printer entry you create as part of setting up an LPD server. The name you see in the Printers and Faxes folder is the same as the name of the LPD server queue for that printer.


-l

Displays the server information in verbose mode. This setting doesn't make much of a difference on Windows systems; you see the same information. However, you might see more information when accessing other platforms such as Linux. Note that this command line switch is a lowercase L.

Using the LPQ utility is relatively easy. For example, my machine's name is Main and I configured a LaserJet printer connection on it using the techniques described earlier in this section. Typing LPQ -SMain -PLJ5 at the command prompt provides the display shown in Figure 12.1.

There's nothing odd or strange about using an LPD server on Windows. Any printer you configure this way still provides the same management window as any other printer you connect to your machine or access from the network. You can use this GUI display to manage the print jobs in the queue. These features include all of the standard Windows features, such as changing job priority, pausing a job, or canceling all jobs. The only difference is the server used to service the print queue.


Figure 1. The LPQ utility tells you about the status of a selected printer queue on your machine.

2. Sending a Print Job to a Printer with the LPR Utility

The Line Printer Request (LPR) utility sends a print job to the printer. When working at the command line, you'll normally send text files, but the LPR utility can also accommodate binary files and PostScript. You may also use the LPR Port Monitor instead of this utility to obtain the latest support. This utility uses the following syntax:

LPR -S server -P printer [-C class] [-J job] [-o option] [-x] [-d] filename

The following list describes each of the command line arguments.


-S
server

Defines the name or IP address of the server hosting the LDP service. You use the standard network name of the machine when working with Windows. Notice that there isn't any space between the -S command line switch and the server name. In addition, the command line switches for this utility are case sensitive; typing -s or /s isn't the same as typing -S.


-P
printer_queue

Specifies the name of the LDP printer queue. This isn't the name of the printer, but the name of the printer entry you create as part of setting up an LPD server. The name you see in the Printers and Faxes folder is the same as the name of the LPD server queue for that printer.


-C
class

Defines the job classification to use for the burst page. You must define print jobs for the server to use this feature.


-J
job

Defines the job name to print on the burst page. You must define print jobs for the server to use this feature.


-o
option

Determines the type of the file. The default setting is a text file. The only standardized option value is a 1, which indicates a binary or PostScript file. The presence of this option doesn't mean that the printer can handle the file you send or that Windows won't strip control characters. Make sure you read the Microsoft Knowledge Base articles on this topic, such as the one found at http://support.microsoft.com/kb/124735/EN-US/, before you create binary print jobs.


-x

Enforces compatibility with SunOS4.1.x and prior version when working with a remote printer (you can read more about SunOS4.1.x and its successor at http://www.sun.com/bigadmin/content/misc/solaris2faq.html).


-d

Places this data file at the front of the print queue. The default is to place the data file at the end of the queue.

Generally, you won't need to use all of the LPR options. For example, you can print a text file on a Windows machine simply by specifying the server name, the print queue, and the name of the file as shown here:

LPR -SMain -PLJ5 MyDir.TXT

NOTE

Once you establish an LPD server on your system, you can use the associated printer as you would any other printer from Windows applications. Consequently, the LPR utility is like any other command line utility for printing—it lets you create basic output from the command line. However, LPD servers and their associated printers require special setup to pass control characters and other non-ASCII data. Make sure you understand and configure your LPD server setup before you use it for general application output.

Other -----------------
- Microsoft SQL Server 2008 Analysis Services : Designing More Complex Dimensions - Junk dimensions & Ragged hierarchies
- Microsoft SQL Server 2008 Analysis Services : Designing More Complex Dimensions - Slowly Changing Dimensions
- SharePoint 2010 : Social Architecture - Disabling social features for a user & Deleting a note associated with a page
- SharePoint 2010 : Social Architecture - Setting up a tag cloud and navigating to the Term Store
- Securing Windows Server 2008 R2 : Read-only Domain Controller
- Securing Windows Server 2008 R2 : File Classification Infrastructure
- SQL Server 2008 R2 : Join Selection (part 2) - Determining the Optimal Join Order & Subquery Processing
- SQL Server 2008 R2 : Join Selection (part 1) - Join Processing Strategies
- Managing Microsoft Windows Server 2003 Disk Storage : Configuring Disks and Volumes
- Managing Microsoft Windows Server 2003 Disk Storage : Understanding Disk Storage Options
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server