printing in the metaframe environment jim west global escalation team cseit event 2003 jim west...

Post on 26-Dec-2015

221 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Printing in the MetaFrame EnvironmentPrinting in the MetaFrame Environment

Jim WestGlobal Escalation TeamCSEIT Event 2003

Jim WestGlobal Escalation TeamCSEIT Event 2003

2

Agenda• Printer Definition• Autocreation• Imported Print Servers• Windows CE• Universal Print Driver (UPD)• Follow the Print Job• Utilities

3

Printer Definitions• Auto-created (Requires the client network)

– Locally Attached• Info stored in HKLM

– Locally Defined• Info stored in the user’s profile

• Autoconnected– Imported print queues assigned to users

• Retained in the data store

• Manually Mapped– Mapped from inside the session

• Retained in the users’ profile• HKCU/Printers/Connections

4

Printer Autocreation: Overview

•Server Requests the printer information

•Wfica indexes and enumerates the client’s printer information.

•The ICA virtual channels are used to communicate with the server. (CTXCTL)

SD

SD

ESC

DLT

PROLIANT 8000

5

Printer Autocreation: Client Side

• The basic questions that need to be answered……– What port?– Printer name?– Which print driver?

• Answered by Wfica(ICA client engine)– Wfica32 for win32 clients(Win9x, Win2k,etc).– WficaCE for Windows CE– Wfica for Linux and Unix

• Ini file entries required• Universal Print Driver now supported

6

Printer Autocreation: Client Side• Printer User Interface (on local client)

– Locally Attached• Black Ice PDF Writer• Canon Bubble-Jet• Panasonic KX-P6500

– Locally Defined• HP LaserJet 4000 on Print Server: jwest-ftp

7

Printer Autocreation: Client Side• Auto-created (Requires the client network)

– Locally Defined• Info stored in the user’s profile

8

Printer Autocreation: Client Side• Auto-created (Requires the client network)

– Locally Attached• Info stored in HKLM

9

Printer Autocreation: MetaFrame for Unix• Client side printer mapping

– Run /opt/CTXSmf/sbin/ctxcfg –p enable– Run /opt/CTXSmf/bin/ctxprinters to list

10

Printer Autocreation: Server Side• Client informs the server what

virtual channels it supports.

• Wfshell: IMA flags are checked– Per server or per farm restrictions– Check for Feature Release license

• Ctxlogon: – Asynchronous or Synchronous

• Wfshell:– List the client side printers– Get the user’s SID– Check user’s profile for printer info

• Client informs the server what virtual channels it supports.

• Wfshell: IMA flags are checked– Per server or per farm restrictions– Check for Feature Release license

• Ctxlogon: – Asynchronous or Synchronous

• Wfshell:– List the client side printers– Get the user’s SID– Check user’s profile for printer info

Session Initialization

AutocreatedPrinters Allowed?

OrganizedPrinter Data

YES

NO

11

Printer Autocreation: Server Side• User’s profile server-side (First Login)

– DevModePerUser • “Client” Network• Specific ICA client name: W2KPRO• Both Native AND Universal Print Drivers

•Note: HKCU\Printers\Citrix does NOT contain client network printer

information.

12

Printer Autocreation: Server Side• User’s profile server-side (Next Login)

– DevModePerUser copied to ..\Citrix\DevModes2– ..\Citrix\client,Printername\PrinterDriverData– PrinterInfo2Attr (Offset to locate extended data)

•Note: HKCU\Printers\Citrix now contains client network printer info.

13

Printer Autocreation: Server Side• Wfshell:

– Checks to see if the printer is allowed– Determines if printer info resides in

Profile– Checks for the printer in HKLM\CCS\

Cntrl\Print\Printers– Calls are made to build the printer

• Cdmprov.dll: Calls into Spoolsv.exe– Locates the server driver

• Inf files – Wtsuprn.inf Parsed first, takes precedence – Wtsprnt.inf Replaced by IMA during

replication

Approved?OR

Mapped?

Printer AlreadyExist?

NO

YES

14

Printer Autocreation: Server Side

Driver Match inRegistry?

Silent Install?Build Print

Queue

YES

NO YES

• Cdmprov.dll: Calls into Spoolsv.exe– Locates the server driver

