11. 9. 2023
WSL1 -> WSL2
Following notes are for my ‘WSL1/Debian cloned to WSL2/Debian’ install.
Recommendation: 1st clone the 11 and then upgrade the clone. Make sure the clone is WSL version 2 (otherwise expect problems with usrmerge).
In 11:
Install ‘usrmerge’ in 11. As soon as it is installed it will run and warn that this is one way only process (can’t be reversed automagically).
apt install usrmerge
# and say yes
ls -l / > state2.txt
cat state2.txt | grep -- "->"
should return bunch of symlinks now
bin -> usr/bin
lib -> usr/lib
lib32 -> usr/lib32
lib64 -> usr/lib64
libx32 -> usr/libx32
sbin -> usr/sbin
Now upgrayedd:
Probably delete anything in /etc/apt/sources.list
sudo vi /etc/apt/sources.list
For my WSL2 needs it may look like:
deb https://deb.debian.org/debian/ bookworm main
deb https://deb.debian.org/debian/ bookworm-updates main
deb https://deb.debian.org/debian/ bookworm-proposed-updates main
deb http://security.debian.org/debian-security bookworm-security main
deb https://deb.debian.org/debian bookworm-backports main
then
sudo apt update && sudo apt dist-upgrade -y
few months later, cleanup
sudo apt autoremove && sudo apt autoclean
optionally add something like
# info
cat /etc/*-release | grep PRETTY | cut --delimiter="\"" -f2 | lolcat
to .zshrc or .bashrc.
WSL1 -> WSL1 ?
If WSL1 to WSL1 is needed, the workaround could be to block usrmerge before update
https://askubuntu.com/questions/1358789/is-it-possible-to-prevent-usrmerge-package-installation-on-systems-upgraded-from
https://github.com/microsoft/WSL/issues/8927
Two files in /etc/apt/preferences.d
pin-usrmerge holds
Package: usrmerge
Pin: version *
Pin-Priority: -1337
and the same for pin-usr-is-merged
Package: usr-is-merged
Pin: version *
Pin-Priority: -1337
screenshot of WSL1/bookworm
https://i.imgur.com/Qx7xIg8.png
11. 9. 2023
Export and Import under different name
https://superuser.com/questions/1589877/how-do-you-clone-a-wsl-distro
From powershell
wsl.exe --export OriginalDistributionName FileName
wsl.exe --import ClonedDistributionName InstallLocation FileName
wsl --distribution ClonedDistributionName
setup a default user if the new instance starts with root
https://superuser.com/questions/1566022/how-to-set-default-user-for-manually-installed-wsl-distro
Create
with
restart wsl
6. 9. 2023
_ _ _ __
___| |__ ___ __ _| |_ ___| |__ \ \
/ __| '_ \ / _ \/ _` | __| / __| '_ \ \ \
| (__| | | | __/ (_| | |_ _\__ \ | | |/ /
\___|_| |_|\___|\__,_|\__(_)___/_| |_/_/
The only cheat sheet you need
Unified access to the best
community driven documentation
repositories of the world
https://cht.sh/
Examples:
curl chs.sh/:help
curl chs.sh/:intro
curl cht.sh/bash+while+loop
There is also a client script with ZSH Tab completion and more.
5. 9. 2023
multiclick way, set to anything
https://www.ghisler.ch/board/viewtopic.php?t=30708
- create button with cm_SetAttrib command
- select all files
- click on created button
- select Check plugin attributes
- click on More attributes
- choose:
Plugin: tc
Property: comment
Value: write your comment here
- click OK
My button would be:
Command: cm_SetAttrib
Icon file: %COMMANDER_PATH%\..\ico\papirus\commix.ico
tooltip: change comments
Comments are stored in hidden text file named ‘descript.ion’ and will persist when file is copied (with total commander i guess). Hotkey for editing single file is CTRL+Z.
singleclick way, set to something predefined
https://www.ghisler.ch/board/viewtopic.php?t=80031
a button like:
Command: OPENATTRIBUTES=ok
Icon file: %COMMANDER_PATH%\..\ico\actions\checkbox.ico
tooltip: set comment to <<<
assuming there is ‘files/change attributes’ setting saved with name ‘ok’.
This is what chatGPT has to say about descript.ion:
A “descript.ion” file is typically a plain text file used to store descriptions or metadata for files in a specific directory or folder. These description files were commonly used in older operating systems like MS-DOS and some early versions of Windows, such as Windows 3.x and Windows 95. The purpose of these files was to provide additional information about the files in a directory, such as a brief description, author, or any other relevant details.
Each line in a “descript.ion” file corresponds to a file in the same directory, and the line contains the filename along with its associated description or metadata. For example:
file1.txt This is the first file.
file2.jpg A picture of a beach.
file3.exe Important application.
In this example, “descript.ion” is the name of the description file, and it provides descriptions for three different files in the directory.
It’s important to note that the use of “descript.ion” files has largely become obsolete in modern operating systems and file management systems. More advanced metadata and file attributes are available in contemporary file systems, making it easier to store and retrieve information about files without the need for separate description files.
1. 9. 2023
Organic Maps is one of a few applications nowadays that supports 100% of features without an active Internet connection. Install Organic Maps, download maps, throw away your SIM card
https://organicmaps.app/
https://news.ycombinator.com/item?id=37347447