Can the iPrint "Set Printer as Default" dialogue be disabled?

  • 3569123
  • 22-Sep-2006
  • 25-May-2012

Environment

Novell iPrint

Situation

Can the iPrint "Set Printer as Default" dialogue be disabled?

Resolution

Yes, the "Set Printer as Default" check box option can be configured to be checked by default or hidden.

To change the behavior of the Set as Default setting on a NetWare 6.5 Support Pack 5 server, complete the following:

In the SYS:\Apache2\htdocs\ippdocs\scripts\iprint.js, add two sections of script lines:

Section 1:
a. Near the top of the file, look for this:

// ***************************************
// CONSTANTS
// ***************************************

b. After this section, copy and paste the information below into the file:

// Constants for the option type
DEF_TYPE_OPTION_NO = 0; // Check box is not checked by default
DEF_TYPE_OPTION_YES = 1; // Check box is checked by default
DEF_TYPE_OPTION_NONE = -1; // No check box is displayed

// Set this constant to change the default check box behavior
// (See "Constants for the option type" above.)

var defTypeGbl = DEF_TYPE_OPTION_NO;

Section 2:
a. Find these two lines in the js file:

LocalizeIsinstPage();

// 1. Check To see if iPrint Client is installed

b. Between those two lines, copy and paste the information below into the file:

var deflink = document.getElementById("setasdeflink");
var deftag = document.getElementById("setasdefaultatag");

switch(defTypeGbl)
{
case 0:
deflink.checked = false;
setAsDefaultGbl = false;
break;
case 1:
deflink.checked = true;
setAsDefaultGbl = true;
break;
default:
deflink.style.visibility ="hidden";
deftag.style.visibility ="hidden";
setAsDefaultGbl= false;
}

c. After adding these two sections of scripting lines, save the changes. Modify the text after "var defTypeGbl =" to one of the following:
DEF_TYPE_OPTION_NO = 0;
DEF_TYPE_OPTION_YES = 1;
DEF_TYPE_OPTION_NONE = -1;

For a description of what these options do, read the comments in the Section 1 script shown above.

To change the behavior of the Set as Default setting on a NetWare 6.5 Support Pack 4 server, complete the following:

1. Edit setdef.htm, located in one of the following directories:
NetWare Server: sys:\apache2\htdocs\ippdocs\
Linux Server: /var/opt/novell/iprint/htdocs/

2. Modify the var defTypeGbl = setting to one of the following:
DEF_TYPE_OPTION_YES
Displays the Set As Default check box. The check box is selected.

DEF_TYPE_OPTION_NO
Displays the Set As Default check box. The check box is not selected.

DEF_TYPE_OPTION_NONE
Hides the Set As Default check box. The check box is not selected.

3. Save the file.
Once the file is saved, the change is effective immediately.

Additional Information

When installing a printer on a Windows workstation from the iPrint Printer List Web Page, users can choose to set the printer they are installing as the default printer by selecting the Set Printer as Default check box on the Printer Is Not Installed dialog. This feature was introduced with OES SP1 for NetWare and Linux. When the check box is selected, the printer is installed and set as the default printer. When the check box is not selected, the printer is installed and no change is made to the default printer.

This feature has three settings:
- The Set Printer as Default check box is automatically selected.
- The Set Printer as Default is not selected.
- Hide the Set Printer as Default setting.

Formerly known as TID# 10098905