How do I configure the Google Chrome / Chromium address bar to perform a search instead of trying to access a file on the local file system?

2

How do I configure the Google Chrome / Chromium address bar to perform a search instead of trying to access a file on the local file system? I would like to be able to enter a file name such as /etc/hosts or /Windows/System32/Drivers/etc/hosts in the address bar and to see Google search results for those file names similar to what I would see if I searched for the file names using something like https://www.google.com/#q=/etc/hosts

I am able to disable the file scheme using either of the following policy settings:

"DisabledSchemes": ["file"],

Which has been deprecated in favor of:

"URLBlacklist": ["file://"],

But in either case Google Chrome / Chromium continues to auto-detect that a file name was entered, automatically prepends the file scheme to the file name, and then reports that the webpage is blocked.

Monica For CEO

Posted 2014-05-31T02:45:07.460

Reputation: 131

Do you have an example of a filename that it does that for? I don't think what you're seeing is normal behavior. – Steve Campbell – 2015-03-06T22:14:24.160

Thanks for the comment! Knowing that the search was possible on some operating systems clued me in to using backslashes instead of forward slashes in the path. – Monica For CEO – 2015-03-09T16:41:02.923

Answers

1

Currently, a workaround is to use backslashes \ instead of forward slashes / in the path.

For example, in the address bar, instead of entering /etc/hosts or /Windows/System32/Drivers/etc/hosts search for \etc\hosts or \Windows\System32\Drivers\etc\hosts.

This works even when referring to file systems (such as those found on OS X and Linux) that use forward slashes instead of backslashes.

Monica For CEO

Posted 2014-05-31T02:45:07.460

Reputation: 131