Setup a windows desktop computer

Setup a windows desktop computer

March 22, 2021

This is written on March 2021.

I set up Windows for the 1st time since several years ago and there was a lot of difference between recent version and the version I used. This page collects information for something it would have been helpful for setting up windows for me.

Setup for software development

Join Windows Insider Program

Windows Insider Program provides users to access applications from their dev, beta, or preview releases. This is helpful to use some applications before it becomes stable releases, like WSL, and many documents on the Internet is also written for these pre-stable versions.

Once you joined, you wanna make sure turnning on automatic updates for OS version. See this page to turn it on.

Windows Subsystem for Linux (WSL)

WSL is to run Linux on a windows as a native Windows application, unlike running a virtual machine or dual boot. It’s really helpful for developers to develop their applications on Windows like running apt or git. You can find some Linux distributions on Microsoft Store.

Enable copy and paste

As a default, copy and paste isn’t enabled, but you can easily do it on Properties > Options > Edit Options > User Ctrl+Shirt+C/V as Copy/Paste. See this article for more details.

Update Fonts to solve garbled text

The default font might not support showing your languages. In that case, updating a font might solve your issue. You can update it by Properties > Font > Font.

Limitations or issues I haven’t been solved yet

  1. The directory of a home directory on WSL (/home/$USER) is different from one of Windows (C:\Users$USER), and if I put something like a git repository under Windows directory, then permissions of it was changed to 777 and all changes are changed and hard to check each change by git.
    • I wanted to develop an application using IDE on Windows but manage it by tools like git on WSL. I couldn’t do it because of this.
  2. Supporting GUI of Linux is under development and I haven’t tried, though there is an article to do it.

Troubleshootings

  1. How to upgrade WSL from 1 to 2?
  2. Network speed on WSL 2 is terribly slow.
    • You have to do disable “Large Send Offload”. You can do it on Device Manager > Network adapters > Hyper-V Virtual Ethernet Adapter > Properties > Advanced. See this comment on GitHub issue for more details.

winget

winget is a CLI to install and manage applications, just like HomeBrew on Mac, apt or yum on Linux. You need to install App Installer to use this tool, and also need to join Windows Insider Program to install it.

Setup for daily use

UI

Enable night light

You can enable a night light under Settings > System > Display to reduce blue light and also can set a schedule.

Enable Dark mode

You can enable Dark mode under Settings > Personalization > Colors. See this article for more details.

To turn on Dark mode at night automatically

Unfortunately, there is no built-in feature to switch a light and dark mode automatically. In order to enable Dark mode only during sunset, you need to set up something. The way I did was using a Task Scheduler to enable Dark mode automatically at night and disable it on the morning, by following this article.

Languages and keyboards

Install Japanese IME and change a shortcut key

You can use Google Japanese Input to use Japanese in your computer. In order to change the shortcut key to Ctrl+space to switch an input method, go to Propertites of Google Japanese Input Settings, click Customize of Keymap style under General tab, and update Key column to Ctrl Space on each command of Activate/Deactivate IMEI of every mode. See this post, written in Japanese, for more details.

Use shortcut keys of Emacs

There is a disadvantage for this configuration, like Ctrl-k works twice on Emacs on WSL unexpectedly. So I may disable this in the future.

First of all, in order to customize short cut keys on Windows, AutoHotKey might be useful. Then you might wanna use a few shortcut keys of Emacs on most of applications such as moving cursors by Ctrl-f, but you do not need full Emacs customization like Ctrl-x and doing something else, like Mac. In this case, gtk-emacs-theme-like, tiny AutoHotKey configuration, can be used to do it.

Also, you can also set this configuration on every boot. At first, you have to run shell:startup after you type Win+R and you can see a folder on your explorer. Then right click and select “Paste shortcut” in the folder. Now the script run every time you start your computer. See this FAQ for more details.

Last updated on