Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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 Mar 6 at 22:14
    
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. –  Daniel Kauffman Mar 9 at 16:41

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.