• Registry HKLM\CCS\CNTRL\Print\Environments\Windows NT x86\Drivers\Version-3\printer model name

– Silent Install• PrintUIEntry /ia /m “printer model name” /q• Queries \winnt\inf\ ntprint.inf to build the printer• MF XP FR3 can disable this feature via the CMC

15

Printer Autocreation: Server SideSession Initialization

AutocreatedPrinters Allowed?

Approved?OR

Mapped?

Driver Match inRegistry?

Silent Install?

OrganizedPrinter Data

Printer AlreadyExist?

Build PrintQueue

AdditionalPrinters?

End Process

YES

NO

NO

NO

NO

YES

YES

YES

NO

YES

YES

NO

• FR2 – A driver can only be

mapped OR restricted.

• FR3– A print driver can be

restricted AND Mapped

– Silent install can be disabled.

16

Printer Autocreation: Server Side

• Mapping files– Wtsuprn.inf is read into IMA only during the MF XP install.

• Qprinter utility from the MetaFrame CD can be used to import WTSUPRN entries into the CMC post install.

• Qprinter /imprmapping MappingFileName– Wtsprnt.inf is rewritten not appended as changes are

replicated.• Driver entries in the registry

– HKLM\System\CCS\Control\Print\Environments\Windows NT X86\

– ..\Version-2 specifies Windows NT 4 drivers– ...\Version-3 specifies Windows 2000 drivers

• Silent install– NTprint.inf contains the file names required to install the

win2k native drivers.– Can be modified by 3rd party vendors so their drivers appear

in the pull down list during install or to update the native OS drivers.

• Mapping files– Wtsuprn.inf is read into IMA only during the MF XP install.

• Qprinter utility from the MetaFrame CD can be used to import WTSUPRN entries into the CMC post install.

• Qprinter /imprmapping MappingFileName– Wtsprnt.inf is rewritten not appended as changes are

replicated.• Driver entries in the registry

– HKLM\System\CCS\Control\Print\Environments\Windows NT X86\

– ..\Version-2 specifies Windows NT 4 drivers– ...\Version-3 specifies Windows 2000 drivers

• Silent install– NTprint.inf contains the file names required to install the

win2k native drivers.– Can be modified by 3rd party vendors so their drivers appear

in the pull down list during install or to update the native OS drivers.

17

Printer Autocreation: Server Side•With FR3 You can disable the silent install process

•Allows the administrator to control the drivers used.

18

Printer Autocreation: Locally Defined• Metaframe FR2 • Locally Defined Auto-Created Printer:\\PrintServer\

Printer1• Does not utilize the ICA virtual channel

server

server

Domain: Alpha

Metaframe XP FR2 Server

\\PrintServer

printQueue

\\PrintServer\Printer1

ICA Session

Print Job via SMB

19

Printer Autocreation: Locally DefinedPrinter Autocreation: Locally Defined

server

server

Domain: Alpha Domain: Bravo

\\PrintServer

printQueue

\\PrintServer\Printer1

ICA Session

Metaframe XP FR2 Server

•Metaframe FR2

•Locally Defined Auto-Created Printer:\\PrintServer\Printer1

•Utilizes the ICA virtual channel

•Presentation server is not in the same domain as the print server

20

Printer Autocreation: Locally DefinedPrinter Autocreation: Locally Defined

server

server

Domain: Bravo

\\PrintServerprintQueue

\\PrintServer\Printer1

ICA Session

Metaframe XP FR2 Server

•Metaframe FR2 with XE102W081

•Locally Defined Auto-Created Printer:\\PrintServer\Printer1

•Utilizes the ICA virtual channel

•HKLM\SYS\CCS\Control\Citrix\ClientPrinterAutocreate

•fCreateNetworkPrinter 1 (0 for default FR2 behavior)

21

Printer Autocreation: Locally Defined•With FR3 The Citrix admin has the flexibility previously available only with registry changes.

22

Printer Autocreation• Can LPT port redirection be disabled but the

users still auto-create their printers???• Can USB printers be autocreated???

23

Imported Print Servers

SD

•\\Printserver\Lexmark•\\Printserver\HP4000

•Printer Info

•Data Collector

•Print server

• Data Store

-LHC is updated

SD

SD

ESC

DLT

PROLIANT 8000

24

Imported Print Servers• CTXTrace 5.7

– Profiling captures the IMA communication• Data store• Dynamic store• Local host cache

25

Imported Print Servers

• Print server name

• Printer devMode

• Printer share name

• User list

26

Imported Print Servers• User’s profile server-side

27

Imported Print Servers• Auto-connected Printers

– Do not use the ICA channel– Use MS SMB printing– The print job does not spool on the Metaframe

server– The printers do not have associated registry

keys in HKLM only HKCU– Print jobs might be slower to an autoconnected

printer if the print server is over a WAN link from the Metaframe server.

– The print jobs cannot be throttled and do not use the ICA compression

28

Windows CE •Limited user interface

•Locally attached printer information is retained in the client’s registry

•Printer information specified via the CMC and retained in the DS

•Windows based printing

•LPT port redirection

29

Windows CE• Printcfg.exe

– User required to select print driver and client port– Adds registry entry to the user’s profile

• \HKCU\Software\Citrix\AutocreatedClient Printer\Clientname

• Citrix Management Console– No end user action required– 2nd login required to complete the process– Admin specifies the printer information per terminal

name• Printer name• Driver• Client side Port

30

Windows CE

31

Windows CE• Deleting the CE client printers

– Sets the status from “downloaded” to “deleting”– Requires the client to log in again to complete the action.– Dependant upon the client name

• What if the client name is changed???– The printer will remain as “deleting”.– Does not affect the performance of the server.

• How do you clear the “deleting” printers??– The same client name needs to login to complete the

delete process

32

Universal Print Driver(UPD)“People can have the Model T in any

colour--so long as it's black.” Henry

Ford

•Similar to the first version of the Universal Print Driver….Any color as long as its black.

33

Universal Printdriver (UPD)• Introduced with FR2

– 300dpi– Monochrome– Based on the HP LaserJet II driver– Uses PCL4 format

– Requires Win32 ICA client 6.20 or higher • Updated with FR3

– 600dpi– Color– Based on the HP LaserJet 4500– Uses PCL5c format– Requires ICA client 7.00 or higher

• Added support for Linux and Solaris– Uses entries from the \etc\printcap or lpstat response– Uses the Post Script version of the HP 4500 driver

• Introduced with FR2– 300dpi– Monochrome– Based on the HP LaserJet II driver– Uses PCL4 format

– Requires Win32 ICA client 6.20 or higher • Updated with FR3

– 600dpi– Color– Based on the HP LaserJet 4500– Uses PCL5c format– Requires ICA client 7.00 or higher

• Added support for Linux and Solaris– Uses entries from the \etc\printcap or lpstat response– Uses the Post Script version of the HP 4500 driver

34

Universal Printdriver(UPD)

UPD Print Driver

Client side “Rasterizer”

Client side print spooler

•Print driver formats the data from the application.

•Formatted document sent to the client in PCL4/PCL5c or PS format.

•The graphic is presented to the client spooler.

•The picture is formatted and spooled to the print device per the

local print driver.

•Server

•Client

35

Universal Printdriver(UPD)• Registry entries

– HKLM\SW\Citrix\UniversalPrintDrivers\• Driver List: PCL4,PCL5c,PS• \PCL4

– HP LaserJet Series II• \PCL5c

– HP Color Laser Jet 4500• \PS (For Unix / Linux Clients)

– HP Color LaserJet PS– HKLM\Sys\CCS\Control\Print\Environments\Drivers

• \Version-3– HP LaserJet Series II– HP Color LaserJet 4500– HP Color LaserJet PS

36

Universal Printdriver(UPD)• Can the Universal Print driver be used when

printing directly to the print server???• Can UPD II be disabled so only UPD I will be

used without changing the feature release level???

37

Follow the Print Job• Graphics Device Interface

– GDI ~ Windows based printing– The user selects the document output for either the video card to

display or for the print driver to render.– The print job is formatted and converted by the print driver to be

“displayed” to the print device.– The resultant .SHD and .SPL files are sent to

\winnt\system32\spool\printers folder.– The .SHD and .SPL files are sent to the print monitor determined by

the user when the print job was initiated.

002.shd/002.splPrint Drv Print monitorWord.doc

Print Spooler

38

Follow the Print Job: Server Side

•GDI printing a.k.a. “Windows Printing”

•The application formats the print job using the driver’s specifications

