Wednesday, September 07, 2022

Run lz4 compression in parallel using GNU parallel

I like compressing my SQLite DB as separate lz4 files. I use the below commands to compress them in parallel using the lz4 utility.
parallel lz4 -12 -m ::: *.db
You can install GNU parallel on Ubuntu using the below command
sudo apt install parallel
Note: Passing -m option to the lz4 utility is essential to avoid stdout outputs.

Wednesday, March 16, 2022

Fix gtest linker error on Windows

If you are getting the below-mentioned linker error with Google gtest on Windows MSVC, the solution is to define the macro within your project file/Makefile.
Linker error:
error LNK2001: unresolved external symbol "class testing::internal::Mutex testing::internal::g_gmock_mutex" (?g_gmock_mutex@internal@testing@@3VMutex@12@A)
Macro to declare within your project file/Makefile:

Tags: gtest, linker error

Friday, May 07, 2021

Fix slow VNC connection to headless Linux server with intel GPU

Back in 2018, I had observed that VNC connections to headless Ubuntu 16.04 server (the one without any monitors connected) was extremely slow and laggy. After bunch of experiments, I figured out that the problem was caused due to missing Xorg.conf template

Below solution was tested with Ubuntu 16.04, I am not sure if same problem is still observed with newer Ubuntu versions


Thursday, May 06, 2021

Ubuntu Force apt to use IPv4

On U16.04, I found that apt took really long time to update over IPv6.

Enter below command to force the use of IP v4 for apt

echo "Acquire::ForceIPv4 "true";" | sudo tee /etc/apt/apt.conf.d/99force-ipv4 > /dev/null

Wednesday, May 05, 2021

How to install Dropbox on Linux with single sign on (SSO)

I had to do mini research to be able to successfully install dropbox on Linux with single sign-on. Here are the steps I followed.
  1. Close all browsers windows.
  2. Open fresh browser window, visit to and login using SSO.
  3. Once logged-in, install dropbox package as usual. I used below steps
  4. Open Dropbox from the installed program files, click OK to install dropbox daemon process.
  5. It should open your browser once again and ask for linking confirmation. Press OK.


  • dropbox linux enter linking code
  • Entering Linking Code After Dropbox Install on Ubuntu/Linux

Wednesday, April 28, 2021

Script to disable automatic updates on Ubuntu 16.04

I work on Ubuntu with some custom Kernel extensions which needs to be built upon each Kernel updates. Since, it is a dev. environment, sensible option was to lock the packages which I was using for development.
Below script disables automatic package updates on Ubuntu 16.04.x
Note: Do NOT disable security updates on production system!

Wednesday, March 31, 2021

qDebug log with and without spaces in a single sentence

Below sample shows how spaces can be disabled/enabled in middle of a single qDebug log.
Keyword: qDebug disable space in middle of log