Category: Linux
-
Xrandr framebuffer and per-display scaling
Ubuntu 18.04 LTS came out recently with Gnome desktop as default. Unfortunately even in 2018, it won’t remember the external monitor positioning after reboot and has no support in display settings to set per-display scaling. Year of the Linux desktop, anyone? Xrandr is a powerful Linux tool to manipulate displays. Unfortunately, the man page is…
-
Running multiple PHP versions and compiling from source
We had a peculiar situation where both PHP5 and PHP7 were needed at the same time on a FreeBSD server. It was also prohibitive to get root or sudo access on the managing account. The solution was to compile PHP from source with fpm, run fpm on a UNIX socket and wire the specific domain…
-
Centos Docker unable to unmount on stop/start
Error looks something like Error response from daemon: driver “overlay” failed to remove root filesystem for 805c245dad451542b44bb1b58c60887fa98a64a61f2f0b8de32fa5b13ccc8ce4: remove /var/lib/docker/overlay/8f666b802f418f4a3dc4a6cafbefa79afc81491a5cb23da8084dd14e33afbea0/merged: device or resource busy It usually appears when stopping and starting a container. It results in Docker container not being able to start or starts in a weird dead/removed state. Issue is presumably fixed in Centos…
-
Lib packaging for your own repo
This is a note to self about the release procedure and distro packaging of a development library. This instructions expect aptly and createrepo to be preinstalled on your repo server together with a valid GPG key. Packaging a .deb 1. Checkout the release tag and build the deb according to README. Each build should be…
-
Bashmagic collection vol1
Keep only last X lines of a file (shrink). echo "$(tail -n 10000 huge.log)" > huge.log Deploy maven artefact to a specific repo without specifying it in pom.xml (format repoId:default:repoUrl). Repo should be specified in your .m2 settings.xml with any necessary credentials. mvn deploy -DaltDeploymentRepository=repo.mydomain.com.my.releases::default::https://repo.mydomain.com/repository/maven-my-releases/ One liner to set password for default PostgreSQL user after…
-
Oh FileZilla…
I have encountered a weird problem when connecting to our FreeBSD server with FileZilla over SFTP. Either with password or key authentication I would get: Error: Server sent disconnect message Error: type 2 (protocol error): Error: “Too many authentication failures” So let’s turn on debugging shall we? Trace: Pageant is running. Requesting keys. Trace: …
-
pgadmin4 on Fedora 25
wget https://download.postgresql.org/pub/repos/yum/9.6/fedora/fedora-25-x86_64/pgdg-fedora96-9.6-3.noarch.rpm sudo dnf install pgdg-fedora96-9.6-3.noarch.rpm sudo dnf install pgadmin4-v1 sudo systemctl start pgadmin4-v1 You can now access the web interface at http://localhost:5050. Unfortunately the standalone app does not currently work due to a bug in pgadmin4 package. Fortunately the pgadmin4 standalone app is just a web wrapper so you are not missing much. Cen…
-
Fedora 25 on Lenoyo Y50
Everything except WiFi worked out of the box. To get the WiFi working: sudo dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-25.noarch.rpm sudo dnf install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-25.noarch.rpm # The rest sudo dnf install kernel-devel broadcom-wl akmod-wl akmods sudo akmods sudo reboot Taken from here. In your BIOS make sure you disable Secure Boot. Not UEFI, not Legacy mode, specifically the switch…
-
OJDBC7 in a Docker container? Prepare for trouble
Scenario: A JDK8 Docker container using OJDBC7 to connect to the database. Sounds simple enough, what could go wrong? Simptoms: Connecting to the database randomly takes several minutes, fails with a weird SqlRecoverableException: no more data to read from socket or just works fine as if there is no problem. The same Docker image also…
-
Fedora 24 XFCE pains and gains
I recently installed Fedora 24 XFCE on my brand new Entroware Apollo, a Linux friendly laptop. Here is a list of problems I encountered during my first week of use. While most of these problems had a solution with a bit of googling, non-tech savvy person would have severe problems solving them. PAINS System completely…