Summary: | kdeprint:default preview program not found | ||
---|---|---|---|
Product: | [Unmaintained] kdeprint | Reporter: | Toralf Förster <toralf.foerster> |
Component: | general | Assignee: | KDEPrint Devel Mailinglist <kde-print-devel> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | initial.dann |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
ps file association
ps file association emb kdeprint config error msg error msg german fix wrong service returned |
Description
Toralf Förster
2006-11-15 21:01:06 UTC
kdeprint uses by default the program that is registered to view (embedded) postscript files. Check your file association to see which application is registered. Before I specified the external program kpdf, the help text of that appripriate kdeprint window stated out that the internal program (kghostview) is used. I'm wondering why the error msg than said 'kuick not found', b/c I didn't configured kuick. Could you still check your KDE file association for postscript file, and also maybe report a screenshot of the error dialog you got when kpdf was not specified as print previewer? Created attachment 18580 [details]
ps file association
Created attachment 18581 [details]
ps file association emb
Created attachment 18582 [details]
kdeprint config
Created attachment 18583 [details]
error msg
These screenshots does not mention "kuick"... Created attachment 18584 [details]
error msg german
Right, "kuick" seems to be appear only for German environment, but the english
message seems to be mysterious too, isn't it ?
BTW, in the config screenshot there's now the greyed out string "kpdf".
Immediately after the installation I read there "gv".
"Kuick - Kopieren und Verschieben" is a description string corresponsing to some installed (KDE) program (but I don't know which one). Normally, as you don't have any PS viewer registered, what you should get is a dialog telling there's no viewer associated with PS. But this does not work for you. I wonder to which program "Kuick - ..." or "Compress/Extract" description strings are associated. I'm not running Linux, so I cannot help much further (I hope Cristian will). What you can do is trying to find to which services the strings above are associated. What could also help is to see what is the actual type of the file kdeprint is trying to preview. To do this, you can look for a file named kdeprint_XXXXXX (XXXXXX being a random string) in the KDE temporary directory (usually ~/.kde/tmp or similar) when the error dialog is active. This temp file should stay there as long as the dialog is shown. Once you found that file, check its content (for instance with "file"). If the KDE you compile is from Gentoo packages, one should look at the sources of these packages and see what patches are applied to them, compared to the official KDE sources. As Michael explains, KDEPrint uses the standard KDE selection mechanisms for the ps viewer. If these mechanisms are misconfigured in Gentoo (e.g. .desktop files missing, .desktop files misinstalled, autodetection of "supported" non-kde programs disabled), then you can end up with an empty ps-viewing association list and eventually end up with such a non-functional/weird behavior. Please, if you care, check the patching of the gentoo KDE packages. These problems that you report, didn't seem to appear in other distros. Thanks ok, the temp file is PS: tfoerste@n22 ~ $ head /tmp/kde-tfoerste/kdeprint_lBCQHlaL %!PS-Adobe-1.0 %%BoundingBox: 0 0 595 841 %%Creator: Qt 3.3.6 %%Title: model.xml %%CreationDate: Thu Nov 16 16:58:33 2006 %%Orientation: Portrait %%Pages: 10 %%DocumentFonts: ArialMT CourierNewPSMT CourierNewPS-BoldMT %%EndComments I'll propably open a bug at bugs.gentoo.org OK, so it's really postscript, and it's probably detected as such by KDE. There's really a problem in your configuration related to the services/application and the file association. With a correct configuration, you should get another error message as I stated in comment #10. At this point, it's difficult to help you without tracking the code line by line. Something that might help is trying to find to which services "Kuick - ..." or "Compress/Extract" corresponds. You can do it by scanning the .desktop file from your KDE installation directory: find /where/kde/is/installed -name "*.desktop" | xargs grep Kuick or find /where/kde/is/installed -name "*.desktop" | xargs grep "Compress/Extract" yes, as I stated out in https://bugs.gentoo.org/show_bug.cgi?id=155365 I found the string kuick here : tfoerste@n22 /usr/kde/3.5/share $ grep -Hir kuick * ... applnk/.hidden/kuickplugin.desktop:Name[de]=Kuick - Kopieren und Verschieben This seems to be a service that is able to handle any mimetype, but it is not, as such, a viewer. Maybe the problem is in kdeprint in the end. It's been a long time since I programmed KDE, but Cristian, could you check whether it's normal that KServiceTypeProfile::preferredService() (kdelibs/kdeprint/kprintpreview.cpp) returns a non-Application entry, while it shouldn't? (info extracted from API doc, so I might be wrong) Note that code has changed in CVS (future 4.0 release), so the problem might have disappeared already. BTW, I defined now KPDF within the control center as default viewer for postscript and now I didn't have the problem with the previewer. But the question, why there wasn't a default before. Because KPDF didn't register itself as postscript viewer. Usually, it's kghostview. Well, Michael, regarding your comment #15, I'm not sure how to interpret the code around line 285 in kprintpreview.cpp, but that call, KServiceTypeProfile::preferredService() was introduced with a QString::null as second argument since the beginning (SVN revision 137056: http://websvn.kde.org/trunk/kdelibs/kdeprint/kprintpreview.cpp?rev=137056&r1=136981&r2=137056) So, if only applications should be selected by this call, we should have "Application" instead of QString::null there. I didn't have time to investigate KServiceType, but I think there should be "Application" instead QString::null. And still, I think this could be rather a Gentoo issue than a KDEPrint issue, but we would eventually need a safeguard. How come nobody experienced such problems until now? From the documentation, using QString::null is equivalent to "Application". So switching to "Application" shouldn't make any difference. But it's difficult to say where the problem is without debugging. Moreover I see in SVN that the code has changed and that kuick_plugin .desktop has disappeared. Maybe this kind of problem never popped up because everybody had kghostview installed? One test case could be to remove all .ps file association (embedded and non-embedded) and see what happens. I still have no running Linux box available so I can't really help, sorry. Created attachment 18636 [details]
fix wrong service returned
Would you have a means to please test this patch and see if it corrects the
problem? (with this, kdeprint should at least announce you that you don't have
a known ps viewer installed).
Thanks
For now I don't have source code or a machine to compile on, but hopefully before the end of January I can test this patch. Toralf, Gentoo users usually are faster with testing patches :-P Have you had a chance to do so yet? (It's only 1 word in 1 line that changes) The patch doesn't change anything. After uninstalling KGhostview, it is Karbon providing application/postscript via its kpart and import desktop entries on my box. kdeprint: kdeprint: querying trader for 'application/postscript' service kio (KTrader): KServiceTypeProfile::offers serviceType=application/postscript genericServiceType=KParts/ReadOnlyPart kio (KTrader): query for application/postscript, KParts/ReadOnlyPart : returning 2 offers kio (KTrader): query for Karbon/CoreModule : returning 3 offers kdeprint: kdeprint: creating preview dialog koffice (lib kofficecore): creating KoBrowserExtension kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action. koffice (lib kofficecore): KoDocument::openURL url=file:///home/carsten/.kde3.5/tmp-iglu/kpdfquHPfc.ps koffice (lib kofficecore): karbonpart.desktop found. koffice (lib kofficecore): KoDocument::openFile /home/carsten/.kde3.5/tmp-iglu/kpdfquHPfc.ps type:application/postscript kio (KTrader): query for KOfficePart : returning 18 offers koffice (filter manager): KoFilterEntry::query( ) kio (KTrader): query for KOfficeFilter : returning 90 offers koffice (filter manager): Filter: KOffice XSLT-Exportfilter doesn't apply. parsing started size is 4 parsing finished command to execute is (gs -q -P- -dBATCH -dNOPAUSE -dSAFER -dPARANOIDSAFER -dNODISPLAY ps2ai.ps '/home/carsten/.kde3.5/tmp-iglu/kpdfzkw9na.ps' | sed -e "s/%%BoundingBox: 0 0 612 792/%%BoundingBox: 0 0 595 842/g" > '/home/carsten/.kde3.5/tmp-iglu/kpdfpqP7Ja.tmp') unknown operator: Adobe_packedarray pushing Adobe_packedarray to stack unknown operator: Adobe_cmykcolor pushing Adobe_cmykcolor to stack unknown operator: Adobe_cshow pushing Adobe_cshow to stack unknown operator: Adobe_customcolor pushing Adobe_customcolor to stack unknown operator: Adobe_typography_AI3 pushing Adobe_typography_AI3 to stack unknown operator: Adobe_IllustratorA_AI3 pushing Adobe_IllustratorA_AI3 to stack unknown operator: To pushing To to stack unknown operator: Tp pushing Tp to stack unknown operator: TP pushing TP to stack unknown operator: Tr pushing Tr to stack state integer / start char H (72) parsing aborted kparts: Part::~Part 0x83f7fb0 kparts: deleting widget [QWidget pointer (0x83f8918) to widget gvpart, geometry=833x1+0+328] gvpart I was greeted with the message dialog Öffnen dieser Datei nicht möglich /home/carsten/.kde3.5/tmp-iglu/kpdfGnEX4a.ps. Ursache: Erstellungsfehler (in english: Can't open file - /... - reason: creation error) and afterwards the expected print preview dialog showed up, but in complete gray and only with the close button visible. You ask for a service, so you get one - well, sort of. User defined previewer -> hardcoded KGhostview -> error message would be a possible fix, ignoring any associated application. I had exactly the problem of #23, and I'm also using Gentoo's kde-3.5.4, with a kde config dir that's been around a bit. Thanks to the hints above, I've fixed it, for me, simply by changing the order of embedded viewers in the konqueror configuration -- 'karbonpart' was initially above kghostview, perhaps due to a gentoo oversight or some earlier change that I've made. So, for others to try: konqueror -> settings -> configure konqueror -> file associations -> application -> postscript , then the "Embedding" tab, and make sure that KGhostView is at the top. Finally, after months of putting it off, this is fixed. I've tried it from a new user's account, and THE PROBLEM WASN'T THERE. I must have made some change in the past that assisted the problem. It seems to be only gentoo people who've had it, but perhaps that was chance? I use KDE 4.1.3 and Okular to view pdfs and ps files. I get the exact same error message! I recently fixed it; to do so, go to the Print dialog, choose the System Options button, go to the Preview icon on the left side, check mark the "Use External Program" and search for okular (/usr/bin/okular) or whatever program you use to view ps files. You guys helped a bunch, this was really frustrating me. Cheers. :) |