James G. Sack (jim) wrote:
Ralph Shumaker wrote:
..
No, I don't have an authoritative answer, but it seems wrong to fix the
problem by removing those standard files -- which seem to come from the
libgnomeprintNN rpm (NN=22 for me, yours may be different).
I don't remember how to check but would be happy to if it will make a
difference. I don't know how I got that entry in my gnumeric printer
selection, but I don't want it to be the default. I NEVER use that
selection because I don't like it. IIRC, it always spits out an extra
blank page. Since I never use it, I don't see the point in having it. I
don't know if it has anything to do with the two files listed above.
Further, I don't know if these two files are needed. I suspect that
maybe they were installed when I installed fc4.
Nah, it doesn't really matter _where_ they came from, they're on every
(gnome) system, I guess. My thought is that if you delete them, the
programs like gnumeric may simply stop printing. But OTOH, removing the
one you don't want to be default _may_ force gnumeric to "find" another
default, so it may be worth a try. My thought is to move the files
somewhere rather than delete them -- but that's your call.
I just did this:
# cd /usr/share/libgnomeprint/2.10.3/
# mv ./models/GNOME-GENERIC-PS.xml ./models/.GNOME-GENERIC-PS.xml
# mv ./printers/GENERIC.xml ./printers/.GENERIC.xml
#
And now, gnumeric defaults to the *first* entry, namely, "Create PDF
document". So, it looks like I may be on the right track at least.
The files in question (among others):
# du -a
8 ./models/.GNOME-GENERIC-PS.xml
8 ./models/GNOME-PDF-WRITER.xml
8 ./models/uninstalled/GNOME-META.xml
16 ./models/uninstalled
40 ./models
188 ./globals.xml
12 ./printers/PDF-WRITER.xml
8 ./printers/.GENERIC.xml
8 ./printers/uninstalled/META.xml
16 ./printers/uninstalled
44 ./printers
280 .
# mv ./models/GNOME-PDF-WRITER.xml ./models/.GNOME-PDF-WRITER.xml
# mv ./printers/PDF-WRITER.xml ./printers/.PDF-WRITER.xml
But now bringing up the print dialog in gnumeric brings an instant crash.
# mv ./printers/.GENERIC.xml ./printers/GENERIC.xml
# mv ./printers/.PDF-WRITER.xml ./printers/PDF-WRITER.xml
gnumeric still crash when bringing the print dialog.
# mv ./printers/GENERIC.xml ./printers/.GENERIC.xml
# mv ./printers/PDF-WRITER.xml ./printers/.PDF-WRITER.xml
# mv ./models/.GNOME-PDF-WRITER.xml ./models/GNOME-PDF-WRITER.xml
No crash, but gnumeric defaults to "Create a PDF document".
# mv ./models/GNOME-PDF-WRITER.xml ./models/.GNOME-PDF-WRITER.xml
# mv ./models/.GNOME-GENERIC-PS.xml ./models/GNOME-GENERIC-PS.xml
No crash, but now it defaults to "Generic Postscript Printer". So just
pulling up the dialog, gnumeric doesn't seem to care about the
./printers/ directory contents. Now to test print:
# du -a
8 ./models/.GNOME-PDF-WRITER.xml
8 ./models/uninstalled/GNOME-META.xml
16 ./models/uninstalled
8 ./models/GNOME-GENERIC-PS.xml
40 ./models
188 ./globals.xml
8 ./printers/.GENERIC.xml
12 ./printers/.PDF-WRITER.xml
8 ./printers/uninstalled/META.xml
16 ./printers/uninstalled
44 ./printers
280 .
#
gnumeric printing is back to normal with just the presence of
./models/EITHER-OF-THE-TWO-FILES-LISTED-HERE.xml
I wonder if the names matter:
# mv ./models/.GNOME-PDF-WRITER.xml ./models/GNOME-APDF-WRITER.xml
Even though *not* hidden, the PDF entry did not show back up in gnumeric
in *any* form or name.
# mv ./models/GNOME-APDF-WRITER.xml ./models/GNOME-PDF-WRITER.xml
And now the first printer option (PDF) is back. So there goes /that/
idea. I was thinking that it may just have been as simple as creating
another file, one that specifies the settings and such of my default
printer and just adding it alphabetically before the GNOME-GENERIC-PS file.
STOP THE PRESSES!!!
I think I may have just discovered the problem with the output of the
"Generic PS" selection. Isn't A4 different than US Letter? It seems
that the generic is set to A4. Would that cause the printing of US
Letter to run off ever-so-slightly and cause a form feed of a seemingly
blank page?
Contents of /usr/share/libgnomeprint/2.10.3/printers/GENERIC.xml
# cat GENERIC.xml
<?xml version="1.0" encoding="UTF-8"?>
<Printer Version="1.0" Id="GENERIC">
<Name>Generic Postscript</Name>
[snip of unicode]
<Name xml:lang="es">PostScript genérico</Name>
[snip of more unicode]
<Model>GNOME-GENERIC-PS</Model>
<Settings Id="SETTINGS-000989541673031997000001">
<Name>Default</Name>
<Key Id="Engine">
<Key Value="gnome" Id="Backend"/>
</Key>
<Key Id="Output">
<Key Id="Media">
<Key Value="A4" Id="PhysicalSize"/>
</Key>
<Key Value="360x360" Id="Resolution"/>
</Key>
<Key Id="Transport">
<Key Value="lpr" Id="Backend"/>
</Key>
</Settings>
</Printer>
(Yuck, what just happened to the formatting of the text in my email?!?)
Could this "A4" be the source of much of my headache? But that is the
file that wasn't missed by the program's print dialog. The one that was
missed by the dialog has its default setting as "US Letter". (Man! The
fonts in this email have been cycling ever since I did that last paste.
This is rather disconcerting.) Here's the file that was missed by the
dialog:
# cat GNOME-GENERIC-PS.xml
<?xml version="1.0" encoding="UTF-8"?>
<Model Version="1.0" Id="GNOME-GENERIC-PS">
<Name>PS Writer</Name>
<Vendor>GNOME</Vendor>
<ModelVersion>0.0.1</ModelVersion>
<Options>
<Option Id="Engine">
<Option Type="List" Id="Backend" Default="gnome">
<Item Id="gnome">
<Name>GNOME</Name>
<Key Value="gnome-print-ps" Id="Driver">
<Key Value="2.0" Id="LanguageLevel"/>
</Key>
</Item>
</Option>
</Option>
<Option Id="Output">
<Option Id="Media">
<Option Type="List" Id="PhysicalSize" Default="USLetter">
<Fill Ref="Globals.Media.PhysicalSize"/>
</Option>
<Option Type="List" Id="PhysicalOrientation" Default="R0">
<Fill Ref="Globals.Media.PhysicalOrientation"/>
</Option>
<Key Id="Margins">
<Key Value="0" Id="Left"/>
<Key Value="0" Id="Right"/>
<Key Value="0" Id="Top"/>
<Key Value="0" Id="Bottom"/>
</Key>
</Option>
<Option Id="Job">
<Option Type="String" Id="NumCopies" Default="1"/>
<Option Type="String" Id="NonCollatedCopiesHW" Default="true"/>
<Option Type="String" Id="CollatedCopiesHW" Default="false"/>
<Option Type="String" Id="Collate" Default="false"/>
<Option Type="String" Id="Duplex" Default="true"/>
<Option Type="String" Id="Tumble" Default="false"/>
<Option Type="String" Id="PrintToFile" Default="false"/>
<Option Type="String" Id="FileName" Default="output.ps"/>
</Option>
</Option>
<Option Id="Transport">
<Option Type="List" Id="Backend" Default="lpr">
<Item Id="file">
<Name>File</Name>
<Key Value="libgnomeprint-file.so" Id="Module"/>
<Option Type="String" Id="FileName" Default="output.ps"/>
</Item>
<Item Id="lpr">
<Name>lpr</Name>
<Key Value="libgnomeprint-lpr.so" Id="Module"/>
<Option Type="String" Id="Printer" Default=""/>
</Item>
<Item Id="custom">
<Name>Custom</Name>
<Key Value="libgnomeprint-custom.so" Id="Module"/>
<Option Type="String" Id="Command" Default="lpr"/>
</Item>
</Option>
</Option>
<Option Id="Icon">
<Option Type="String" Id="Filename"
Default="gnome-mime-application-postscript"/>
</Option>
</Options>
</Model>
This file lists several defaults including "US Letter". But there's
another default in there for "lpr". Is that related to the lpd you
mention below? (I'm in over my head.)
(Whew! I just got rid of all the unicode. That was really messing with
the formatting of my non-formatted email.)
..
The only way I could change the default was to add a printer. I added
one, changed the default, but a fresh login and launch of gnumeric
showed the same old default (generic postscript printer). It showed the
new printer entry, but default was no different. In fact, it shows 4
printers, 2 of which don't exist, and 1 of which is basicly just a
duplicate of the actual printer. The four listed are:
Create a PDF document
Generic Postscript
TimeWaste
hp1100
And no matter what I do, gnome programs ALWAYS come up defaulting to the
second one.
Sounds like cups itself may be confused.
I have just deterrmined that in the
/etc/cups directory
the files
cupsd.conf
printers.conf
lpoptions
seem to be the important files controlling cups. The third may not be
quite as important?
Cupsd won't run without cupsd.conf, so that's prtobably ok, but I found
that if printers.conf is absent when cups starts, that gnumeric falls
back to showing 2 printers: create-pdf and generic-ps.
Perhaps there's something screwed-up in your printers.conf. Is there a
<DefaultPrinter ..>
stanza? Or, why don't you just post your /etc/cups/printers.conf file?
Other thoughts: you're not running the lpd daemon together with cups,
are you? What do you get from
ps -ef | grep cups\|lpd
I get:
..cups-config-daemon
..eggcups --sm-client-id default4
..cupsd
If you have multiple cupsd (or also have lpd), that might confuse
things. After any messing-around with the files you do have to do
service cups restart
(or perhaps just ..reload instead of ..restart is adequate)
.jim
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list