Developer tools getting disabled - google-chrome

I am on Version 45.0.2454.101 m and for some reason dev tools option is getting disabled.
I reinstalled chrome 3 times, no luck.
I tried to delete the registry file based on this answer
Google chrome develop tools disabled
I do not see chromium under policy folder :(.
I searched the user data --> Default --> Preferences folder to see if I can delete the devtools reference, nothing helped :(
Update:
Based on lossleader's comment I checked chrome://policy and I see devtools is disabled, how should i enable or set this to false
Please help
UPDATE : 10/13/2015
My preference file as of today, still dev console is disabled:
10/16/2015 I do not see anything under group policy object too

UPDATE:
I've made a small video with step by step instructions.
1 - Close Chrome
2 - Open the file:
C:\users\[your users account]\AppData\Local\Google\Chrome\User Data\Default\Preferences
3 - SEARCH FOR:
"devtools": {
something...
"disabled": true,
something...
},
4 - CHANGE TO:
"devtools": {
something...
"disabled": false,
something...
},
5 - Restart Chrome.
DISABLED:
ENABLED:
TIPS
1 - If you cannot find "disabled": true, just add the value "disabled": false, under devtools.
2 - You may want to copy the contents of the file to http://jsonlint.com/ in order to read properly.
3 - Backup the Original file (just in case)
4 - I've tested enabling and disabling devtools and it works as expected.
5 - If the problem persists, you may want to disable your extensions in order to ensure they aren't messing with your preferences. The same applies to antivirus.
UPDATE
You said:
notepad ++ complaints saying the source file has been modified by
another program
It doesn't matter, other values may have changed on the file, and that's normal, but the values you've added won't change.

Try deleting this folder:
[user drive]\Users\%user%\AppData\Roaming\Google
which I got from a Superuser question.
Or, do:
Press the Windows key + R, type regedit.exe and press Enter
HKEY_USERS\ -> S-1-5-21-1177238915-1897051121-839522115-1003\ -> Software\ -> Microsoft\ -> Windows\ -> CurrentVersion\ -> Group Policy Objects\ -> {91DD4E7D-FE0F-4B62-A092-91DC1486888E}User\ -> Software\ -> Policies\ -> Google\ -> Chrome
Delete the ones in RED. Click on "Google" and click on "Edit" and select "Delete".
Click on "File" and then "Exit".
Did it work?

If you are logged into Google under a managed account that has the preference off, you'll have to log out to get around it. Other than that the administrator of your account has to change the setting for you to be able to use Dev Tools in Chrome.

This is clearly a Windows box, but you didn't say if it's a personal or work computer.
Looking at the policy in chrome://policy, you will notice that the policy is being set at the "Machine" level.
Read google's documentation here:
Machine Policies are applied through Group Policy Objects (GPO) on Windows..
..(machine policies) are pushed to the user using Windows Group Policy Objects (GPO), Managed Preferences on Mac, or another out-of-band management system for Windows/Mac/Linux..
In other words, it's likely that your workplace has set up a group policy object and is forcing these 3 settings onto your machine. Group Policy Objects generally can't be disabled and often can't even be seen by a non-administrator. Note that when I say "administrator" I'm talking about a domain admin, not a local-machine admin.
The purpose of group policy ("Managed Preferences" on the Mac) is to force certain settings onto a large group of machines. Common examples include password policies, ability to install plug-ins, etc.
It looks like someone in your organization thinks that disabling Chrome's developer tools and incognito mode are good for security. This is kind of a dumb idea, but that's not relevant to the discussion.
EDIT: "that would be highly unlikely but I will look"
You have more confidence in your IT department than I do. :)
Someone probably read this NSA "briefing" and thought it was a good idea.

I don't know how helpful this will be, but are there any other unknown processes running in task manager on your computer. This sounds less like a bug and more like some malware may be forcefully editing any chrome installation. It could also be that when you re-install chrome and sign in some kind of chrome add-on is being loaded which is causing problems.

The only thing that worked for me was changing this value:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\DeveloperToolsDisabled
to 0
Unfortunately, after a logon or some time (I'm no domain admin) the setting is set to 1 again. Thinking about starting Chrome via a batch file and applying the value to the registry key, like this
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome /v DeveloperToolsDisabled /t REG_DWORD /f /d 0
Complete commandline (with UAC):
powershell Start-Process cmd.exe -ArgumentList "/C","'reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome /v DeveloperToolsDisabled /t REG_DWORD /f /d 0'" -Verb runAs
Complete batch file:
REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome" /v "DeveloperToolsDisabled" | Find "0x0"
If %ERRORLEVEL% == 0 goto start_chrome
powershell Start-Process cmd.exe -ArgumentList "/C","'reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome /v DeveloperToolsDisabled /t REG_DWORD /f /d 0'" -Verb runAs
:start_chrome
start "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
exit

In the case of Microsoft Edge, I changed the DeveloperToolsAvailability setting value from:
2 (Don't allow using developer Tools)
to
1 (Allow using the developer tools)
Set the Registry Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\DeveloperToolsAvailability
And check afterwards:
edge://policy
But since this is work laptop, you at mercy of site admins, when they run group policies. But this worked for me, on laptop where setting is controlled by group policy
Reference: (DeveloperToolsAvailability)

Follow the steps below or refer to these 4 screenshots to enable developer tools.
You will need to be familiar with the Windows registry editor.
Run regedit :Windows key +r then type regedit or search for it
Browse registy to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
Double click on DeveloperToolsDisbaled
Change the value from 1 to 0
Issue should be resolved
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome:
DeveloperToolsDisabled:
Change Value to 0:
Developer Tools should now be enabled:

Related

How to force Chrome to always open as application without command line or shortcut

How are you?
I hope you are safe and sound.
I was wondering how can edit the Windows 10 in order to make chrome/edge to always open always open as the following flags:--app and -userdatadir=C:/temp
Don't want via shortcut or command line.
Thanks.
From your previous comment, I understand that you want to set the User Data Directory using the registry key for the MS Edge Chromium browser.
Here, I am showing you 2 approaches. Using registry key and using group policy.
Below are the steps to set the User Data Directory using the registry key.
Open Registry editor.
Browse to the location below.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge
Create a new string value and name it as UserDataDir.
Doubble click on it and set the directory value.
Close the Registry editor and relaunch the MS Edge browser.
Below are the steps to set the User Data Directory using the Group policy.
Open Local group policy editor.
Browse to the location below.
Computer configuration -> Administrative templates -> Microsoft Edge
Find and double click on Set the user data directory policy.
Click on enabled option and then set the desire value.
Close the Local group policy editor and relaunch the MS Edge browser.
Reference:
Create Microsoft Edge user data directory variables

How to fix this "your system administrator has configured chrome to open an alternate browser to access"

I'm trying open an application in google chrome, when I launch the website chrome it redirects to IE and showing message "your system administrator has configured chrome to open an alternate browser to access" in chrome. How to overcome this issue
Behavior
You open a corporate site. For example,
http://legacy_SharePoint_2010.com
You will see a message: "Your
system administrator has configured chrome to open an alternate
browser to access"
Your IE 11 will be opened and your chrome tab will be closed:
Why this is happening
The behavior is controlled by the Chrome Policies (chrome://policy/)
When Policy is setup, chrome://browser-switch protocol is used to redirect to IE
The list of sites that will be forced to use IE 11 is listed in the registry, under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\BrowserSwitcherUrlList
You might need local admin permissions to modify or remove these registry keys
:
When your company forces such policy by default than sooner or later you have to update the policy in regedit again. Quite elegant solution could be to switch off/on the policy when needed. I do so with Python and winreg module (but could be similar in other languages):
import winreg
from itertools import count
def switch_reg_browser_switcher():
reg_handler = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
with winreg.OpenKey(reg_handler, r"SOFTWARE\Policies\Google\Chrome", 0, winreg.KEY_ALL_ACCESS) as regkey:
for i in count():
try:
val_name, curr_value, _ = winreg.EnumValue(regkey,i)
if val_name == 'BrowserSwitcherEnabled':
print(val_name, curr_value)
winreg.SetValueEx(regkey, val_name, 0, winreg.REG_DWORD, curr_value^1)
break
except OSError:
print('All keys iterated but "BrowserSwitcherEnabled" not found')
break
print('Updating Windows registry to reset company policy...')
switch_reg_browser_switcher()
Or a simple solution in Batch file:
#echo off
set regkey="HKLM\SOFTWARE\Policies\Google\Chrome"
REG QUERY %regkey% /v BrowserSwitcherEnabled
if %errorlevel% equ 0 ( REG ADD %regkey% /v BrowserSwitcherEnabled /t REG_DWORD /d 0 /f
) else (echo no such value)
My motivation to do this was webscraping with Selenium (Chrome driver is much faster than IE) and no power to force my company to change policy.

Prevent opening Visual Studio Code when click Show In Folder in Chrome

I've been googling and fighting this for a half a day already.
When I download something in Google Chrome I want to go to the folder with a file. But when I press 'Show in folder' a Visual Studio Code starts instead of my Thunar. How can I fix this?
Firefox opens folders ok but Chromium, Google-Chrome and Opera kicks of Visual Studio Code.
My system is Linux Mint Tara. I've already tried some things. Like added
[Default Applications]
inode/directory=Thunar.desktop
to /home/[user]/.config/mimeapps.list
Completely removed code.desktop from /usr/share/applications/mimeinfo.cache
Ran xdg-mime default Thunar.desktop inode/directory and the output of xdg-mime query default inode/directory is Thunar.desktop!!!
Even fully removed code.desktop from filesystem. Nothing worked!
Please help, this annoys me so much.
This is caused by MimeType=text/plain;inode/directory; which can be found in /usr/share/applications/code.desktop for what I can find.
What fixed it for me is changing this line to MimeType=text/plain; and removing code.desktop from /usr/share/applications/mimelist.cache
EDIT
A more permanent solution i've found is the following.
add inode/directory=org.gnome.Nautilus.desktop to the ~/.local/share/applications/mimeapps.list file.
After doing this make sure to the inode/directory entry is the same or not present at all in ~/.local/share/applications/mimelist.cache' and /usr/share/applications/mimelist.cache
org.gnome.Nautilus.desktop can be replaced by your preferred file explorer if you don't use Nautilus.
You might need to restart your desktop environment for the changes to apply.
The solution is simpler,
What happens is that the system orders the directory opening preferences.
Just go to the file manager > select a folder > right click > open with another application > select the file manager.
This will update the opening preferences for the directories.
Finally found! it. I had to delete
inode/directory; /usr/share/code/code --new-window %s; test=test -n "$DISPLAY"
line in the /etc/mailcap file. Bingo!
Chromium related browsers seems to not respect xdg settings on not full-fledged Desktop environments like i3wm which I use. Because the problem was not reproducible when I logged in with xfce4 session.

cannot stop Chrome from updating from 43 to 44

I am using Selenium and Chrome to write a web test, yesterday my Chrome updated to 44 and now my test does not work, I know that it is an issue with Chrome 44 and we need to wait till the new version is given out.
So I am trying to go bake to chrome 43, i do:
1) Uninstall chrome 44
2) Install chrome 43
but as soon as the installation is done it automatically opens the chrome and it is 44 again !! I went to Run->Service.msc and disabled my chrome to update automatically, but it does not work. I remove the Update folder in User->Myname->AppData->Local->Google->Update but it does not work,
and there is nothing related to updating at chrome://plugins.
I AM STUCK
PLEASE HELP :(
I did all sulosion posted on line but non of them worked,
Have spent a loooong time trying to disable updates (literally hours, reading forums and testing various (some exotic) solutions), and this was driving me crazy. But there what seems an infallible solution (see further down).
Even using the official Google page with the templates did NOTHING : https://support.google.com/installer/answer/146164?hl=en
I followed scrupulously the instructions of that page, the keys in the registry are all correct, but still going to the "About Google Chrome" when the program is opened, I can see the wheel going around and a few seconds later the update is forced and done.
I have tried using the standalone installer of Google, on a Windows 8.1 machine 64Bits - and yes all the keys are set to :
Dword: AutoUpdateCheckPeriodMinutes Value: 0
Dword: DisableAutoUpdateChecksCheckboxValue Value: 1
Dword: UpdateDefault Value: 0
Dword: Update{8A69D345-D564-463C-AFF1-A69D9E530F96} Value: 0
... both in HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update AND HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Google\Update since it is a 64-bit machine.
So the radical solution to prevent the auto-update, if that helps anyone, is to just purely sort the program responsible for the updates itself! (Just deleting it, OR saving a copy, OR renaming it OR even better just in case I one day need to do an update: Zip the content for future potential re-use).
Easy solution :
1- Go to "C:\Program Files (x86)\Google\ and find the folder "update".
2- There are a couple of options to choose from:
A) first method: Rename the folder:
- Right click > Rename > from Update.bak to Update2.bak for example.
- Now launch Chrome: NO MORE UPDATES!! since it can not find the update program !! Finished.
B) second method: Zip the folder:
- Zip the entire folder by making an archive. (Right click the "Update" folder > Send to Compressed (zip) folder)
- A window might ask you to backup/zip and place it on the desktop, click yes. (message: Windows cannot create the compressed folders here. Do you want to be placed on the desktop instead?)
- Move the newly created zip file to the original location. A new window security might pop up > click continue. (message: You need administrator permission to copy this file). [This will be what to unzip if one day you decide to update Chrome - Just remember that when unzipped it will have the following structure : Update > Update > then all the content of the folder. Remember to move everything from inside the second update folder (copy paste) one level up so that is becomes : Update > then all the content of the folder].
- Now that you have a copy just delete the "Update" folder.
- Now launch Chrome: NO MORE UPDATES!! since it can not find the update program !! Finished.
Good luck and Enjoy.
As per Chromium
Turning off Auto-Updates on Windows
To turn off auto-updates of Google Chrome on Windows, you need to instruct Google Update to not update it. To do this, you can either:
Use the Google Update ADM templates provided on this page or as described in this article.
Set the value of
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update\AutoUpdateCheckPeriodMinutes
to the REG_DWORD value of "0".
You can check for Mac and Linux in the first Link
To get rid of Chrome 44 and go back to 43 I downloaded a stand-alone version of chrome 43 which is an .exe file and I just double clicked on it and it was installed on my computer WITHOUT updating to Chrome 44, to find the link to Chrome 43 have a look to RobW comments to my question above and if the link is stale you can just Google for Chrome Stand-alone, or go to the bottom of this page Google Chrome 64-bit Offline Installer| 45.7 MB.
Have Fun :)

