Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I select some text on page, displayed in the Chrome web-browser, and click with my right button, context menu opens. It has three options: "Copy", "Search %YOUR.SEARCH.ENGINE.NAME for '%SELECTED.TEXT%" and "Print..."; then is has separator and "Inspect Element".

My usual usage of popup menu on selected text is to use "Search %% for '%%'", but sometimes I miss the right menu item and clicks on "Print...". Then print preview opens (or OS print dialog if --disable-print-preview command-line option was added. I have no printer, and I need not to print one or two words, I just want

Is it possible to disable "Print..." item in the Google's version of Chrome?

If it is not possible, how can I find the code to display "Print..." in Chromium?

share|improve this question
up vote 3 down vote accepted

Printing can be disabled completely by setting:

"printing": {
   "enabled": false

to the Preferences file. Internally this sets kPrintingEnabled.

share|improve this answer
So, it is possible to do binary patch of compiled's function RenderViewContextMenu::AppendPluginItems / AppendPageItems / AppendPrintItem? I think the needed code path is only in AppendPrintItem – osgx Mar 15 '14 at 2:20
There is profile_->GetPrefs()->GetBoolean(prefs::kPrintingEnabled) code in AppendPrintItem. Is it possible to globally set kPrintingEnabled flag to false? How? – osgx Mar 15 '14 at 2:27
This way: Open the profile folder, find the JSON file Preferences, find "printing" field (browser->extensions->printing), then add , "enabled": false into it. Dan D, Thank you for digging into the code, the keys was found via query on "kPrintingEnabled" in src/chrome/common/ (Boolean controlling whether printing is enabled. const char kPrintingEnabled[] = "printing.enabled";), after checking the RenderViewContextMenu::AppendPrintItem function. Please update your answer with JSON edit method. – osgx Mar 15 '14 at 2:34
Ok, I cleaned up the question to the solution. The rest if need is in the revision history. – Dan D. Mar 15 '14 at 2:39
Yes, it is in the top section, my comment about "browser->extensions" was wrong. – osgx Mar 15 '14 at 2:43

You must log in to answer this question.

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