Comment 13 for bug 1809685

Revision history for this message
jbfoley (jbfoley1) wrote (last edit ):

Edit: I found the fix that worked for me previously. Credit to the original place I found it here: https://groups.google.com/g/linux.debian.bugs.dist/c/aKVjxvue8JY?pli=1

Basically, you have to add a line to /etc/apparmor.d/usr.bin.evince Under the section labeled "# 'Show Containing Folder' (LP: #1022962)"
Existing (as of 22.04):
  /usr/bin/nautilus Cx -> sanitized_helper, # Gnome
  /usr/bin/pcmanfm Cx -> sanitized_helper, # LXDE
  /usr/bin/krusader Cx -> sanitized_helper, # KDE
  /usr/bin/thunar Cx -> sanitized_helper, # XFCE

Add at the end of the list:
    /usr/lib/x86_64-linux-gnu/libproxy/0.4.17/pxgsettings Cx -> sanitized_helper, # Print Dialog

Then reboot or restart apparmor, and it works again. At least for me.

I'm posting it here because for whatever reason this solution is very hard to find.

Not sure I fully understand, but it kind of looks like Evince has decided to disown Unity and some other desktop environments? Or maybe just an oversight. Either way, this might not be the optimal way to fix this problem and I'm sure many like myself would appreciate it if the package maintainers would look into allowing pxgsettings to work again in the default install.

My original reply:

I'm also getting the issue where Evince freezes when I open the print dialog. I have two networked printers which work fine from any other program.

More background I can offer: I had this problem once before on this machine and I solved it by adding/changing some user permissions, but it came back after a do-release-upgrade to 22.04 and I can't seem to find the original instructions for the solution again. It was something like adding a particular user permission to a particular config file in apparmor. The first time I found the fix I was grasping at straws and found it in an odd way, maybe from a much older version of Ubuntu.

I'm using Ubuntu Unity 22.04 with Evince/Document Viewer 42.3 Here's my very similar relevant output from dmesg | tail showing apparmor denying something to evince:

[ 7408.546706] audit: type=1400 audit(1658690699.607:33): apparmor="DENIED" operation="exec" profile="/usr/bin/evince" name="/usr/lib/x86_64-linux-gnu/libproxy/0.4.17/pxgsettings" pid=10089 comm="sh" requested_mask="x" denied_mask="x" fsuid=1001 ouid=0
[ 7708.987550] audit: type=1400 audit(1658691000.048:34): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince" pid=10802 comm="apparmor_parser"
[ 7709.009396] audit: type=1400 audit(1658691000.072:35): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince//sanitized_helper" pid=10802 comm="apparmor_parser"
[ 7709.019154] audit: type=1400 audit(1658691000.080:36): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince-previewer" pid=10802 comm="apparmor_parser"
[ 7709.049178] audit: type=1400 audit(1658691000.112:37): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince-previewer//sanitized_helper" pid=10802 comm="apparmor_parser"
[ 7709.054590] audit: type=1400 audit(1658691000.116:38): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/bin/evince-thumbnailer" pid=10802 comm="apparmor_parser"
[ 7717.645697] audit: type=1400 audit(1658691008.708:39): apparmor="DENIED" operation="exec" profile="/usr/bin/evince" name="/usr/lib/x86_64-linux-gnu/libproxy/0.4.17/pxgsettings" pid=10910 comm="sh" requested_mask="x" denied_mask="x" fsuid=1001 ouid=0