Prevent opening Visual Studio Code when click Show In Folder in Chrome - google-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.

Related

VS Code - How to stop it deleting whitespaces?

I am using Microsoft's VS Code to edit css, html and ts files that are shared by my team on a VSTS Git repo. However, my VS Code keeps removing empty/whitespaces that my colleagues added when I save any change (Image below) and this screws up the whole Git Diff part, as almost every single line of code shows as a diff.
I tried to disable every single config setup but nothings works:
At the end, what was causing my problem was the extension: EditorConfig for VS Code
This plugin attempts to override user/workspace settings with settings
found in .editorconfig files. No additional or vscode-specific files
are required. As with any EditorConfig plugin, if root=true is not
specified, EditorConfig will continue to look for an .editorconfig
file outside of the project.
I believe, it was overriding the options I selected inside of VS Code (such as files.trimTrailingWhitespace: false). So, no setup change I was making was actually being applied.
It seems you have trailing whitespace enabled in User Preferences too.
I'd suggest opening your configuration file of VSCode using
CtrlShiftP or
CmdShiftP in Mac and then go to Open User Settings.
I'm sure the next line is around there somewhere, delete it or change it to false.
files.trimTrailingWhitespace": true
In my case, the JS-CSS-HTML Formatter extension from lonefy
caused the problem.
Editor › Comments: Ignore Empty Lines
——>choose :false

Phpstorm shows js files as updated

When doing "Sync with deployed on ..." in phpstorm, the diff shows as if all local js files were updated recently and thus offers to upload them even they were not changed or most recent changes are on the server. Anyone had this weird issue or knows how to fix it?
The GUI allows you to switch to "Compare by: Content". Note that this will be more bandwidth-intensive than comparing by modification date.
See e.g. this for a screenshot: https://www.jetbrains.com/phpstorm/help/comparing-deployed-files-and-folders-with-their-local-versions.html

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 :)

How to change Active configuration in monodevelop?

I'm following these steps to build sdrsharp on stable Debian. So fr, everything went without a hitch, but I can't figure out this step:
cd into the new sdrsharp directory and then load monodevelop and open the sdrsharp.sln project. If the .sln doesn't open use a text editor to open the .sln file and at the end of the first line change the 12.00 to 11.00. Older versions of monodevelop don't understand the VS2012 header.
Set the Active Configuration from Debug|x86 to Release|x86.
The first one is just given for context, monodevelop has no problem opening the file. But how do I change the Actove Configuration?
Monodevelops internal help is broken, I have no experience with monodevelop or similiar tools as I'm no coder, hence asking here.
Edit to add
The same question was asked and answered here, there should be an option under the "project" tab. But in my case, working from the downloaded .sln, all options under project are grayed out. What to do?
Fixed! The Version had to be changed back to 11 (first bullet point above, relevant to my special case), then reopen file, then it's opened as a project, not as a text file and all the options work.
Take home lessen: That a progeam opens a file without complaining does noit mean there's no error.

How to stop opening files in browser upon save

I'm using Sublime Text 2 (which I love). I have it set to auto-save upon lost focus, to it automatically saves. Somehow, however, I've done something such that when it saves, it opens in a browser. This must be some build function that's getting triggered, but I don't know where to look for it. I looked for a BuildOnSave package in the installed packages, but I didn't see anything remotely related to 'Save' or 'Build', etc.
Does anyone have any ideas of where to look? I don't really want to have to revert to pristine state and then have to re-install my plugins as this us pretty darn annoying.
My currently installed packages are below, if it helps.
"installed_packages":
[
"AMD Module Editor",
"CoffeeScript",
"Dayle Rees Color Schemes",
"Emmet",
"Emmet Css Snippets",
"Git",
"Gitignore",
"JSLint",
"LESS",
"Markdown Preview",
"Package Control",
"SublimeLinter"
],
Thanks,
Scott
Try disabling Markdown Preview, as it looks like it could be the culprit. It has some built-in build systems, and you likely somehow activated a "build on save" feature. None of the other packages (that I'm aware of) have similar functionality that would give the symptoms you're seeing.
To deactivate, select Preferences -> Browse Packages... to open a file browser window of the Sublime Text 2 Packages directory. Move (don't copy) the Packages/Markdown Preview directory to someplace else, like your Desktop, for now. Quit and restart ST2, and see if the issue persists. If not, this plugin was at fault, and you can start poking around in its settings (after moving it back to the Packages folder) to see where the error is. One place to look is in Tools -> Build System and deselect Markdown.
Good luck!