kendling / pinot-search

Automatically exported from code.google.com/p/pinot-search
GNU General Public License v2.0
2 stars 0 forks source link

pdf file association #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. double click a pdf file in the pinot ui

What is the expected output? What do you see instead?
open evince is expected but gimp opens

What version of the product are you using? On what operating system?
pinot-0.98 and xapia-1.2.8 on ubuntu 11.04

Please provide any additional information below.

Hi, I'm new on pinot. I did try the unbuntu version 0.96 and now changed to the 
actual version. One thing is driving me nuts, when I try to open a pdf file, 
gimp starts up. I checked the FAQ, in nautilus pdf is associated with evince. 
All apps in my system opens pdf files with evince except pinot.
Where could be wrong pdf association, pinot uses?

Original issue reported on code.google.com by uwe.fr...@edor.eu on 1 Jan 2012 at 12:33

GoogleCodeExporter commented 8 years ago
Are you sure it's really a PDF and not an image (eg TIFF) ?
If Gimp shows you the actual file content as expected, then it's an image.
Nautilus etc... may rely on the file extension alone, while Pinot scans the 
file for its type.
Run "file FILENAME" and "xdg-mime query filetype FILENAME" on the command-line 
to double check the actual file type.

Original comment by fabrice....@gmail.com on 1 Jan 2012 at 12:37

GoogleCodeExporter commented 8 years ago

Original comment by fabrice....@gmail.com on 1 Jan 2012 at 12:38

GoogleCodeExporter commented 8 years ago
Yes, I'm sure :.)
Gimp starts up with the pdf import wizzard...

Original comment by uwe.fr...@edor.eu on 1 Jan 2012 at 12:42

GoogleCodeExporter commented 8 years ago
What do file and xdg-mime report ?

Original comment by fabrice....@gmail.com on 1 Jan 2012 at 12:46

GoogleCodeExporter commented 8 years ago
file 200.pdf 
200.pdf: PDF document, version 1.4

file 200.pdf --mime-type
200.pdf: application/pdf

xdg-mime query filetype 200.pdf 
application/pdf

xdg-mime query default application/pdf
userapp-evince-KXN3BV.desktop

Original comment by uwe.fr...@edor.eu on 1 Jan 2012 at 1:57

GoogleCodeExporter commented 8 years ago
OK. These look fine.
Find the file in your index using the Options, List Contents Of menu, right 
click and choose Properties. This will show what MIME type is recorded for this 
file. Report it here.

Original comment by fabrice....@gmail.com on 1 Jan 2012 at 3:17

GoogleCodeExporter commented 8 years ago
titel: 200.pdf
lang: german
mime-typ: application/pdf
size: 1933
words: 408

Original comment by uwe.fr...@edor.eu on 1 Jan 2012 at 3:25

GoogleCodeExporter commented 8 years ago
Did you compile pinot on your own ?
Could you reconfigure with "--enable-debug=yes", recompile and reinstall ?

Original comment by fabrice....@gmail.com on 1 Jan 2012 at 11:44

GoogleCodeExporter commented 8 years ago
Ok. I recompiled it with "--enable-debug=yes".

First thing, what attracted, is that the "PINOT_MAXIMUM_QUERY_RESULTS=100" is 
now working (issue 9).

Please advice me what to do now within the debug mode.

Original comment by uwe.fr...@edor.eu on 3 Jan 2012 at 12:23

GoogleCodeExporter commented 8 years ago
Try and open that PDF document again, then look into ~/.pinot/pinot.log for 
lines that start with "MIMEScanner::getDefaultActions".
For each open, there should be at least 2 lines that look like this:

MIMEScanner::getDefaultActions: searching for application/pdf
MIMEScanner::getDefaultActionsForType: default action XYZ

Original comment by fabrice....@gmail.com on 3 Jan 2012 at 8:13

GoogleCodeExporter commented 8 years ago
mainWindow::view_documents: file:///home/user/Desktop/out.pdf?
mainWindow::view_documents: file:///home/user/Desktop/out.pdf has type 
application/pdf
MIMEScanner::getDefaultActions: searching for application/pdf
MIMEScanner::getDefaultActionsForType: default action GIMP Bildbearbeitung
MIMEScanner::getDefaultActionsForType: non-URI default action evince
MIMEScanner::getDefaultActionsForType: action pdfedit
MIMEScanner::getDefaultActionsForType: action flpsed
MIMEScanner::getDefaultActionsForType: action Inkscape
MIMEScanner::getDefaultActionsForType: action gv
MIMEScanner::getDefaultActionsForType: action PDF Chain
ViewHistory::hasItem: URL file:///home/user/Desktop/out.pdf

Original comment by uwe.fr...@edor.eu on 3 Jan 2012 at 3:21

GoogleCodeExporter commented 8 years ago
Thanks.
Here Gimp is defined as the default app with support for remote URIs for type 
PDF.
Evince only supports local files.
I realize pinot could be smarter about this since the file is available 
locally. I'll fix the MIME app query logic.

Original comment by fabrice....@gmail.com on 4 Jan 2012 at 12:42

GoogleCodeExporter commented 8 years ago
Yes I found, if gimp is in the list "open with", then gimp will be used, even 
if it is't set as defult app. had the same with *.ps files.

Original comment by uwe.fr...@edor.eu on 5 Jan 2012 at 10:19

GoogleCodeExporter commented 8 years ago
This has been fixed in v1.0.

Original comment by fabrice....@gmail.com on 10 Jul 2012 at 10:45