43.11. Editing Printer Share Options

Once a printer share has been created, there are several options that you can set for it. Most of them relate to the commands that Samba will run to print a new job, list the queue, or cancel a job. By default, appropriate commands for the print system in use (explained in Section 43.15 “Configuring Printers”) will be used. However, there are times that you will want to specify additional parameters or even use a completely different command.

To edit printer options for a share, follow these instructions:

1.
On the module's main page, click on the name in the table of the printer share that you want to edit. On the form that appears, hit the Printer Options icon at the bottom of the page.

2.
To prevent clients from using up all the disk space in the printer's spool directory with large jobs, change the Minimum free space field. You must enter a number of kilobytes that will always be left free on the filesystem.

3.
To change the command that Samba will run to print a submitted file, edit the Print command field. The special codes %f (for the temporary file to print) and %p (for the printer name) can and should be used in the command, so you can enter something like lpr –P%p %f ; rm %f. Your command must always delete the temporary file (as the example does) because the server will not do this for you. All the usual shell meta-characters like ;, &, and > can be used, which allows you to enter quite complex series of commands. Whatever command you enter will always be run as the UNIX user connected to the printer share.

4.
To edit the command that Samba uses to list jobs waiting to be printed on some printer, select the second radio button in the Display queue command field and fill in its text box. Whatever you enter must produce output in the format generated by the standard BSD lpr command so that Samba can parse. If the special code %p appears in the command, it will be replaced with the name of the printer.

5.
Similarly, you can change the commands that Samba runs to delete, pause, and unpause a print job by editing the Delete job command, Pause job command, and Unresume job command fields, respectively. All can and should use the codes %p for the printer name, and %j for the job ID. For most print systems, there are no defaults for the pause and un-pause commands, as those features are not supported. Generally, you will not need to change these fields.

6.
As Section 43.5 “Adding a New Printer Share” explains, the Printer driver field can be used to enter the model of the attached printer (as recognized by Windows) so that clients can automatically select the right driver.

7.
When you are done with this page, hit the Save button to update the Samba configuration file and thus activate the new settings.

You can also edit these settings for all shares by clicking on the Printer Share Defaults icon on the module's main page and then on Printer Options. In fact, all of the command options make much more sense to edit globally as the same commands are likely to be needed for all printers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.237.122