[13906] in Athena Bugs

home help back first fref pref prev next nref lref last post

frame locker is hosed

daemon@ATHENA.MIT.EDU (Marc Horowitz)
Sun Oct 8 20:55:36 1995

To: swmaint@MIT.EDU, bugs@MIT.EDU, dot@MIT.EDU, cfyi@MIT.EDU
Date: Sun, 08 Oct 1995 20:55:13 EDT
From: Marc Horowitz <marc@MIT.EDU>

Most of the utility programs in the frame locker are failing to run on
any platform because of this part of
/mit/frame_v4.0/arch/share/bin/maker:

(cfyi: skip to the end for a workaround for users if you don't care
about the details.)

sub handle_resources

{
    local ($default_printer, $host, $printer_set);

    if (defined ($ENV{"DISPLAY"})) {
	# Monochrome displays
	if (grep (/-DPLANES=1/, `xrdb -symbols`)) {
	    push (@arglist, "-xrm", "Maker.textStippleFilled: False");
	}

	# Maker.printerName resource for print dialog box
	$printer_set = grep (/Maker[\.\*]printerName/, `xrdb -q`) ||
	    grep (/printerName/, @arglist);
	if ( $printer_set == 0 ) {
	    $default_printer = $ENV{'PRINTER'};
	    if ( length ($default_printer) == 0 ){ 
		chop ($host = `hostname`);
		open (CLUSTER, "hesinfo $host cluster |");
		while (<CLUSTER>) {
		    next unless /lpr/;
		    ($default_printer = $_) =~ s/(^lpr )([a-z]*)/$2/;
		    chop ($default_printer);
		}
		close CLUSTER;
		# Give them something so that print to file works.
		if (length ($default_printer) == 0) {
		    $default_printer = "python";
		}
	    }			# 
	    push (@arglist, "-xrm", "Maker.printerName: $default_printer");
	}			

    }
}

This routine is called for *every* program.  This routine's purpose is
to cause certain host-specific configuration to be passed via -xrm
arguments to programs which use X.  Unfortunately, -xrm is an invalid
argument for programs which don't use X, most notably the conversion
programs.



Workaround:

I'm not sure what the right solution is, but this isn't it.  Until the
right solution is found, a workaround is to run

	(unsetenv DISPLAY ; progname arg1 arg2 ...)

This fools the script into believing that an X display isn't present,
so X resources will be meaningless.

		Marc

home help back first fref pref prev next nref lref last post