11. June 2019

How to start D-Bus in Docker container

Many Linux applications require D-Bus which is not running by default in Docker containers.

When you attempt to start the application you might get the following error:

D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted

First of all you need to generate missing machine-id by command:

dbus-uuidgen > /var/lib/dbus/machine-id

The application will be able to start even when the daemon is not running.

To start the D-Bus daemon inside the container you need to run following command:

dbus-daemon --config-file=/etc/dbus-1/system.conf --print-address

Now the daemon is running and your application should be able to start.

27. April 2019

How to start TigetVNC server on port 5900

When you start TigerVNC server by following command:

vncserver

then it will automatically bind to port 5901.

When you want to start the server on 5900 then you need to type following command:

vncserver :0

This looks a little bit mysterious, but if you dig through the documentation you might find that there is the following mapping:

:0 -> 5900
:1 -> 5901
:2 -> 5902
:3 -> 5903
...

Now it’s clear that when you omit the parameter, it will default to code :1 which is mapped to the port 5901.

21. February 2019

How to run openSUSE for PowerPC64LE on CPU x86_64

First of all install required package for running ppc:

sudo zypper install qemu-ppc

Download the ISO built for PowerPC architecture (ppc64le). E.g. openSUSE-Leap-42.3-NET-ppc64le-Build0130-Media.iso.

Create file which will contain disk image:

qemu-img create suse.img 10G

Now, start the ppc64le virtual and boot from cdrom:

qemu-system-ppc64 -boot d -cdrom openSUSE-Leap-42.3-NET-ppc64le-Build0130-Media.iso -m 1024 -hda suse.img

After the installation you can simply run the installed system:

qemu-system-ppc64 -m 1024 -hda suse.img

Note: -m 1024 stands for “memory 1 GB”

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:

28. July 2018

Unable to shut down Windows on computer with Linux dual boot

After installing Linux in dual boot on the computer with Windows you may experience a strange problem. It’s no longer possible to shut down the computer from Windows. The computer immediately re-spawns to the Windows login screen.

The issue is most likely caused by booting Windows from the incorrect bootloader. If you have two partitions (sda1, sda2) on the system, make sure that you’re booting Windows from the one with the operating system.

Booting from incorrect partition could cause other strange errors, like problems with updating Windows. You can read more in the article: Failed to install Feature update of Windows 10, version 1803 on machine with Linux dual boot.