[GH-ISSUE #2048] Evince can't open annotations #1386

Closed
opened 2026-05-05 08:01:20 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @schferbe on GitHub (Jul 19, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2048

I'm on ArchLinux trying to run evince on a PDF with annotations. However the annotations appear empty. When running firejail --noprofile evince everything works as expected. When saving a document when viewing it with the evince.profile existing annotations are lost.

Output when opening a PDF with one annotation:

$ evince example.pdf 
Reading profile /etc/firejail/evince.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 22380, child pid 22381
Private /etc installed in 2.70 ms
3 programs installed in 4.23 ms
Standard C library installed in 29.00 ms
Program libraries installed in 182.98 ms
GdkPixbuf installed in 4.34 ms
GTK3 installed in 27.24 ms
Pango installed in 0.00 ms
GIO installed in 3.59 ms
Installed 151 libraries and 5 directories
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Blacklist violations are logged to syslog
Child process initialized in 319.66 ms

(evince:169): EvinceDocument-CRITICAL **: 13:10:35.785: ev_annotation_markup_set_label: assertion 'label != NULL' failed

Versions:

$ firejail --version 
firejail version 0.9.54

Compile time support:
	- AppArmor support is disabled
	- AppImage support is enabled
	- bind support is enabled
	- chroot support is enabled
	- file and directory whitelisting support is enabled
	- file transfer support is enabled
	- networking support is enabled
	- overlayfs support is enabled
	- private-home support is enabled
	- seccomp-bpf support is enabled
	- user namespace support is enabled
	- X11 sandboxing support is enabled

$ /usr/bin/evince --version
GNOME Document Viewer 3.28.2
Originally created by @schferbe on GitHub (Jul 19, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/2048 I'm on ArchLinux trying to run evince on a PDF with annotations. However the annotations appear empty. When running `firejail --noprofile evince` everything works as expected. When saving a document when viewing it with the evince.profile existing annotations are lost. Output when opening a PDF with one annotation: ``` $ evince example.pdf Reading profile /etc/firejail/evince.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/whitelist-var-common.inc Parent pid 22380, child pid 22381 Private /etc installed in 2.70 ms 3 programs installed in 4.23 ms Standard C library installed in 29.00 ms Program libraries installed in 182.98 ms GdkPixbuf installed in 4.34 ms GTK3 installed in 27.24 ms Pango installed in 0.00 ms GIO installed in 3.59 ms Installed 151 libraries and 5 directories Warning: /sbin directory link was not blacklisted Warning: /usr/sbin directory link was not blacklisted Blacklist violations are logged to syslog Child process initialized in 319.66 ms (evince:169): EvinceDocument-CRITICAL **: 13:10:35.785: ev_annotation_markup_set_label: assertion 'label != NULL' failed ``` Versions: ``` $ firejail --version firejail version 0.9.54 Compile time support: - AppArmor support is disabled - AppImage support is enabled - bind support is enabled - chroot support is enabled - file and directory whitelisting support is enabled - file transfer support is enabled - networking support is enabled - overlayfs support is enabled - private-home support is enabled - seccomp-bpf support is enabled - user namespace support is enabled - X11 sandboxing support is enabled $ /usr/bin/evince --version GNOME Document Viewer 3.28.2 ```
Author
Owner

@SkewedZeppelin commented on GitHub (Jul 19, 2018):

If you comment private-lib in /etc/firejail/evince.profile will the annotation work again?

<!-- gh-comment-id:406398859 --> @SkewedZeppelin commented on GitHub (Jul 19, 2018): If you comment `private-lib` in `/etc/firejail/evince.profile` will the annotation work again?
Author
Owner

@schferbe commented on GitHub (Jul 20, 2018):

Changing

private-lib evince,gdk-pixbuf-2.0,gio,gvfs/libgvfscommon.so,libgconf-2.so.4,libpoppler-glib.so.8,librsvg-2.so.2

to

#private-lib evince,gdk-pixbuf-2.0,gio,gvfs/libgvfscommon.so,libgconf-2.so.4,libpoppler-glib.so.8,librsvg-2.so.2

in /etc/firejail/evince.profile indeed does the trick.

<!-- gh-comment-id:406657893 --> @schferbe commented on GitHub (Jul 20, 2018): Changing ``` private-lib evince,gdk-pixbuf-2.0,gio,gvfs/libgvfscommon.so,libgconf-2.so.4,libpoppler-glib.so.8,librsvg-2.so.2 ``` to ``` #private-lib evince,gdk-pixbuf-2.0,gio,gvfs/libgvfscommon.so,libgconf-2.so.4,libpoppler-glib.so.8,librsvg-2.so.2 ``` in `/etc/firejail/evince.profile` indeed does the trick.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 30, 2018):

This suggests some library is missing from the private-lib predicate. Does anyone know which libraries evince uses for reading annotations?

<!-- gh-comment-id:408883142 --> @chiraag-nataraj commented on GitHub (Jul 30, 2018): This suggests some library is missing from the `private-lib` predicate. Does anyone know which libraries `evince` uses for reading annotations?
Author
Owner

@chiraag-nataraj commented on GitHub (Sep 18, 2018):

@schferbe For now, you can also put ignore private-lib in /etc/firejail/evince.local so that upgrades won't rewrite your changes.

<!-- gh-comment-id:422214605 --> @chiraag-nataraj commented on GitHub (Sep 18, 2018): @schferbe For now, you can also put `ignore private-lib` in `/etc/firejail/evince.local` so that upgrades won't rewrite your changes.
Author
Owner

@chiraag-nataraj commented on GitHub (Oct 3, 2018):

Should be fixed. @schferbe, please re-open if the updated profile doesn't work for you.

<!-- gh-comment-id:426505730 --> @chiraag-nataraj commented on GitHub (Oct 3, 2018): Should be fixed. @schferbe, please re-open if the updated profile doesn't work for you.
Author
Owner

@reinerh commented on GitHub (Oct 3, 2018):

@chiraag-nataraj I reopen it, because your fix only fixes it for glibc-based x86_64 systems.
I don't think we should hardcode that in profiles (some distributions might even have different library paths).
Can you please try to solve it in a generic way?

<!-- gh-comment-id:426597696 --> @reinerh commented on GitHub (Oct 3, 2018): @chiraag-nataraj I reopen it, because your fix only fixes it for glibc-based x86_64 systems. I don't think we should hardcode that in profiles (some distributions might even have different library paths). Can you please try to solve it in a generic way?
Author
Owner

@chiraag-nataraj commented on GitHub (Oct 3, 2018):

@reinerh Welp. Lemme fix that (thanks for the catch...I basically only exclusively use x86_64 systems).

<!-- gh-comment-id:426616623 --> @chiraag-nataraj commented on GitHub (Oct 3, 2018): @reinerh Welp. Lemme fix that (thanks for the catch...I basically only exclusively use x86_64 systems).
Author
Owner

@chiraag-nataraj commented on GitHub (Oct 3, 2018):

Adding gconv to private-lib seems to fix things. If there are problems on platforms where gconv is not used, we will address those then, but I have no way of testing those at the moment.

<!-- gh-comment-id:426617197 --> @chiraag-nataraj commented on GitHub (Oct 3, 2018): Adding `gconv` to `private-lib` seems to fix things. If there are problems on platforms where `gconv` is not used, we will address those then, but I have no way of testing those at the moment.
Author
Owner

@reinerh commented on GitHub (Oct 3, 2018):

@chiraag-nataraj Thank you for fixing it! 👍

<!-- gh-comment-id:426617842 --> @reinerh commented on GitHub (Oct 3, 2018): @chiraag-nataraj Thank you for fixing it! :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1386
No description provided.