[7752] in testers

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

Athena 10 printer learnings

daemon@ATHENA.MIT.EDU (Alex T Prengel)
Mon Oct 20 17:31:57 2008

Message-Id: <200810202131.m9KLVBh8000609@outgoing.mit.edu>
To: athena10@MIT.EDU, testers@MIT.EDU
cc: alexp@MIT.EDU, broder@MIT.EDU
Date: Mon, 20 Oct 2008 17:31:10 -0400
From: Alex T Prengel <alexp@MIT.EDU>


I've learned the following so far about Athena 10 printing:

1. Some applications seem to use CUPS printing (Matlab, ooffice, gedit), while 
others don't (Xess, Splus).

2. For applications which don't, users don't see a printer pick list when they
print. The value of the $PRINTER environment variable is used to select the
printer to print to, the same way that Athena 9.4 printing works.

3. For applications that do use CUPS, you see a printer pick list of a large
set of cluster printers presumably configured by the Athena 10 release team.
Unless you do some additional local configuration, you can't print to any
printers that aren't currently preconfigured. The value of $PRINTER (usually)
has no effect.

4. To configure additional printers for CUPS printing, you need to sudo and
use system-config-printer to add a printer. You will see a choice of local
printers on the network; the only way I could be sure of which one I was
selecting was to go by printer IP address, which I had to look up, as printers
aren't listed by name. The default Device URI it sets up will be wrong. You 
need to replace it with one like this: lpd://mulch.mit.edu/leander  
(mulch.mit.edu name is the name of the print server which can be found from 
hesinfo <name> pcap (<name> is the printer name, which should also go last
on the lpd:... line). Note that this assumes printers known to our print
servers, which I understand are the only ones that are currently enabled.
I believe it's necessary to stop and restart the cups server for this to
take effect (/etc/init.d/cupsys stop followed by /etc/init.d/cupsys start).
After this you should see the printer configured added to the printer
pick list of applications that use CUPS. I saw no way to select a default
printer using system-config-printer but one can manually edit the 
/etc/cups/printers.conf file - you set the default printer by making the
stanza for it start with 

</Printer>
<DefaultPrinter ...

instead of

</Printer>
<Printer ...

as for the others. However only some applications (Matlab) will honor
this (by putting the default printer first on the printer pick list,
or preselecting it), others won't (ooffice, gedit). Note that this
printer list is per computer, not per user. This configuration needs to
be repeated if the user wants to configure additional printers.

5. A very limited set of applications will combine $PRINTER and CUPS methods
of printer selection, but so far I've only found one (monodevelop, in the 
mono_v2.0 locker I just set up). monodevelop offers the CUPS pick list but in
addition a printer "default PostScript" at location "lpr"- this will use
the printer defined by the $PRINTER setting.

6. Matlab has an additional complication. Apparently there is a known bug for 
Java applications that use CUPS printing that causes a Java exception:

java.lang.NullPointerException: null attribute....
....

unless a workaround is implemented. The workaround is to add a line:

Option orientation-requested 3

just before the end marker of each configured printer stanza
(</Printer>) in /etc/cups/printers.conf. I've verified the bug and
that the workaround works for a locally configured printer. I can't
apply the fix to the cluster printers since I can't access their
configuration; I also don't know the effect this will have on printing
from other applications. I believe the bug is in Java and not CUPS- it
seems present even in recent Java versions as late as 1.6.0_07. We
just received Matlab R2008b, I'll see if they've been able to fix this
is that version shortly.

I think the need to locally configure printers as above for
applications that use CUPS printing is likely to be a considerable
annoyance for many users. It would be really helpful if we could
figure out a way to create a "generic printer" selected by the
$PRINTER variable for all applications that use CUPS printing, the way
monodevelop seems to know how to do already.

                                             Alex
 






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