29. September 2021

Eclipse error AutoRegisterSchemeHandlersJob AppData\Local\Temp\jna Can’t find dependent libraries

Windows users might experience a very strange errors when starting Eclipse:

An internal error occurred during: "AutoRegisterSchemeHandlersJob".
C:\Users\Vrtižer\AppData\Local\Temp\jna--78847768\jna6432107568184066435.dll: Can't find dependent libraries

It’s possible to continue with the error, but the majority of Eclipse plugins won’t work.

When you look closely at the path you can see there is a special character in the word ‘Vrtižer‘. This special character with a combination of Windows feature ‘Use Unicode UTF-8 for worldwide language support‘ causes the issue.

There are several ways how to workaround the problem:

#1 Change the user environment variable TMP

Open Start, type: environment

Select Edit system environment variables

Click Environment Variables…

Select User variable with name TMP and change it to path without special character, the path must exist.

Click Ok. Start new Eclipse.

Note: the default values is

%USERPROFILE%\AppData\Local\Temp

#2 Remove the user environment variable TMP

If you do not have a special need for user-specific TMP, you can simply delete it. The system will default to System Temp.

Steps are the same as in #1, just instead of Edit, click Detete to remove the variable

Click Ok. Start new Eclipse.

#3 Disable Windows feature ‘Use Unicode UTF-8 for worldwide language support’

Open Start, search for Region settings, click Additional date, time & regional settings, click Change system locale…

Uncheck Use Unicode UTF-8 for worldwide language support, click Ok and restart the computer.

Note: disabling this setting might affect communication between PowerShell and Python scripts in the case of strings with diacritics.

Update: Issue reported to Eclipse.org.

21. September 2021

How to install Podman on Linux Mint 20

Podman binaries for Linux Mint / Ubuntu are hosted by OpenSuse.org.

You need to add the repository to /etc/source.list.d. Common instructions for Ubuntu might not work, because VERSION_ID for Mint is not the same as for Ubuntu.

Instructions for Linux Mint 20.2 from Ubuntu 20.04 repository:

export VERSION_ID="20.04"
sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
sudo wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | apt-key add -
sudo apt update
sudo apt install -y podman

Example of running container for IoT development:

If you’d like to develop for ESP32 chip connected to /dev/ttyUSB0 using C++ or Rust language, just start the container:

podman run --device /dev/ttyUSB0 -it docker.io/espressif/idf-rust-examples

25. June 2021

How to disable automatic screen dimming on Windows Lenovo T14 with Intel UHD Graphics

Windows 10 on Lenovo T14 with Intel UHD Graphics has one very annoying behavior. The system automatically dims dark screens like a terminal window which becomes barely readable and the system brightens white screens like a web browser.

Here’s how you can disable this automatic dimming.

Press Windows key and type: Intel Graphics Command Center

Click icon with 4 squares a.k.a. System. Select Power tab, scroll down to Power Settings, uncheck Display Power Savings.

One other option is to dial down Power Efficiency to value like 1.

Option Enhanced Power Saving – Dims bright images for power saving – does not have effect.

25. May 2021

Windows Terminal – How to add a custom shell to dropdown menu with JSON Fragment Extension

Windows Terminal allows you to use and manage shells for CMD, PowerShell or WSL2 in one window.

Windows Terminal also allows registering custom shells to the application. One option is to edit the profile manually via Settings.

It’s also possible to use the so-called JSON Fragment Extension which lets you drop a JSON file into a directory and Windows Terminal will load information from the file. The major advantage is that you can move the file between computers without worrying about damaging HJSON format of the original configuration file.

The instructions on the Microsoft site are not very clear on how to add the JSON and I had to use debugger to determine the proper location.

First of all create a directory for your application (e.g. IPython) with following PowerShell command:

mkdir "$env:LocalAppData\Microsoft\Windows Terminal\Fragments\IPython\"

Open a file with .json file extension and specify there following content (e.g. fragment.json with full path “$env:LocalAppData\Microsoft\Windows Terminal\Fragments\IPython\fragment.json”):

{"profiles":
  [
    {
      "name":"IPython",
      "startingDirectory":"C:/",
      "commandline":"ipython"
    }
   ]
}

Save the file, close Windows Terminal, open new Windows Terminal, and IPython will be visible in the list of available terminals.

Select the IPython and you’ll get a new tab with the interpreter.

20. May 2021

Xcode: How to quickly filter only errors from the build

The best software practice tells you that you should not have build warnings in the projects. It’s easier to spot a potential problem.

Sometimes it’s necessary to import larger portion of code which generates many warnings and it’s very hard to find the error which blocks compilation of iOS or macOS application in Xcode.

The quick way to filter out warnings and see only errors in Xcode is to click X icon at the bottom of Issue Navigator with the title “Show only errors”: