Auto Install for Mandrake Linux | ||
---|---|---|
Prev | Next |
This option provides you with the ability to install and configure none, one, or more printers. DrakX provides installation support for four basic printing systems: CUPS, LPRng, LPD and PDQ. The following is an attempt to distill the auto install stuff down to a simple presentation.
If all else fails, use the following form to indicate that there is no printer to be installed and then after the install is done, use the printerdrake program to add your printing system and printers.
To have No Printing System installed, simply ensure that the 'printer' option is not in the file, or:
'printer' => undef, |
However, for the more adventurous:
'printer' => { |
|
'DEFAULT' => 'HP990C', |
'SPOOLER' => 'cups', |
'BROWSEPOLLADDR' => undef, |
'BROWSEPOLLPORT' => undef, |
'MANUALCUPSCONFIG' => undef, |
|
'configured' => { |
|
'HP990C' => { |
|
'queuedata' => { |
|
'spooler' => 'cups', |
'foomatic' => 1, |
'printer' => 'HP-DeskJet_990C', |
'ppd' => undef, |
'queue' => 'HP990C', |
'driver' => 'hpijs', |
'connect' => 'smb://david:cherry@eastcott/cherry/HP-990C' |
'desc' => 'Color InkJet', |
'loc' => 'Cherry\'s Computer', |
'make' => 'HP', |
'model' => DeskJet 990C', |
'options' => [ |
'-o', |
'PageSize=Letter', |
'-o', |
'InputSlot=Default' |
'-o', |
'Duplex=DuplexNoTumble', |
|
... |
], |
}, |
} |
} |
}, |
|
BROWSEPOLLADDR, BROWSEPOLLPORT and MANUALCUPSCONFIG are not currently used. So you could remove them or, just not include them in your 'auto_inst.cfg' file. |
Descriptions:
'DEFAULT' |
this is set to the 'queue' name for the printer that you want as the default (generally referenced as lp). eg. 'DEFAULT' => 'HP990C', |
'SPOOLER' |
this is the printing systems that you want installed. It may be one of 'cups', 'lpd', 'lprng' or, 'pdq'. eg. 'SPOOLER' => 'cups'. |
'BROWSEPOLLADDR' |
not currently
supported. This is an IP address that CUPS will poll for
supported printers (see the file /etc/cups/cupsd.conf).
|
'BROWSEPOLLPORT' |
not currently
supported. This is the interface Port number to contact when
polling for supported printers (see the file
/etc/cups/cupsd.conf).
|
'MANUALCUPSCONFIG' |
not currently
supported. Set to 1 if you
are manually configuring the printing sub-system. Set to 0,
if CUPS is to automatically set up the configuration files each
time the CUPS service is started. eg. 'MANUALCUPSCONFIG'
=> 1,. The file |
|
CUPS_CONFIG=manual - when this option is set to 1 or, |
|
CUPS_CONFIG=automatic - when this option is set to 0 |
Each 'configured' printer definition begins with the name of the printer 'queue', and is followed by all the printer specific parameters ('queuedata') as follows:
'spooler' |
this is set to the same value used for 'SPOOLER'. eg. 'spooler' => 'cups', |
'foomatic' |
set to '1' if you want to select the printer using the foomatic printer ID. If you want to use a CUPS+PPD file instead, then set it to '0' and enter the 'ppd' information. eg. 'foomatic' => '1', |
'printer' |
required if you set 'foomatic' => 1,. This is set to the printer ID contained in the foomatic database You can determine the value to use with the command '/usr/bin/foomatic-configure -O -q | less' to locate your printer, then extract the string which is bounded by the xml tag <id>...</id>. eg. 'printer' => 'HP-DeskJet_990C', |
'ppd' |
required if you set 'foomatic' => '0',. This is set to the file name for the CUPS+PPD file associated with the printer. You can determine the filename by using the command '/usr/bin/poll_ppd_base -a | less' to locate the PPD definition for your printer. Each line contains a number of fields separated by a vertical bar (|). The first field contains the filename required for this entry. An alternate approach is to look in the directory /usr/share/cups/model, locate your model and desired ppd file. The value for 'ppd' would be the sub-directory and filename you want. Set it to 1 if the printer is to be installed without an initial PPD script. Set it to undef if you are not using a PPD file. eg. 'ppd' => 'xerox/xr_45171.ppd.gz', |
'queue' |
this is set to a string which represents the name of the printer that all printing utilities recognize as meaning 'this' printer. It MUST be set to the same value that is used for this printers definition. NOTE: the CUPS tools only allow the use of letter, number and the underscore characters. Strange, because the KUPS administration tool lets you add printer names with a hyphen too. eg. 'queue' => 'HP990C', |
'driver' |
this is the name of
the driver to be used for this printer. You can determine the
driver name by using the command : |
'connect' |
this defines how the printer is to be accessed (pick one of the following): |
|
file - the printer is accessed via a local parallel or usb port. General form is: |
|
file:<port device file name> |
|
eg. 'file:/dev/lp0', or 'file:/dev/usb/lp0', |
|
ipp - the printer is accessed via the internet printing protocol. General form is: |
|
ipp://<IP or FQDN>/printers/<printer name> |
|
eg. 'ipp://linux1.eastcott.net/printers/HP_820C', |
|
lpd - the printer is accessed via a remote lpd. If the spooling system selected is 'lpd', then the package rlpr must be installed. General form is: |
|
lpd://<IP or FQDN>/<queue name> |
|
eg. 'lpd://xerox.eastcott.net/PORT1', |
|
serial - the printer is accessed via a local serial port. General form is: |
|
serial:<serial port device file name>[?option[+option...]] |
|
baud=rate - Sets the baud rate for the device. |
|
bits=7 or 8 - Sets the number of data bits. |
|
parity=even - Sets even parity checking. |
|
parity=odd - Sets odd parity checking. |
|
parity=none - Turns parity checking off. |
|
flow=dtrdsr - Turns DTR/DSR (hardware) flow control on. |
|
flow=hard - Turns RTS/CTS (hardware) flow control on. |
|
flow=none - Turns flow control off. |
|
flow=rtscts - Turns RTS/CTS (hardware) flow control on. |
|
flow=soft - Turns XON/XOFF (software) flow control on. |
|
eg. 'serial:/dev/ttyS0?baud=9600+bits=8+parity=none', |
|
smb - the printer is accessed via the Microsoft SMB protocol. If this option is specified, then the package samba-clients must be installed. General form is one of the following: |
|
smb://workgroup/server/sharename |
|
smb://server/sharename |
|
smb://user:pass@workgroup/server/sharename |
|
smb://user:pass@server/sharename |
|
eg. 'smb://MY-COMPUTER/HP_990C', |
|
socket - the printer is accessed via the AppSocket protocol (a.k.a. JetDirect). If the printing system selected is 'lpd' or 'lprng', then the package nc must be installed. General form is: |
|
socket://<IP or FQDN>[:<port number>] |
|
eg. 'socket://hp.eastcott.net:9600', |
|
If a port number is not specified, it defaults to 9100 |
|
ncp - the printer is accessed via a Netware Host. If this option is used, then the package ncpfs must be installed. General form is: |
|
ncp:lpd://user:password@<server name>/<queue name> |
|
ncp:lpd://<server name>/<queue name> |
|
eg. 'ncp://MY_PRINT_SERVER/PRINTER1', |
|
postpipe - the file being printed is 'piped' through a user command, rather then being sent to a printer directly. General form is: |
|
postpipe:<command> |
|
eg. 'postpipe:cat > $HOME/rawfile', |
|
NOTE: If you have a machine running with CUPS, then you can look at the CUPS documentation at http://localhost:631/sam.html which has a ton of information. |
'desc' |
this is descriptive
text about the associated printer. |
'loc' |
this is usually text
which describes where the printer is physically located. |
'make' |
this is the manufacture's name for the printer. It is optional. |
'model' |
this is the manufacture's model designation for the printer. It is optional. |
'options' |
this is a series of parameters, which are concatenated together (space separated) and passed to the printer administration tool (foomatic-configure or lpoptions) when the printer queue is created. These options typically preset the default printer options. And are very dependent on the 'driver' selected. |
|
To figure out what to put here, there are two steps (note: foomatic-configure outputs a perl data structure because of the -P option in the steps below): |
|
First use: |
|
foomatic-configure -P -q -p 530428 -d gimp-print -s cups | grep "'name" | less |
|
to get a list of option names for the printer (530418) and driver (gimp-print) and spooler (cups) combination. |
|
Then use: |
|
foomatic-configure -P -q -p 530428 -d gimp-print -s cups | less |
|
and search for 'name' => '<option name you are looking to find values for>', just after it will be a structure beginning with 'vals_byname' which contains series of option values by name along with some information specific to each value. All you are interested in is the exact option value name(s). |
|
Finally you create the 'option' entries as follows: |
|
'-o', |
|
'<option name>=<option value>', |
|
and repeat for all options. |
NOTES:
There are a couple issues with the CUPS system that you may want to be aware of:
1. |
The default auto install leaves the CUPS system acquiring and reporting printer information automatically on your network. You might really want to modify the /etc/cups/cupsd.conf file and set the BrowseInterval to 0 and set Browsing to off so that your computer does not broadcast its printer definitions to the world. This propensity to tell everyone everything results in the various GUI tools presenting multiple instances of the printer definitions that can lead to confusion. Especially if the printer in question is a network based printer and you want to configure each computer to access the printer directly. |
2. |
There is a lurking
problem related to the CUPS ability to modify its configuration
file to suit the network environment every time the daemon is
restarted. If this is causing you concerns, you were wondering
why your changes were being ignored, or you simply do not want
this behavior, then make sure that the file
|
3. |
One final note. You normally do not have to set definitions for printers which are already defined on other computers running CUPS, as CUPS checks all other machines to see what printers they are exporting and will make them available to you. However, if they are exporting a printer which is actually on another computer or network and you print to it, then your print job actually goes to that computer first, then it goes to the printer. The downside is that if that computer is off, then you will not be able to use the printers it has defined. So use your discretion when defining printers |
Examples:
NO Printers:
'printer' => undef |
If you use this option, then you will probably have to install all the appropriate packages when you do set up your printers.
Multiple Printers:
'printer' => { |
'configured' => { |
'CK_HP990C' => { |
'queuedata' => { |
'printer' => 'HP-DeskJet_990C', |
'make' => 'HP', |
'foomatic' => 1, |
'options' => [ |
'-o', |
'PageSize=Letter', |
'-o', |
'PageRegion=Letter', |
'o', |
'PrintoutMode=Normal', |
'-o', |
'InputSlot=Default', |
'-o', |
'Duplex=DuplexNoTumble', |
'-o', |
'Quality=FromPrintoutMode', |
], |
'ppd' => undef, |
'spooler' => 'cups', |
'model' => 'DeskJet 990C', |
'desc' => 'Color InkJet', |
'loc' => 'Cherry\'s Office', |
'queue' => 'CK_HP990C', |
'connect' => 'smb://david:cherry@eastcott/cherry/HP-990C', |
'driver' => 'hpijs' |
} |
}, |
'CK_HP2200D' => { |
'queuedata' => { |
'printer' => undef, |
'make' => 'HP', |
'foomatic' => 0, |
'options' => [ |
'-o', |
'PageSize=Letter', |
'-o', |
'InputSlot=Middle', |
'-o', |
'Manualfeed=0', |
'-o', |
'Duplex=DuplexNoTumble', |
'-o', |
'Resolution=600x600x2dpi', |
'-o', |
'Smoothing=PrinterDefault', |
'-o', |
'HPEconoMode=PrinterDefault', |
'-o', |
'HPHalftone=PrinterDefault', |
'-o', |
'PageRegion=Letter', |
'-o', |
'HPOption_Duplexer=1', |
'-o', |
'HPOption_PaperPolicy=PromptUser', |
'-o', |
'HPOption_Tray3=0', |
'-o', |
'InstalledMemory=8MB' |
], |
'ppd' => 'HP-Postscript/HP_LaserJet_2200.ppd.gz', |
'spooler' => 'cups', |
'model' => 'LaserJet 2200', |
'desc' => 'Laser Jet', |
'loc' => 'Dave\'s Office', |
'queue' => 'CK_HP2200D', |
'connect' => 'lpd://scb65358/L1', |
'driver' => 'PPD' |
} |
} |
}, |
'BROWSEPOLLADDR' => undef, |
'MANUALCUPSCONFIG' => undef, |
'BROWSEPOLLPORT' => undef, |
'DEFAULT' => 'CK_HP2200D', |
'SPOOLER' => 'cups' |
}, |
Related Option Entries:
Prev | Home | Next |
postInstall and postInstallNonRooted | security |