Setting Google Drive to open Google Docs files with Chrome on OS X

0

I would like to open locally synced Google Docs files (.gsheet, .gdoc, etc by double clicking in Finder on OS X, with Chrome, which is not my default browser.

While solutions have been suggested for Windows here, none of the solutions there worked for me on OS X. I guess the solution of @Annan (parsing out the URL, passing it on to Chrome) could be adapted for OS X / unix bash.

Some explanation why you want to do it

(from a Win solution)

Why not setting Google Chrome as default browser?

Many intranet application were designed for only one browser, to reduce the cost of testing, maintenance and to be compatible with enterprise settings.

[//] Also, when you are using google docs as the main "office" program, you need to be kept logged into your google account (in Chrome). You might not want all your browsing history directly logged by google, thus use another browser.

bud.dugong

Posted 2019-11-06T13:08:55.917

Reputation: 1

I could parse out the link as:

$(echo $godcs | perl -lne 'print $& if /http.+?."/')
URL=$(echo $1 | perl -lne 'print $& if /http.+?"/'); open -a "Google Chrome" ${URL%?}

But then 1. core needs to end up in a script, that take a file as an input. 2. ".gdocs" files have to be assigned to be opened with this script. – bud.dugong – 2020-01-15T18:25:40.417

No answers