1

When using the native print dialog in chromium (installed via snap) in Ubuntu 21.04, I get problems: it takes a long time to render, makes me unable to choose a page range (until the rendering is complete), and seems not to be able to work if not installed with extra permissions (with snap install --devmode chromium) (apparmor disables the access to the ppd file as can be seen from journalctl).

How do I make it use the system print dialog? (Always, no matter how it is invoked: from shell or from the menu/icon.)

3
  • 1
    Does this answer your question? Chromium snap conversion: Command line options
    – David
    Commented Oct 17, 2021 at 5:21
  • @David In a sense,it does. But actually my initial problem was just "How can you make the system print dialogue default in chromium?" without knowing that there is a command-line option for this. Then I did some research and found the corresponding option.But I didn't know where to put it (for quite a long time); I didn't have the idea to search for something like "Where to put command-line options for chromium installed via snap".Then ultimately, I came across the cited Q&A, and finally had the problem solved. That Q&A is just the final piece of knowledge required to solve my initial problem. Commented Oct 17, 2021 at 14:45
  • @David I reformulated the question so that now that answer is just a part of the whole answer for the problem. Commented Oct 17, 2021 at 23:11

1 Answer 1

1

If you have problems with chromium's own print dialog (the "print-preview" one)--and I believe the recent snaps with chromium all have problems as described in the question--then you can simply switch to the system print dialog (with a button in the dialog or by invoking it with Ctrl-Shift-P instead of Ctrl-P).

Now we should think how to make this easier for the user of chromium: so that the user won't have to remember these tricks and so that the one won't be faced with the problematic print-preview dialog whenever one wants to print from chromium...

chromium has actually (like chrome) a command-line option that makes it use the system print dialog immediately instead of its own print-preview dialog. You should run it as:

chromium --disable-print-preview

But that's a one-time solution.

Now we should wonder how to conveniently always use this option whenever we start chromium (either from the menu/icon or from shell)... And after a while, I've found the answer:

To get this option always active for chromium installed via snap (for a user, i.e., yourself) you should put it into ~/.chromium-browser.init as described in http://askubuntu.com/a/1215010/19753 :

CHROMIUM_FLAGS="--disable-print-preview"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .