Score:1

How can you make the system print dialogue default in chromium?

au flag

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.)

David avatar
cn flag
Does this answer your question? [Chromium snap conversion: Command line options](https://askubuntu.com/questions/1214392/chromium-snap-conversion-command-line-options)
au flag
@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.
au flag
@David I reformulated the question so that now that answer is just a part of the whole answer for the problem.
Score:1
au flag

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"
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.