Patch Wine and supports both 64-bit and 32-bit
We can build Wine that supports both 64-bit and 32-bit.
The below shows the example that involves patch of a specific Wine version. Sometimes official or latest Wine just doesn’t work. And the patches can be found in the bug report attachment.
Download a patch from Wine bug report, and download the source code. Extract the source
tar xJf wine-4.2.tar.xz
patch -u -p1 < ../swshader_ivb.patch
To build Wine that can work on both 64-bit and 32-bit, we can follow this.
NVIDIA with Nouveau and Wine
I updated my old laptop HP Pavilion dv3 (2238tx) recently, which was bought in year 2010, installed with Arch Linux.
Because of Linux kernel version, the NVIDIA driver is not officially supported by Arch Linux (detail).
There are two options to resolve this: install (i) Nouveau or (ii) NVIDIA driver from AUR. The former is open source, the latter is closed source from NVIDIA official site. Furthermore, using the latter theoretically allows the usage of CUDA, which is important if I am using it to do some neural networks training.
Godot and hobby project
Game engine
Previously I found a game engine LOVE (Lua language). Then I planned to learn about it. But then I read about Godot, which uses GDScript with similar syntax like Python. So, I choose Godot over LOVE because I have better experience in Python.
I planned to work on edutainment project since long time ago. Since I have extra time recently, so I invested little time on my hobby project. Using Godot, I revived my old project.
Vivo Y17 and Wunderlist
Recently changed to new phone Vivo Y17. Installed all the apps needed. Then I discovered an issue with Wunderlist.
Wunderlist widget keep showing “loading”, and I cannot change the list to be viewed.
The reminder doesn’t show notification in time.
Then I tried to migrate Wunderlist to Microsoft To-Do, and it has same issue as well.
Searching the solution and I finally get this page.
To summarise the solution, go to Settings > Permission Management > Autostart, then enable Wunderlist or Microsoft To-Do.
Chinese (and CJK) fonts
I am using Arch Linux, and recently I found that my fonts are little different after upgrade.
In DBeaver, the monospace font shows this:

This causes the monospace doesn’t follow the same width. And I found that, the default “Monospace” doesn’t use DejaVu Sans Mono anymore after the recent upgrade.
After looking some solutions, I tried edit ~/.conf/fontconfig/fonts.conf according to this this one.
[code lang=text] monospace DejaVu Sans Mono [/code]
Script to notify myself
Sharing a simple script I recently used. Because recent development, I need to run a build command which needs about 2-3 minutes. I run it in the background so that I can continue my other work.
But switching the window in order to check whether the build is completed, it is frustrating. To make it easy, I wrote the following script,
[code lang=bash] #!/bin/bash
notify-send -t 1500 -i applications-utilities “$@” aplay /usr/share/orage/sounds/Knock.wav &> /dev/null [/code]
MacBook Air 11-inch (Late 2010) revive
Recently, I revived my old laptop HP Pavilion dv3, due to the need of second computer to do my research study.
Since it is revived, and works smoothly, I then revived a tablet which was not used, Samsung Galaxy Tab 10.1 (P7500). I flashed the AOSP 7.1.2 Nougat. And it is revived also. However, the hardware specification is too antique, it can neither install Google Chrome nor Firefox. Most of the apps failed to run. 😩
Bash history for each project
Previously, I tried to use zsh when I am working, so that my default bash history will not be filled with project related commands, especially git commands. Because some of my bash history are useful like ffmpeg related commands. So, I tried to distinct project work and non-project work with zsh and bash, so that they have different shell histories.
However, there are two problems when I use zsh,
- All my projects use the same zsh history. The old history may be lost if I have too many commands (depends on
HISTSIZEvariable). - zsh is slow with
gitauto-completion.
However, zsh has one thing better than bash, that is, auto-completion navigation. Let’s say your directory has various sub-directories, double tab will bring to directory navigation that can be controlled with arrow keys. This is useful for me to navigate to non-alphabetic directories, like the directory with CJK characters.
Rename files according to date
I recently wrote a Perl script, that renames the files in a directory according to the date, in the format “YYYYMMDD ##” where “##” is the running number.
Rationale
Because I used to download the photos using the mobile apps like Weibo or Twitter, however the file names are almost random. This made me hard to organize these photos on my computer.
The artists (or celebrities) usually share a set of their photos, so when I download these photos, the files should have mtime (modified time) in the correct order.
MySQL and PostgreSQL GUI tools
I am using Arch Linux, and recently there are some issues on MySQL Workbench and pgAdmin 4.
MySQL Workbench with the latest version 8.0.12 has issue to make connection through the SSH tunnelling. As a result, I have to downgrade to version 6.3.10. However, with the recent upgrade of icu package to 62.1, it breaks the MySQL Workbench 6.3.10. In order to solve this, I duplicate the following files,
[code lang=text] cp libicudata.so.62 libicudata.so.61 cp libicui18n.so.62 libicui18n.so.61 cp libicuuc.so.62 libicuuc.so.61 [/code]