Li-Zhao's HomePage
This is a memory book for me, so, miscellaneous topics can be found here.
Have fun!

Wednesday, January 13, 2021
CLI tool to manage Ubuntu network
Seems Ubuntu@WSL2 has problem on DNS. I need to use nmtui to manual configure DNS server time to time.
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Posted by
Li-Zhao 李钊
at
11:28 AM
0
comments
Links to this post
Wednesday, October 28, 2020
Run snap in WSL2
To use snap in WSL2, we need systemd enabled, following instruction at
https://github.com/diddledan/ubuntu-wsl2-systemd-script/. However after enabling
systemd using the script, visual studio code can't open terminal anymore. There
will be a fix. Before you receive the fix, there is a workaround, to change the
last several lines of to:
My MobaXterm also can't open WSL session. Not sure whether it is caused by above scripts. A workaround is to change default shell to cmd/powershell and run bash from there.
To run GUI apps from WSL, we could use vcxsrv/x410 or MobaXterm. vcxsrv is more bugful though. Due to WSL is using different network interfaces, we can set DISPLAY by adding the line to ~/.bashrc:
else
exec /usr/bin/nsenter -t "$SYSTEMD_PID" -a /bin/login -p -f "$SUDO_USER"
fi
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Posted by
Li-Zhao 李钊
at
3:11 PM
0
comments
Links to this post
Wednesday, September 02, 2020
New Xiaomi Moann Inkpad X
Inkpad X was released it's new e-ink reader Inkpad X at July, 2020. The specs listed is:
It costs me RMB 1699 (340 SGD) to buy from Taobao on 7, Aug. Due to Covid-19, air shipment is unavailable to ship to Singapore and sea shipment took three weeks with higher costs (due to GST tax). Inkpad X features a large 10 inch e-ink screen with 1600x1200, which is not unpar with Kindle technically. But be honest, I can't differentiate it much from 50cm away, my usual reading distance. Quite satisfied with the overall building quality and its powerhouse rendering books, especially its PDF handling much better than Kindle Oasis. For Android 8.1 under-hood, it theoretically supports almost all apps. But after two days use, I resisted attractions to use them and here you go some tips to make it a better tool for you, who just want to indulge yourself in reading.- Use Calibre
- Install Koreader
- Solve Problems
- Reading (this is to use DuoKan, the default reading app for Inkpad X)
- Scheduler
- Applications, listing all apps installed. I loaded Wechat Reader, Kindle, Overdrive to borrow NLB library books, KOReader. Please be noted the floating ball app I enabled to make navigation handy.
- Settings
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Posted by
Li-Zhao 李钊
at
9:13 AM
0
comments
Links to this post
Tuesday, May 07, 2019
AMD emulator on Hyper-V
AMD CPU based Android emulator is working according to the blog. However, when I tried it with Android Studio 3.4, it kept crashing with error messages like:
Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: WHPX: Failed to exec a virtual processor
Luckily, after my Windows was upgraded to insider preview version 18890.1000, the emulator is working now. And it's a surprise to be much faster than emulator on my old i7 CPU.
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Posted by
Li-Zhao 李钊
at
12:27 PM
0
comments
Links to this post
Saturday, March 30, 2019
Visual Studio Xaramin debug with Bluestacks
Got a AMD Lenovo A485 with Windows 10 Home, which does not have Hyper-V. To use it for Visual Studio Xamarin experiments, I want a native Android emulator. Although it can install AMD native Android emulator, with hypervisor windows platform enabled, it does not allow other VMs to be installed, e.g., using Virtualbox. Luckily, Android VMs on Virtualbox or VMWare with TCP/IP based remote ADB support are able to act as Emulator. Bluestacks is another choice.
- Install bluestacks
- Enable ADB in bluestacks, this will open 5555 port to connect from Visual Studio
- Goto Android install directory/android-sdk/platform-tools, run
- For Visual Studio Xamarin Android project, you then could find a new Android device to deploy to.
Monday, January 09, 2017
BPMN and Activiti
A quick guide: http://www.nurkiewicz.com/2011/01/activiti-processes-and-executions.html
BPMN is easy to be transformed to petri net for formal analysis.
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Posted by
Li-Zhao 李钊
at
11:14 AM
0
comments
Links to this post
Saturday, April 23, 2016
Fix HDMI audio for ubuntu/NUC
My NUC is hooked to Philips 221E via HDMI cable. The audio is fine if the monitor is never turned off. Once the monitor reboots, the distorted audio really make it unusable.
To solve the problem at ubuntu, append 'tsched=0' to 'load-module module-udev-detect' at /etc/pulse/default.pa