Evolution Mail in 20.10 cannot print or save PDF from Mail

Hi,
I just upgraded from 20.04 to 20.10, and Evolution Mail no longer prints or saves PDF from the Mail component, although the Calendar and Contacts do. On trying to print to PDF, I get a message along the lines of: The printer replied “Error opening file “/home/myHome/Documents/20201101145220_ message.pdf”: No such file or directory. And trying to print to a printer which works in most other applications gets me: The printer replied “Printer not found”.
Looking around for answers, I got some clues that this may be some kind of Webkit problem. I tried installing and printing from Epiphany, a webkit-based browser and got similar problems. But I have no idea how to fix it, if so.
Thanks all!

1 Like

I have exactly the same problem

Had the same problem in Fedora 33, looks like a bug (closed, to be fixed upstream in WebKit):

For a workaround, run Evolution as this:
$ WEBKIT_FORCE_SANDBOX=0 evolution

Looking at the upstream bug report, it doesn't look like a lot has happened with it, so the workaround may be the only option for now:
https://bugs.webkit.org/show_bug.cgi?id=202363

Hope that helps,
Rob

1 Like

Indeed it did! One important thing, you have to make sure that there are no Evolution processes running when you do this, otherwise you get a warning message about not unregistering from D-Bus, and it won't run. I had to "killall evolution" several times before it was well and truly dead, then I was able to print to PDF and printer. erbremar, let us know whether this works. Looking forward to this being fixed.
Thanks!!!

1 Like

Ah! I wasn't aware of the problem if you tried this with evolution still running, good catch! :+1:

If you want to override the default settings so that WEBKIT_FORCE_SANDBOX=0 is set every time, you can try the following:

  1. Shut down all instances of evolution

  2. Copy the default desktop file to your profile
    cp /usr/share/applications/org.gnome.Evolution.desktop ~/.local/share/applications/

  3. If you grep the file, you will see there are a number of instances of exec:
    grep -i "exec" ~/.local/share/applications/org.gnome.Evolution.desktop

    Exec=evolution %U
    Exec=evolution -c current
    Exec=evolution mailto:
    Exec=evolution -c contacts
    Exec=evolution -c calendar
    Exec=evolution -c mail
    Exec=evolution -c memos
    Exec=evolution -c tasks

  4. Use sed to adjust the exec command to include WEBKIT_FORCE_SANDBOX=0:
    sed -i 's/Exec=evolution/Exec=env WEBKIT_FORCE_SANDBOX=0 evolution/g' ~/.local/share/applications/org.gnome.Evolution.desktop

  5. Grep again to check the updates have taken:
    grep -i "exec" ~/.local/share/applications/org.gnome.Evolution.desktop

    Exec=env WEBKIT_FORCE_SANDBOX=0 evolution %U
    Exec=env WEBKIT_FORCE_SANDBOX=0 evolution -c current
    Exec=env WEBKIT_FORCE_SANDBOX=0 evolution mailto:
    Exec=env WEBKIT_FORCE_SANDBOX=0 evolution -c contacts
    Exec=env WEBKIT_FORCE_SANDBOX=0 evolution -c calendar
    Exec=env WEBKIT_FORCE_SANDBOX=0 evolution -c mail
    Exec=env WEBKIT_FORCE_SANDBOX=0 evolution -c memos
    Exec=env WEBKIT_FORCE_SANDBOX=0 evolution -c tasks

When you run evolution it may ask to set itself as default, presumably because the system can tell the difference between the command with and without "env WEBKIT_FORCE_SANDBOX=0" added.
I opted to set the new default, but you can just ignore the message if you prefer.

Bear in mind I'm running Fedora, so your paths may or may not be different.

Thanks,
Rob

1 Like

Please make sure to open Bug Reports on launchpad for this for tracking and to make help ensure the Ubuntu maintainers are in the loop.