Part I: Setup Dev Environment in Windows 10

I’ve decided to split the blog post on setting up a dev environment in Windows 10 and WSL into 3 parts:

  • Part I: Setup Dev Environment in Windows 10
  • Part II: Windows Subsystem for Linux (WSL) and Docker setup
  • Part III: Installation of additional packages and tools in WSL

These blog posts serve as ongoing updated notes on how I configured my Windows 10 and WSL environment. It’s also a way to describe the tools I use as part of my daily work.

Things change frequently here, whenever I spot a better way of doing things, I’ll update these blog posts to remember how I did it. If you follow my examples, make sure to check version numbers - sometimes the official installation guides have been updated and this may not be reflected here.

Windows 10

Some general settings:

  • Windows Sound Scheme: “No Sound”
  • For easier access to frequently used folders, tools and drives:
    • Taskbar / right-click / add toolbar / “This PC”
      • right click / use small taskbar icons and disable text/title
    • add Win7 Quick Launch bar: Taskbar / right-click / add toolbar / %APPDATA%\Microsoft\Internet Explorer\Quick Launch
      bar-sample
  • Remove User Folders (3D Objects and other silly stuff):
    • get remove-userfolders-win10.reg
    • open it and uncomment any user folder you want to keep (Documents and Pictures is commented out - i.e. kept)
    • run it - stupid user folders gone 👍
  • Make Windows 10 accept file paths over 260 characters (source:
    • Remove limit with this registry file
      (- Restore limit with this registry file)

Chocolatey

For managing and updating my Windows Software, I prefer Chocolatey package manager. Choco will configure everything without manual need to intervene - default settings are mostly following the principle of sane defaults, which means: choose whats least interrupting.

To install Chcolatey:

  • Open cmd with administrator privileges:
    • in Windows 10, click on start (or hit the ⊞ Win-Key), type “cmd”, right click on Open Command Prompt and select “Run as Administrator”
  • enter the following command (taken from the choco installation instructions):
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  • Once choco is installed, restart the administrator console once to make choco available as a command
  • Now you can install packages, e.g. Firefox with choco install firefox
  • I suggest using choco for any software install on Windows, simply run choco upgrade all -Y once a week to keep all your software up to date

Create a shortcut “Choco Update All”

To create a shortcut to update all Windows Software installed with choco, create a shortcut (e.g. on Desktop) and add the following target:

C:\Windows\System32\cmd.exe /K "choco upgrade all -Y"

In addition:

  • right click/ properties/ advanced
  • Check “Run as Administrator”

The tools I use

The following is a list of tools I installed with choco and the additional settings for some:

  • Browsers:
    • I prefer having a variety of browsers, for different purposes and testing
    • googlechrome (-> choco install googlechrome)
      • disable password, language, autfill etc.
      • install momentum (default screen)
      • extensions:
      • disable push notifications:
        1. chrome://settings/content/notifications (copy & paste this link, direct click is disallowed)
        2. Scroll down and click Advanced
        3. Click content settings
        4. Click Notifications
        5. Next to the Ask before sending (recommended) text, click the toggle button. It should now say Blocked.
      • set standard language to English:
        1. Chrome will automatically display in the default system language for your computer.
        2. chrome://settings/languages
        3. Next to the language you’d like to use, click “Move to the Top”.
    • firefox
      • same extensions and settings as for chrome
    • chromium
    • microsoft-edge
      • edge://settings/languages > Use writing assistance > Select Basic
  • docker-desktop (software virtualization)
  • keypirinha (awesome tool to quick open any app with Alt+Space)
    • type “kconfig” in keypirinha, to open User Config File, add:
    [app]
    hotkey_run = Alt+Space
    launch_at_startup = yes
    
  • notepadplusplus (quick text editor)
    • vscode-dark2015 style: https://github.com/Ludomancer/VS2015-Dark-Npp
      • store to %APPDATA%\Notepad++\themes
      • activate global background color in settings
    • markdown-zenburn language: https://github.com/Edditoria/markdown-plus-plus
      • store to %APPDATA%\Notepad++\userDefineLangs
    • under Preferences / Backup disable Remember current session for next launch
    • under Preferences / New Document, select Unix (LF) for the standard Format Line ending
    • Settings / Preferences / Language > “Replace Tab by Space”
    • Plugins:
      • Compare
      • DSpellCheck
      • JSON Viewer
      • JSTool
      • MarkdownViewer++
  • choco install irfanview --package-parameters="'/assoc=1'", for image file association
  • libreoffice-still
    • choco install libreoffice-still
    • stable, less frequently updated libre office version
  • vlc (videos)
  • keepass (password manager)
    • Options
      • Lock workspace after 1200 seconds
      • enable lock global workspace inactivity
      • enter master key on secure desktop
      • Shortcut: CTRL+Alt+D
      • Turn off “Play UAC sound when switching to secure desktop” (Advanced Menu)
    • extension: KeeAgent for auto ssh authentication
      • choco install keepass-plugin-keeagent
  • 7zip-zstd
    • the -zstd variant includes modern compression algorithms such as Google Brotli
  • Putty (SSH agent)
  • WinSCP (file transfer)
    • to restore settings, import Site List from backup (WinSCP.ini)
  • autohotkey
  • spacesniffer (awesome tool to identify how your drive space is used)
  • opensans (default font)
  • font-awesome-font (best icon font)
  • python (system python, but its rarely used)
  • vscode-insiders (code editing)
    • accept install WSL extension
    • test code-insiders . in wsl
    • Settings File Locations
      • in Windows, the user settings file is located here:
        • %APPDATA%\Code\User\settings.json
        • you can also hit CTRL+Shift+P and enter Preferences: Configure Language Specific Settings (select any language)
        • currently, my settings.json file looks like this
          • one of the most important settings is "files.eol": "\n",, which will use Linux style linebreaks in Windows (Git & WSL compatibility)
      • I also use the VS Code Extension Settings Sync to sync my settings.json to a private Gist on Github (called “cloudSettings”)
        • use SHIFT + ALT + U to upload settings
        • use SHIFT + ALT + D to download settings (e.g. after a reinstallation of VS Code)
        • Note: as long as Issue 979 is not fixed, this will not work in WSL Remote Development
    • extensions (WSL - my main development):
      • autoDocstring
      • Docker
      • GitLens
      • pgFormatter
      • PostgrSQL
      • pyright
      • python
      • Settings sync
      • shfmt
        • Install dependency with
          curl -sS https://github.com/mvdan/sh/releases/download/v3.4.3/shfmt_v3.4.3_linux_amd64 | bash
          
    • extensions (Windows):
      • Settings Sync
        • connect to github gist settings
      • Night Owl
      • Remote - Containers
      • Remote - SSH
      • Remote - WSL
      • Remote Development
      • Python
      • Bracket Pair Colorizer
      • Vetur (Vue specific)
      • JavaScript (ES6) code snippets (Vue specific)
  • thunderbird (mail client)
  • typora (markdown docs renderer)
    • File > Preferences.. > Editor
      • LF (Unix Style) Line Endings
    • File > Preferences.. > General > Open Advanced Settings > conf.user.json
      • Add Custom Key Binding for Source Code Mode:
       // Custom key binding, which will override the default ones.
      "keyBinding": {
          // for example: 
          // "Always on Top": "Ctrl+Shift+P"
          "Source Code Mode": "Ctrl+Shift+M",
      },
      
  • dexpot to switch between multiple virtual desktops
  • drawio for diagram and schema drawing
  • openvpn
  • miniconda3
    • choco pin add -n=miniconda3 to pin version
    • I update conda always manually with conda update -n base conda
    • follow instructions to work with conda in Windows below
  • qgis (alternative GIS)
  • oldcalc (Windows 7 calculator)
  • jcpicker (color picker)
  • visualstudio2019community
    • for development of some windows based interfaces, I sometimes still require Visual Studio (instead of VS Code)
    • after chocolatey installation, further extensions are required that will be automatically installed upon first load of a solution:
      • .NET Desktop Development (5 GB)
  • zotero
    • disable sync
    • set “Base directory” (Preferences > Advanced > Files and Folders) to local literature folder
    • Dark Theme:
      • Go to %AppData%\Zotero\Zotero\Profiles\ (XXXXXXXX.default)
      • Create chrome folder
      • Place the userChrome.css
      • Start Zotero
    • Install Zotero folder import AddOn
Click here to see: Remove all Microsoft "Apps" (bloatware)

I don’t use these apps. Run in elevated powershell:

Get-AppxPackage -allusers *photos* | Remove-AppxPackage
Get-AppxPackage -allusers *3dbuilder* | Remove-AppxPackage
Get-AppxPackage -allusers *windowsalarms* | Remove-AppxPackage
Get-AppxPackage -allusers *windowscalculator* | Remove-AppxPackage
Get-AppxPackage -allusers *windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage -allusers *skypeapp* | Remove-AppxPackage
Get-AppxPackage -allusers *getstarted* | Remove-AppxPackage
Get-AppxPackage -allusers *zunemusic* | Remove-AppxPackage
Get-AppxPackage -allusers *windowsmaps* | Remove-AppxPackage
Get-AppxPackage -allusers *solitairecollection* | Remove-AppxPackage
Get-AppxPackage -allusers *bingfinance* | Remove-AppxPackage
Get-AppxPackage -allusers *zunevideo* | Remove-AppxPackage
Get-AppxPackage -allusers *bingnews* | Remove-AppxPackage
Get-AppxPackage -allusers *onenote* | Remove-AppxPackage
Get-AppxPackage -allusers *windowsphone* | Remove-AppxPackage
Get-AppxPackage -allusers *windowsstore* | Remove-AppxPackage
Get-AppxPackage -allusers *bingsports* | Remove-AppxPackage
Get-AppxPackage -allusers *soundrecorder* | Remove-AppxPackage
Get-AppxPackage -allusers *bingweather* | Remove-AppxPackage
Get-AppxPackage -allusers *xboxapp* | Remove-AppxPackage

Miniconda (Windows)

I maintain separate miniconda installations in WSL and Windows. Mostly I use conda in WSL these days, but for some software I have to use conda in Windows (e.g. TagMaps, due to the graphical interface that cannot run in WSL). It is likely you will only need one conda installation (in WSL).

  • there’s a separate blog post that explaines installation of conda and tagmaps in Windows

SSH

  • create a private ssh-key-pair with puttygen (protected by a good password)
    • Export SSH Key with puttygen, two different ways:
    • Windows: to %USERPROFILE%\.ssh\id_rsa
      • use Keepass - KeeAgent Plugin for SSH key access, settings:
      • Tools/options:
        • Cygwin socket file C:\Users\[User]\Documents\cyglockfile (replace [User])
        • Msysgit socket file C:\Users\[User]\Documents\syslockfile (replace [User])
    • Linux/WSL:
      • Linux: Conversions/Export OpenSSH key
      • see this blog post

Netspeedmonitor

I like to have a quick glance at netspeed throughput, netspeedmonitor is a great tool but it is not available for Windows 10.

The latest msi is available on various sites, e.g.

  • Right-click on the .msi installer file
  • Go to Properties
  • Go to the Compatibility tab
  • Click “Change settings for all users”
  • Tick “Run this program in compatibility mode for:”
  • Choose “Previous version of Windows” in the drop-down menu
  • Click OK and run the installer
  • Now to run NetSpeedMonitor on startup:
    • Go to C:\Program Files\NetSpeedMonitor
    • Right click on nsmc.exe
    • “Send to” “Desktop (create shortcut)”
    • Go to Desktop and move the shortcut to %appdata%\Microsoft\Windows\Start Menu\Programs\Startup

Microphone and Video privacy settings (Windows Education)

Now this is Windows Education specific and it caused me some headache:

I could neither use Microphone nor Video recording, which was caused by some default privacy settings hidden deeply.

  • Open the Group Policy Editor (⊞-key and enter gpedit.msc)
  • Go to Computer Configuration > Administrative Templates > Windows Components > App Privacy
    • Select “Let windows apps access the microphone”, enable (should be on already))
    • Select “Let windows apps access the camera”, enable (should be on already))
    • In the “default for all apps” box, set: User is in control (default: DenyAll) for both (microphone and camera) -> means that users may change the privacy setting using the Settings application.
  • Now go to Windows + I key
    • Enter “privacy” in search, select “Microphone Privacy”
    • should indicate “Microphone Access for this Device is On”