21. February 2022

Podman: Could not open ‘edk2-aarch64-code.fd’

It’s possible to use brew to install Podman on Apple Silicon (M1). The installation gets slightly more complicated when the user wants to use Homebrew installed in user’s home directory.

Problem #1 – gvproxy

Command:

podman machine start

Error:

Error: unable to start host networking: "could not find \"gvproxy\" in one of ....

Solution: add path to Podman’s helper binaries stored in bin and libexec to ~/.config/containers/containers.conf

[engine]
  helper_binaries_dir=["/Users/georgik.rocks/brew/Cellar/podman/4.0.3/bin","/Users/georgik.rocks/brew/Cellar/podman/4.0.3/libexec"]

Problem #2 – edk2-aarch64-code.fd

Command:

podman machine start

Error:

INFO[0000] new connection from  to /tmp/podman/qemu_podman-machine-default.sock
Waiting for VM ...
qemu-system-aarch64: -drive file=edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on: Could not open 'edk2-aarch64-code.fd': No such file or directory
Error: dial unix /tmp/podman/podman-machine-default_ready.sock: connect: connection refused
ERRO[0003] cannot receive packets from , disconnecting: cannot read size from socket: EOF
ERRO[0003] cannot read size from socket: EOF

Solution: Open file ~/.config/containers/podman/machine/qemu/podman-machine-default.json and change to /Users/USERNAME/brew/Cellar/qemu/6.2.0_1/share/qemu/edk2-aarch64-code.fd

"file=/Users/georgik.rocks/brew/Cellar/qemu/6.2.0_1/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on"

After these changes Podman should start without problem.

10. January 2019

IntelliJ Idea vertical text block selection

It’s easy to create vertical text block selection in IntelliJ Idea.

  • macOS: Option + Command + Left click and drag mouse
  • Windows 10 – Creators update: Click Mouse wheel and drag
  • Older Windows: Alt + Left click and drag mouse
  • Linux: Click Mouse wheel and drag
  • Without mouse: Open Edit menu and select Column Selection Mode (Alt+Shift+Insert), then use Shift + Arrows to select a block

You’ll select vertical text block:

8. September 2018

How to disable autocorrection in Outlook on macOS

Outlook on macOS sometimes performs autocorrection when user types the text.

For an example when user write “Traban the best”. Then the text is corrected to “Trabant he best”.

The problem is caused by two features working together: Automatic detection of language and Check spelling as you type.

When Outlook encountered an email written in English which contained special characters (e.g. names in Recipient field) it decides to switch the language of the document to other language even though user writes in English.

There are two ways how to get rid of this annoying behavior. The first will work for just one email, the second will work for any email.

1. How to turn off autocorrection in one email.

When composing message switch the Options tab, click Language icon.

Check the first checkbox “Do not check spelling or grammar” and click Ok.

This will affect currently opened email.

2. How to turn off autocorrection in all emails.

Select menu Outlook, click Preferences.

Click Spelling & Grammar.

Uncheck checkbox “Check spelling as you type

Quit Outlook and start it again.

25. August 2018

How to switch between keyboard layouts on macOS by using keyboard shortcut

When you have two or more keyboard layouts on macOS (e.g. US, Dvorak) then the only way how to switch between them is to click the menu in the upper right corner. It’s not very convenient. On Windows you can use Alt + Shift to switch the layout.

The keyboard shortcut to switch between layouts is by default disabled. You have to enable it.

Go to System Preferences, click Keyboard, click tab Shortcuts, click item Input Sources, check Select next source in Input menu.

Now you can switch keyboard layout by Control + Option + Space

You can also edit the shortcut and use your own.

22. June 2018

How to display build log in Xcode

Xcode has a very minimalistic design when working with build errors. Sometimes it’s necessary to get more information about a failed build and it might not be obvious how to do it.

The answer is simple and it’s one click away.

Click on the last icon (text bubble) in the top left panel.

Now select the build and you’ll see all build information.