Bug 467723 - Okular part does not get activated when directly opening a PDF
Summary: Okular part does not get activated when directly opening a PDF
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-23 17:50 UTC by avlas
Modified: 2023-03-27 16:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description avlas 2023-03-23 17:50:18 UTC
SUMMARY

When opening a PDF file directly in Konqueror such as https://www.aei.gob.es/sites/default/files/page/field_file/2023-03/Calendario-AEI-22-03-B.pdf, okular part is not triggered. Instead a pop-up asks to open the PDF externally in Okular, but this represents a problem sometimes as in this case as the following error appears (translated from a different language):

It was not possible to open https://www.aei.gob.es/sites/default/files/page/field_file/2023-03/Calendario-AEI-22-03-B.pdf. Reason: It was not possible to connet with www.aei.gob.es: SSL negotiation has failed.

STEPS TO REPRODUCE

Visit https://www.aei.gob.es/sites/default/files/page/field_file/2023-03/Calendario-AEI-22-03-B.pdf

OBSERVED RESULT

1. Pop-up emerges (not possible to view the file internally with Okular part)
2. Okular triggers the SSL error

EXPECTED RESULT

Preview the PDF file in Konqueror

ADDITIONAL INFORMATION

As a workaround, it is possible to preview the PDF file through WebEngine if enabled in settings, but I'd very much prefer to use Okular part, if that could be possible.
Comment 1 Stefano Crocco 2023-03-23 18:11:32 UTC
I can't reproduce your issue. Is this the only PDF which Konqueror doesn't open by itself? If not, it is possible that you configured Konqueror so that PDFs files are opened externally (actually, this is the default behavior). To check whether this is the case, open the "File Association" tab of Konqueror settings dialog and, in the list of known types, choose "application" and, from within it, "pdf". On the right side of the page, choose the "Embedding" tab and make sure that the entry "show the file in embedded viewer" is selected.
Comment 2 avlas 2023-03-23 18:24:27 UTC
(In reply to Stefano Crocco from comment #1)
> I can't reproduce your issue. Is this the only PDF which Konqueror doesn't
> open by itself? If not, it is possible that you configured Konqueror so that
> PDFs files are opened externally (actually, this is the default behavior).
> To check whether this is the case, open the "File Association" tab of
> Konqueror settings dialog and, in the list of known types, choose
> "application" and, from within it, "pdf". On the right side of the page,
> choose the "Embedding" tab and make sure that the entry "show the file in
> embedded viewer" is selected.

Thanks for letting me know about this option!

However, the SSL error I talked about is still triggered, this time inside Konqueror. The WebEngine PDF viewer worked fine. Could you reproduce this error? You didn't mention so I guess not. I wonder why I get that problem... Any clue?
Comment 3 Stefano Crocco 2023-03-23 18:37:09 UTC
(In reply to avlas from comment #2)
> However, the SSL error I talked about is still triggered, this time inside
> Konqueror. The WebEngine PDF viewer worked fine. Could you reproduce this
> error? You didn't mention so I guess not. I wonder why I get that problem...
> Any clue?

I got a dialog saying that there was an SSL error: "The server failed the authenticity check (www.aei.gob.es).", but the dialog allowed me to choose whether to go on despite the error or not. Choosing to ignore the error allowed the Okular part to correctly open the file. Did you see such a dialog? If not, maybe you saw it in the past and checked the option not to show it again. Unfortunately, I'm not aware of a way to re-enable it using a GUI. You can do that editing a configuration file in ~/.config but I don't know which one (all of this is not part of Konqueror, so I'm not familiar with how it works).
Comment 4 avlas 2023-03-23 18:48:03 UTC
(In reply to Stefano Crocco from comment #3)
> (In reply to avlas from comment #2)
> > However, the SSL error I talked about is still triggered, this time inside
> > Konqueror. The WebEngine PDF viewer worked fine. Could you reproduce this
> > error? You didn't mention so I guess not. I wonder why I get that problem...
> > Any clue?
> 
> I got a dialog saying that there was an SSL error: "The server failed the
> authenticity check (www.aei.gob.es).", but the dialog allowed me to choose
> whether to go on despite the error or not. Choosing to ignore the error
> allowed the Okular part to correctly open the file. Did you see such a
> dialog? If not, maybe you saw it in the past and checked the option not to
> show it again. Unfortunately, I'm not aware of a way to re-enable it using a
> GUI. You can do that editing a configuration file in ~/.config but I don't
> know which one (all of this is not part of Konqueror, so I'm not familiar
> with how it works).

Unfortunately, I don't have the option to ignore the error, but thanks for the information, I will see if I find a solution for this.

I close the original issue now as Resolved Worksforme, because the original request is already implemented, thank you!
Comment 5 avlas 2023-03-27 16:59:41 UTC
(In reply to avlas from comment #4)
> (In reply to Stefano Crocco from comment #3)
> > (In reply to avlas from comment #2)
> > > However, the SSL error I talked about is still triggered, this time inside
> > > Konqueror. The WebEngine PDF viewer worked fine. Could you reproduce this
> > > error? You didn't mention so I guess not. I wonder why I get that problem...
> > > Any clue?
> > 
> > I got a dialog saying that there was an SSL error: "The server failed the
> > authenticity check (www.aei.gob.es).", but the dialog allowed me to choose
> > whether to go on despite the error or not. Choosing to ignore the error
> > allowed the Okular part to correctly open the file. Did you see such a
> > dialog? If not, maybe you saw it in the past and checked the option not to
> > show it again. Unfortunately, I'm not aware of a way to re-enable it using a
> > GUI. You can do that editing a configuration file in ~/.config but I don't
> > know which one (all of this is not part of Konqueror, so I'm not familiar
> > with how it works).
> 
> Unfortunately, I don't have the option to ignore the error, but thanks for
> the information, I will see if I find a solution for this.
> 
> I close the original issue now as Resolved Worksforme, because the original
> request is already implemented, thank you!

I figured out that this has nothing to do with Konqueror/Okular but it is related to openssl. For a workaround see: https://stackoverflow.com/questions/71603314/ssl-error-unsafe-legacy-renegotiation-disabled. After adding Options = UnsafeLegacyRenegotiation to the [system_default_sect] section in /etc/ssl/openssl.cnf, Konqueror displays a pop-up asking whether to contniue or not. For security reasons it's NOT recommended to continue, however SSL servers from some governments still use unsecure protocols :-/