•Utilizes the server’s spooler system

Application

GDI

Spoolsv.exe

Print Driver

Winspool.drv

39

Spoolss.dll ( Router )

Cdmprov.dllLocalspl.dllWin32spl.dll Network Print

Provider

Follow the Print Job : Server Side•LPT port redirection print jobs

•Windows Based printing via the spooler

•Network printing

•Autoconnected printers

40

Follow the Print Job : Server Side

•To the ICA client

Cdmprov.dllLocalspl.dllWin32spl.dll Network Print

Provider

SpoolFile

Print Job Creation API

Job Scheduling API

Job Scheduler Thread

Language Monitor

Network Drivers

Cdm.sys

Cpmmon.dll (Citrix Port Monitor)Local Port Monitor

Kernel-Mode Port Driver Stack

Local Printer Port(LPT / TCP)

Print Server

41

Follow the Print Job: Client Side

•From the server

•The ICA client engine hands off to

the local client

spooler

•The print job works up through the ica client

Spoolss.dll ( Router )

Localspl.dll Win32spl.dll Network PrintProvider

SpoolFile

Print Job Creation API

Job Scheduling API

Job Scheduler Thread

Language Monitor

Local Port Monitor

Kernel-Mode Port Driver Stack

Local Printer Port(LPT / TCP)

Print Server

Wfica32.exe

PCL4Rast.dll

VDCPM30N.dll

VDSPL.lib

Network Driver

42

Utilities

•Print Migrator3

•SMC Console

•Project Compatibility

43

Utilities: Print Migrator3• Print Migrator3 from Microsoft

– Allows all the print driver info to be saved to a cab file

– Allows a print server to be replicated in a test environment

– Allows Citrix Support to replicate the customer’s printing environment down to the exact files

44

Utilities: Print Migrator

45

Utilities: SMC Console• SMC console from Citrix CDN

– Allows a live session’s bandwidth to be temporarily limited to test the impact of BW restrictions for Printing.

– Provides real time insight on the Virtual channel usage.

• Citrix.com/cdn– Citrix Server SDK ver 2.3 is the latest as of 6/11/2003 and

includes the SMC components and supports FR3. No sessions are returned in the pull down list if the wrong version is used.

46

Utilities: SMC Console

47

Utilities:Project Compatibility• Project Compatibility

http://www.dabcc.com• Not developed by Citrix• Written using the SDKs• Pulls event viewer info from the servers• Dynamically sets print mappings• Reads and Writes to the data store

48

Utilities:Project Compatibility

49

Questions:• Can LPT port redirection be disabled but the client still

autocreate printers???– YES. LPT port redirection utilizes the CTXLPT1 or CTXLPT2 virtual

channels but windows printing uses the CTXCPM channel.

• Can USB printers be autocreated???– YES. Although USB redirection is not supported the printer attached to

the USB port can be autocreated as long as the client OS returns the printer info as a printer port.

• Can the Universal Print Driver be used when printing directly to the print server???

– NO. The client side PCL4RAST.dll is required to accept the print job to then hand it off to the local client spooler.

• Can UPD II be disabled so only UPD I will be used???– Yes. Removing PCL5c from the REG_SZ value located at HKLM\SW\

Citrix\UniversalPrintDrivers>>>Driver List. By default PCL4,PCL5c,PS. CTX089874

• Can LPT port redirection be disabled but the client still autocreate printers???

– YES. LPT port redirection utilizes the CTXLPT1 or CTXLPT2 virtual channels but windows printing uses the CTXCPM channel.

• Can USB printers be autocreated???– YES. Although USB redirection is not supported the printer attached to

the USB port can be autocreated as long as the client OS returns the printer info as a printer port.

• Can the Universal Print Driver be used when printing directly to the print server???

– NO. The client side PCL4RAST.dll is required to accept the print job to then hand it off to the local client spooler.

• Can UPD II be disabled so only UPD I will be used???– Yes. Removing PCL5c from the REG_SZ value located at HKLM\SW\

Citrix\UniversalPrintDrivers>>>Driver List. By default PCL4,PCL5c,PS. CTX089874

•Questions???

Thank You!

Jim WestGlobal Escalation TeamCSEIT Event 2003

Jim WestGlobal Escalation TeamCSEIT Event 2003

top related