Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If you want to allow a local file to access a local file in google chrome you go to the terminal and run

$ google-chrome --allow-file-access-from-files 
share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

Navigate to the desktop launcher / menu entry, open the launcher properties dialog for google chrome.

It should look like this:

/usr/bin/google-chrome %U

To make the flags that you want permanent, modify it to something like:

/usr/bin/google-chrome --allow-access-from-files

You may also need to delete and re-pin your icon launchers after modifying it. Chrome should launch with the specified flags enabled after the modification.

Alternatively, you can simply create a new launcher with the above and use it to start chrome.

To check if the flags that you modified are being loaded:

$ cat ~/.config/google-chrome/Local\ State

and scroll up to the block entitled

"session_restore"

Your flags should be listed in the block, before

--flag-switches-begin --flag-switches-end.

Opening chrome and navigating to the URL

chrome://version/

should also list enabled flags in the

Command Line 

block

This is a list of the google-chrome / chromium flags:

http://peter.sh/experiments/chromium-command-line-switches/

share|improve this answer
1  
@Sam, you should remove How can I make that option always be turned on when ever google chrome is executed beyond running a .desktop every time part from your question as it will create confusion. –  Web-E Oct 15 '12 at 6:38
    
@Web-E Okay sounds good. –  Sam Mercier Nov 30 '12 at 2:21
add comment

The different modes like --allow-file-access-from-files are flags/switches and not meant for general users. So you can't change it permanently with regular builds. These purpose of switches/argument is to provide choice. These flags are neither supported not recommended and must be used as temporary.

Since you don't want to use .desktop file or changing any shortcut. The only thing you can do is to look into code of open source chorimium .

Customize the code and build it. Then only it will open with your desired mode.

List of switches | Source

share|improve this answer
    
That is what I feared. I'll just use the .desktop. –  Sam Mercier Jul 6 '12 at 22:49
add comment

Only for Chromium users

If you're running chromium-browser instead of google-chrome settings permanent command line switches is easier.

While editing .desktop files is nice, they have to be reapplied after automatic Google Chrome updates which is quite often. Also, you have to delete and re-pin your icon launchers every time.

For Chromium users permanent flags can be set in:

/etc/chromium-browser/default

e.g The following command adds two switches:

echo 'CHROMIUM_FLAGS="--cipher-suite-blacklist=0xc009,0xc007 --disable-ssl-false-start"' | sudo tee /etc/chromium-browser/default

I wish there were an analog solution for google-chrome but I haven't found one just yet.

PS: Since not too recently the Chromium browser in the default Ubuntu repos gets updated just as fast as the offical Google Chrome build.

share|improve this answer
add comment

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.