Loading Blog Search...

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:
else
exec /usr/bin/nsenter -t "$SYSTEMD_PID" -a /bin/login -p -f "$SUDO_USER"
fi
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: export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0

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
For whom would read a lot of PDF, there are obvious reasons to follow these tips for you. Before showing the evidences, let's have a look at Inkpad X default UI. After unboxing it, you could see the default calendar ScreenSaver, and Inkpad X provides a very convenient scheduler app. Unfortunately, the events added in scheduler won't appear in ScreenSaver. Good news is Inkpad X allows to change ScreenSaver.
Pressing the beautiful red button on top of Inkpad X would bring you to its default UI, with four items in left menu:
  • 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
The floating ball was used to take all screenshots here. All the screenshots are colorful, including DuoKan's reading interface, except for Koreader's. This is the first reason I recommend not using DuoKan when reading PDF. I guess Koreader pre-processed the PDF to greyscale and rendered better graphic effects comparing with DuoKan, side by side. Second reason is Koreader's PDF rendering is much faster.
DuoKan seems able to scan at backend to pickup books copied to Books directory when you connect Inkpad X to Windows PC. However, it didn't list all the books copied, while Koreader recoganized all of them except for AZW3 format. So I converted all AZW3 to Mobi so make Koreader to list all. This is the 3rd reason I don't like DuoKan for its weaker format support or whatever reason not listing copied books. A very different between Koreader and DuoKan/Kindle is the organization of books. Koreader does not reorganize books according to metadata in categories, instead, it just displays the books as how they are saved in file system structure. This sounds a bad thing especially when the books are not well organized before hand. Calibre saved my day and make it even better with its customizable file system structure when copying books into devices based on embedded metadata. I tend to use Inkpad as pure reader and not use other apps or take notes on it, which could be killer app for many though. For my kids, dictionary is the key to learn. But Koreader v2020.08.1 dictionary does not work out of box. After asking Koreader's developers, it's a bug causing downloaded dictionary uncompressed. The solution working for me is to uncompress the dictionary downloaded at koreader/data/dict. Now my kids are happy.