익명 17:46

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

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

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



Top Answer/Comment:

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"
상단 광고의 [X] 버튼을 누르면 내용이 보입니다