Case of PDF preview problem on Debian / Ubuntu / Mint / Elementary

Started by kredge, 05 April 2019 à 12:12:57

Previous topic - Next topic

kredge

On Debian, Ubuntu, Mint or Elementary systems, JustConsum may not be able to open PDF files directly (used in the software for editions either of the file list or of a detailed statement).
The software does not seem to be able to open the PDF document....
A first solution would be to first save the file to the hard disk, then open it outside of JustConsum: you would see the contents of the file displayed.

But the problem could simply be a blockage of the Linux system:
This can be "AppArmor" which prevents the "Evince" PDF reader from opening the file generated by JustConsum.

Here's how to fix this:

In "root" mode, first run the command: "apparmor_status".
You should get an answer like:

    root@brix:~# apparmor_status
    apparmor module is loaded.
    14 profiles are loaded.
    14 profiles are in enforce mode.
    /usr/bin/evince


Then check that the "apparmor-utils" tool is properly installed:
if in doubt, run the command, in "root" mode again, "apt-get install apparmor-utils".

Then run as root "aa-complain /usr/bin/evince".
You will get an answer like this:

    root@brix:~# aa-complain /usr/bin/evince
    Setting /usr/bin/bin/evince to complain mode.


To check if the "apparmor" protection has worked properly, run it again in "root" mode: "apparmor_status".
You should get an answer like:

    root@brix:/etc# apparmor_status
    apparmor module is loaded.
    14 profiles are loaded.
    11 profiles are in enforce mode.


This operation allows you to successfully launch the "Evince" viewer of the system from the JustConsum software.

For more information on unlocking "Evince":
https://askubuntu.com/questions/486150/evince-error-while-loading-shared-libraries-permission-denied
https://help.ubuntu.com/community/AppArmor