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.

I know how to disable WebGL in Chrome by adding the command in the shortcut target box.

However if I open a hyperlink and no instance of Chrome is already open via this shortcut, WebGL will be enabled.

Is it possible to disable WebGL no matter how Chrome is opened?

I'm using Chrome 13.0.782.215 on Windows 7 64-bit.

share|improve this question
3  
Did you guys actually drink the anti-WebGL propaganda? Can you even point to one single open WebGL exploitable vulnerability that you know of? (Hint --- you can't. Neither can the people who spread FUD about WebGL). /a WebGL implementer (not in Chrome though) –  user96078 Aug 30 '11 at 19:23
    

6 Answers 6

up vote 2 down vote accepted
+50

Unfortunately, the Chromium devs are slow (and apparently loathe) to handle command-line parameters when setting it as the default web browser.

Until they get around to doing it (if ever), you’ll need to set any arguments yourself for each and every registry entry (and shortcut) each time your command-line needs change.

This can become quite cumbersome since there are several registry locations in which the executable is stored, and thus would need to be updated (no less than a dozen default locations). I’ve come up with a pretty handy workaround that makes it much easier to update and maintain.

share|improve this answer
    
Hmm, I don’t know how that happened. It’s fixed now. –  Synetech Aug 22 '11 at 5:47
    
I don't know why they don't allow you to disable it in Flags. I wonder if "GPU Accelerated Canvas 2D" in About:Flags is the same as webgl? –  Moab Aug 23 '11 at 18:20
    
about:flags is (as the warning/disclaimer at the top says) experimental and temporary. WebGL used to be in the Flags page, but that was when WebGL was disabled by default and power-users could use the page to specifically enable it. GPU Accelerated Canvas 2D is not WebGL, it allows graphics processing to be offloaded to certain GPUs. WebGL is a language specification/library that can use GPU-accelerated-graphics if available—think DirectX <-> FPU. Also, versions that have that flags option also have the --disable-webgl parameter (if they were the same, there would only be one of them). –  Synetech Aug 24 '11 at 0:18
    
Thanks for the clarification Synetech inc. –  Moab Aug 24 '11 at 0:42

One slightly hackish way of doing this would be to create a chrome.bat somewhere in your %PATH%. In it you have [drive]:\Path\To\chrome.exe --disable-webgl %1.

Then change the default link handler to use your chrome.bat instead of Chrome.

share|improve this answer
    
I was wanting a global solution, where it will work no matter how chrome is opened. –  Moab Aug 18 '11 at 14:49

I will describe how to add an invocation parameter for Firefox, which I use, and you can adapt the procedure to Chrome. This involves editing the registry, so take first all due precautions, including creating a system restore point.

Open regedit, and search forHKEY_CLASSES_ROOT\.htm and HKEY_CLASSES_ROOT\.html. Click on both, and you will see a (Default) entry, which for Firefox contains the value FirefoxHTML.

Now position yourself on HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command. The (Default) entry contains the Firefox command invocation. Modify it to include the additional parameter (-disable-webgl in your case).

This should have instant effect, but you might possibly need to logout and login.

EDIT

Other registry keys to verify that they use the same handler (FirefoxHTML) are:

HKEY_CLASSES_ROOT\.shtml
HKEY_CLASSES_ROOT\.xht
HKEY_CLASSES_ROOT\.xhtm
HKEY_CLASSES_ROOT\.xhtml
HKEY_CLASSES_ROOT\HTTP\shell\open\command
HKEY_CLASSES_ROOT\https\shell\open\command
HKEY_CLASSES_ROOT\ftp\shell\open\command

share|improve this answer
    
Does this look like a correct mod?..chrome.exe" -- "%1" --disable-webgl –  Moab Aug 18 '11 at 14:53
    
Being careful, I would make it more like "chrome.exe" --disable-webgl -- "%1" –  harrymc Aug 18 '11 at 15:19
    
thanks, what does the %1 do? –  Moab Aug 18 '11 at 15:21
    
Indicates the 1st argument. In this case when Windows uses this command it will pass the URL as an argument to the command. –  arunkumar Aug 18 '11 at 18:03
    
Thanks arunkumar, I was hoping Harrymc would answer, but maybe he only answers for bounty points. –  Moab Aug 19 '11 at 14:00

Create an exe in you favorite language called chrome.exe, rename the original chrome to something else e.g. foo.exe. In your exe start foo.exe with the required parameters.

You now only have to place your newly created file in the chrome folder, effectively replacing what would have been the original. This way it will never open without your parameters set.

I am not sure how this works with the automatic updates though.

share|improve this answer
    
"Create an exe in you favorite language called chrome.exe" needs some explaining. –  Moab Aug 24 '11 at 0:44

If you don't get a good answer for this (and it's looking like you won't, even if one gets automatically accepted for the bounty), you would be well within your rights to file a bug report against Chromium - after all, it's a security issue. In my opinion, if they really care about security, WebGL should be disabled by default for all users. There should at least be a way to disable it from the chrome://settings page.

share|improve this answer
    
Not really a bug, but a missing feature. –  Moab Aug 24 '11 at 0:45

To disable WebGL, visit

chrome://flags/

in your browser. One of the settings is confusingly named "Disable WebGL", which you have to Enable to Disable WebGL (go figure).

share|improve this answer
    
Yep, they added the flag to disable it. –  Moab Aug 29 '12 at 13:56

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.