Disable shortcuts in Google Chrome

Is there a way to disable and replace shortcut commands in Google Chrome. I want to use Chrome for a public computer that only can access one site. Because of this I want to disable keys like Ctrl+Tab, Ctrl+T, Alt+F4 and I want to change F11 to a command like Ctrl+Shift+Alt+J (example) to stop users from exiting full screen mode.
Settings on the network block everything but a specific domain but now I want to block the user from exiting the browser.
I know this question is quite old, but I found a solution that works for me (and probably many others too).
If you don't use the CTRL and ALT keys in the browser at all, you can disable them in the OS itself.
Under Linux, I used xmodmap -pke to find out which key is mapped to which code.
Knowing the keycodes, I used:
xmodmap -e "keycode 37 = "
xmodmap -e "keycode 105 = "
to disable both left and right CTRL keys (to prevent something like CTRL+W, CTRL+T, etc.), then with:
xmodmap -e "keycode 133 = "
xmodmap -e "keycode 134 = "
both left and right SUPER keys (Windows Keys) (to prevent opening the start menu and such fancy stuff)
and then finally with xmodmap -e "keycode 105 = " I disabled the ALT key (to prevent ALT+F4, etc.).
And optionally, we can disable F1 too, so that the Chrome Support Page doesn't open, with: xmodmap -e "keycode 67 = "
Finally, let Chromium or Chrome lock the rest down for us using Kiosk Mode:
chromium-browser --kiosk http://example.com/
or
google-chrome --kiosk http://example.com/
And right click is already disabled in kiosk mode, so we don't need to change anything there.
With all that done, the end user can only navigate with the mouse within the predefined webpage (And links leading to some other content, of course) and write stuff with the normal characters on the keyboard, but nothing more.
Reloading may be still possible (F5), but even that can be disabled with: xmodmap -e "keycode 71 = "
Caution: Please execute xmodmap -pke first to discover if your keyboard or OS have the same keymapping, or you may disable other normal keys without knowing.
Caution 2: Note that if you've done everyhing above and then launch Chrome or Chromium in Kiosk Mode, you can't get out anymore! Only physically pressing the power button or killing the application over SSH or Telnet will let you resume normal operation again.
To make those changes permanent, read the end of this guide:
https://stackoverflow.com/a/11219056/3525780
EDIT: To those who have problems disabling the F1, F5, etc. keys, use following as a workaround:
xmodmap -e "keycode 67 = Escape"
(Somehow those "F keys" need to be assigned to an already existing and assigned key)
Having recently encountered the same kiosk-type problem (and not being able disable all keys in Chrome) I eventually found a solution which I thought I would share:
Using node-webkit I created the following package.json file:
{
"name" : "mykiosk",
"window" : {
"fullscreen" : true,
"toolbar" : false
},
"main" : "http://the-one-and-only-allowed.url/"
}
Launch with: ./nw
All function keys are blocked. Ctrl+N/T do not create tabs. It is quite nice
One last javascript/onload trick to disable the right-click context menu:
window.oncontextmenu = function(ev) {
ev.preventDefault();
ev.stopPropogation();
return false;
}
Chrome has Kiosk Mode, but that won't prevent users from using OS keyboard shortcuts (like ALT+F4, which aren't part of Chrome. Windows handles those). To start it in Kiosk Mode, run it using these parameters:
chrome.exe --kiosk http://www.google.com
My public library actually did something pretty awesome: they installed an extremely minimal Debian build on their kiosks, and run Google Chrome on each one. There are no close buttons, and no desktop to get into, so this deters virtually all the CTRL+ALT+DELETE hackers out there. ALT+F4 doesn't work either, and closing the browser by right-clicking opens up another one instantly.
But they forgot to get rid of GRUB's 10 second timeout, which lets users (well, me) get into recovery mode -_-, so I'm working with them to get that fixed...
I'd seriously consider Linux, as you can install it really quickly on multiple computers and basically forget about viruses and security. But the downside is that there isn't a "Administrator Panel" for you to tweak things with. You'd have to whip out nano (sorry, can't get used to vim) and edit some config files.
For me using version 52.0.2743 the --kiosk tag didn't work, but the --app="http://www.example.com" did what I wanted. (Disabled chrome keyboard shortcuts so I could use shellinabox + nano without issue.)
Also works on Chrome Canary (for which the --kiosk tag also didnt' work).
Other possibly helpful links:
Chrome support how to make a Kiosk App: https://support.google.com/chrome/a/answer/3316168?hl=en
Kiosk App for Chrome: https://chrome.google.com/webstore/detail/kiosk/afhcomalholahplbjhnmahkoekoijban?hl=en