Executing programs as root under Wayland

Wayland will refuse to execute any program executed as root. Therefore approaches like sudo gparted will fail. However, you can temporarily gain the right to access the Wayland server as root by running as non-root in terminal:

xhost +si:localuser:root

Afterwards you can start gparted as su eg. by running

sudo gparted

(Seen from https://www.scivision.co/gui-sudo-fix-connection-refused/)


Restoring dual boot of Windows 10 and Linux when Windows rewrites the Bootloader

Windows will try hard to remain the one and only operating system on your laptop. After a major update of Windows 10 my Ubuntu was no longer accessible as the Windows update process replaced the Grub bootloader with the Windows bootloader, booting only Windows.

The following sequence of command line parameters will restore Grub. These commands are valid if your are using BTRFS for your root partition, booting using EFI and using and NVMe drive.

First get a USB pen drive, download any recent Linux distribution, write it onto the USB pen drive and boot into the live system.

Afterwards you have to determine which is the drive Linux is installed on and your Linux root partition:

`fdisk -l`

which outputs on my system

Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F687432F-DB86-4B88-8CB2-DBB55255216B

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved
/dev/nvme0n1p3 567296 198828031 198260736 94,6G Microsoft basic data
/dev/nvme0n1p4 445640704 498069503 52428800 25G Microsoft basic data
/dev/nvme0n1p5 498069504 500117503 2048000 1000M Windows recovery environment
/dev/nvme0n1p6 198828032 426108927 227280896 108,4G Linux filesystem
/dev/nvme0n1p7 426108928 445640703 19531776 9,3G Linux swap

From this output the Linux root drive is /dev/nvme0n1p6 and the EFI partition is /dev/nvme0n1p1. Your output may vary.

Mount the existing root partition:

sudo mount -t btrfs -o subvol=@ /dev/nvme0n1p1 /mnt 

Mount all other linux system folders :

for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

Mount your EFI directory using the following command:

sudo mount /dev/nvme0n1p1 /mnt/boot/efi

chroot into your install

sudo chroot /mnt

Now that you are logged in your installation (not the Ubuntu Live) just do

grub-install /dev/nvme0n1

Replace `nvme0n1` with your main drive. After booting Grub should greet you again with Linux and Windows as options to boot.


Information derived from https://askubuntu.com/questions/655011/windows-10-upgrade-kills-grub-and-boot-repair-doesnt-help and https://askubuntu.com/questions/851862/can-not-reinstall-grub-after-windows-install-btrfs-subvolumes

Use SSH to connect to Docker Machine created instance

When one of my docker machine created virtual machines got changed by my cloud provider I was left in the dark. Out of a sudden docker-machine ssh no longer worked which comes at no surprise as the initially assigned IP address to me got changed.

In such a situation the SSH command line client has a way to specify the certificate to use when connecting to the VM:

ssh -i /home/john/.docker/machine/machines/T2fiware-postgres/id_rsa ubuntu@

Replace `T2fiware-postgres` with the name of your docker created machine, ubuntu with the user the certificate was issued to and obviously the IP address with the one of your VM.

End to cash

It’s unavoidable: Cash will come to an end. The Bank of Norway want’s to phase it out and so want’s the US government. It’s cash which enables the black market and as governments worldwide intensify their fight against tax evasion, cash is an impediment to that fight.


Savings are bad

In many western countries interest rates are on an all-time low. As it seems technology can no longer sustain the rate of growth we got so accustomed with. Technology in hand with automation have brought us a service market devoid of people, or at exceptionally high prices. Personal wages are riddled by tax wedges which steeply increase labor costs and put  pressure on to replace human workforce by machines and self-service. If you hear self-service, personal responsibility, or entrepreneurship, be warned that others are in effect behind your money.

Continue reading “End to cash”

Let’s shift to 25 hours

TL;DR: If we increase the time span of day from 24 to 25 hours, we could solve a lot of the challenges of the future.

Our society is totally obsessed by efficiency. We improve existing services to become more efficient in what we are already doing or use new methodologies to conceive entirely new services which disruptively change what we are accustomed to do in the past.

It is obvious that performing a task in an inefficient manner is waste. If you order an item from your preferred online retailer, why would you wait for three days delivery if this time could be optimized to get your parcels in just one day? Why involving the postman at all if a drone could deliver parcels right into your backyard? Why retaining the job of the packer who puts your purchases past the cashier in bags if you can do it on your own? Why retain the cashier at all?


If a job according to metrics can be accomplished within 30 minutes, it seems illogical to finish that job in an hour timespan.

What does this urge for efficiency buys us? Machines replaced that many workers previously necessary to build a tunnel, household appliances taking over the chores of hour-long domestic work, and of course computers automatizing dreary bureau tasks. ICT is the productivity boost and to a large extend accounts for economic growth since the late 80is until now [1]. With that excess of free time gained through automation it should be save to assume mankind to be bored out. In fact, that’s what John Maynard Keynes believed to become his grandchildren’s reality: a three hours workday.

Sure, this Utopia never became true. Instead we see unemployment rise with the effect that in socialist Europe fewer have to take care for an ever increasing mass of people incapable to make a living of their jobs. It’s true that productivity gains led to an overall decline in working hours/year but at the price of people being forced to work part time, requiring more but one job to make a living, and fewer people feeding more who live in increasingly dire conditions.

Contrary to this obvious principle, there are “jobs” which are hard to accomplish in any shorter time, like the time spent with your children, partner, or parents. The composer takes it’s time to come up with truly moving lyrics and the painter to finish his Magnum Opus, unless they will also be replaced by AI. In fact there are not that many jobs in the future save from being replaced by a robot.

Today we are all racing against the machines.

The reason for that all? Productivity gains are being harvested by only a fraction of the society.

Swim with the tides.

Fighting against change is futile. So instead of dreaming of the better past it might make more sense to anticipate the future and be it just for the sake of knowing. Let us assume that striving for productivity will increase and with the help of ICT-supported robots, people will become unemployed in masses. Machines don’t pay taxes, so fewer people will earn more, but also will have to work more to support the unemployed [2]. Those with a job  will be the ones which are still “productive” and working in the few jobs, which cannot be taken over by machines. The fate of those humans in the workforce will be to remain productive, efficient.

In the past, efficiency has been increased by doing the same (or more) with less. One constant has not yet put into question and that is time, namely the notion of a day, 24 hours from dawn, midday, sunset, night to another day. Living in a 24 hour day is so naturally that, despite many differences how me measure speed, weight, volume, … in different parts of the world, nowadays every agrees that the day is divided into 24 hours, 60 minutes, 60 seconds.

It’s this notion of a 24 hour day which will hold back those who will still have to rely on people doing their job and not been replaced by machines.

So instead of a 24 hour day (“sunday”), let’s make it a 25 hour day, a “longday”.


No, the earth will still rotate in (roughly) 24 hours around it’s axis, but with an additional hour gained, people will be able to consume, let’s say, 16 hours of leisure while working for 9 hours. That’s right, one more hour productivity while leisure will stay the same! In mathematical terms, workforce efficacy will raise from 8/24 (~0.333) to 9/25 (0.36). This will of course lead to the fact that longdays will get out of sync with sundays. Assuming that your regular workday starts at 8 in the morning, after a couple of days, you will rise in the late afternoon and go to bed when the sun will rise!

Taking a look at this new working reality, many consequences arise:

  1. End of traffic jams. As people will opt-in this new work plan at different times, people will rush to work at different times. Even though the future will bring us autonomous vehiles, if we continue to stick to a 24 hour work day this would still mean that the vast majority of cars will be needed between 7 to 9 in the morning and between 5 and 7 in the evening. With 25 hour workdays, traffic jams will be a thing of the past with commuters evenly distributed over the day.
  2. End to the distinction between free time and work. The notion of free time will be a thing of the past. Nowadays a simple look at the sky (day, evening/night?) or the calender (weekend?) will give you a notion wheather it should be save to call your colleague or if you are likely to disturb. With longdays this distinction is gone.
  3. No more closing times. As the number of people at work with others in their official leisure time will be evenly distributed around the 24 hour time frame, no one must be penalized. That means shops and service must be available 24 hours round.
  4. End of time zones. Time zones are a thing which make sense when you are living according to a 24 hour rhythm and doesn’t make sense outside these constraints.

What other effects to expect from the 25 hour day? The 25 hour day – Dystopia or does this concept have chance to become reality? Should it become reality at all?

[1] B. Miller und R. D. Atkinson, „Raising European Productivity Growth Through ICT“. The Information Technology & Innovation Foundation, Juni-2014.

[2] At least in socialist countries unless this principle will be decommissioned

Restore a Postgres Backup into a Docker container

At times, Docker can be mind-boggling, especially when you strive for doing things “right”, which means following the “everything is a container” approach.

Now and then you will have to get large amounts of data into your container like restoring a database backup into a Docker-container. The Internets are full with  good advice on how to do it (right), but given the combination of an out-of-docker database dump file and the intention to run a dockerized database with a data volume only container, the approach in this post was of help. I assembled the step-wise guide from the links in the footage, kudos goes to these authors.

Continue reading “Restore a Postgres Backup into a Docker container”