Getting started blogging on Win10

I am planning to setup by blogging environment on my Windows PC.

My objective today is get rid of the static/js/core.js from aether-pelican theme and replace it with a simple CSS, and it turns out quite challenging.

WSL1 and file system

As it turns out, the installed Ubuntu root filesystem on WSL1 is located here:

%localappdata%\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs

I plan to move my home dir (at least) to another SSD on my PC, as the C:\ drive is an old SanDisk Plus240, which is unforgivablly slow these days. I tried to mv ~ /mnt/d/home, ok but the permission gets weird.

So I tried to copy the folder on Windows to D:\home, and mklink back. I tried both mklink /D and mklink /J ( the /D switch works on a remote drive whereas the /J junction works on local NTFS disks only) and they both failed be recognized by WSL1. The bash yields Broken stdout/stdin upon launch

So OK, default home dir then. Bad luck for me.

Ubuntu 22

I just found out my cat /etc/lsb-release shows Ubuntu 18, which is the default distro installed on WSL1 I assume. I tried to install Ubuntu 22 from the Microsoft Store, after several wasted minutes (curse the slow Internet in Mainland!) it turns out for WSL2 only. Luckily the Windows Subsystem for Linux was successfully upgraded to latest version:

C:\> wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3570

the wsl --list --online commands stuck for a total of 10 minutes and returns nothing (curse the AS4134 163NET!)

Getting Python, Miniconda and Pelican

So linux distro setup was back to where started, I only have Python to mess with. Miniconda3 gets insalled easily, now that's a some progress. The static site generator I am using pip install pelican[markdown] finishes ok, the pypi was not blocked? Keke.

Then I typed make. It was not part of WSL1? Blaspheme!

Manually running python -m pelican.server, and voila! The Windows asks for firewall listening permission, granted, open up browser, BAM! My blog setup process is done and now I can write and tweak it on Windows.

Oh, and there's git config core.fileMode false needs to be checked!

Comments