Use Lightroom on a mapped network drive (on Linux with VirtualBox)

If you try to open a catalog stored on a network drive, Adobe Lightroom will complain about “Lightroom can not be opened on network volumes, removable storage or read on read only volumes.” You can easily overcome this by assigning the network drive to a drive letter using the subst command:

C:\Windows\System32\subst.exe L: \\ERITHACUS\IMAGES

This is especially useful if you want to run Lightroom on Linux in a virtual Windows machine with VirtualBox, but want to keep your photos on a mounted drive (in my case /media/simon/IMAGES).

Setup folder sharing in VirtualBox

First you need to add your mounted image folder to VirtualBox as a shared folder:

Setting up folder sharing of our photos in VirtualBox on Linux Mint.
Continue reading “Use Lightroom on a mapped network drive (on Linux with VirtualBox)”

Create responsive images on the fly with php and Imagick

To improve paging loading performance across multiple devices, web developers can provide each image in different resolutions using the srcset attribute and let the browser choose which one to load e.g.:

// on the page, where we want to display the image e.g.,
// index.php
<figure><img src="images/photo-1200.jpg"
    srcset="images/photo-1200.jpg 1200w,
        images/photo-1024.jpg 1024w,
        images/photo-800.jpg 800w,
        images/photo-600.jpg 600w" width="1200" height="800">
    <figcaption>the description of the photo</figcaption>
</figure>
Continue reading “Create responsive images on the fly with php and Imagick”

KEF LSX II on Linux: USB audio (IEC958) not loud enough

If the KEF LSX II speakers are connected to your Linux (Mint) PC via Digital Output (USB audio) instead of WiFi and the audio volume is not loud enough, it might be, that the gain of the internal sound card of the LSX II is set too low:

Screenshot showing the internal sound card of the LSX II speaker set to only 25%.
Continue reading “KEF LSX II on Linux: USB audio (IEC958) not loud enough”

How to enable developer mode on a Samsung tablet

  1. Open Settings, scroll down to the end of the list and tap About tablet:
settings screen
Continue reading “How to enable developer mode on a Samsung tablet”

Vector tiles with PostGIS, PHP and OpenLayers

This is an example about how to create vector tiles with PostGIS 3.3 (and PostgreSQL 15.3), serve them with PHP 8.1 and use them in OpenLayers 7.5. In contrast to the few tutorials available on the internet, it not only uses the latest PostGIS version 3.3, which further simplified the generation of vector tiles by introducing the new function ST_TileEnvelope, but also shows the use case, when you want to create the tiles in a projection other than the default Spherical Mercator coordinate system (EPSG:3857).

Screenshot of the Firefox browser displaying the production regions served as vector tiles.
The production regions of Switzerland rendered with OpenLayers. The vector tiles are created on the fly with PostGIS and php. The clipped tile boundaries are shown on purpose.
Continue reading “Vector tiles with PostGIS, PHP and OpenLayers”

How to copy EXIF tags from XMP to NEF with ExifTool

Adobe Lightroom only writes changes to Metadata such as geolocation into the XMP sidecar files and not directly into the EXIF tags of the image. If you add coordinates via the map module, then you will need to copy that information from the sidecar files back into your raw files (in my case Nikon NEF). With the excellent ExifTool, this is pretty simple and straightforward:

$ /pathToExifTool/exiftool -tagsfromfile ./%d%f.xmp -ext NEF .

Nikon D800 questions

Google has a new experimental feature that proposes content for your website based on search queries that might not have good enough results. For this website and the category photography, it suggests to answer the following questions:

Continue reading “Nikon D800 questions”

Multiple OCI8 and PHP versions in parallel

You can easily switch between multiple versions of PHP with:

sudo a2disconf php8.1-fpm
sudo a2enconf php8.0-fpm
sudo systemctl reload apache2

But if you installed the Oracle oci8 extension, you will probably run into the error, that it can not be loaded when switching to the older php version: Unable to load dynamic library 'oci8.so'

This happens, because pecl uninstalls the previous oci8 version automatically unless you explicitly say not to do so when installing:

# NOTE: PECL removes /usr/lib/php/xyz/oci8.so from non-active php versions,
# if you want multiple installations of php with oci8 in parallel, you need to set the php_suffix and prevent other oci8 version from being uninstalled with:
sudo pecl -d php_suffix=8.1 install oci8; sudo pecl uninstall -r oci8
sudo pecl -d php_suffix=8.0 install oci8-3.0.1; sudo pecl uninstall -r oci8

# instead of just installing latest version with
sudo pecl install oci8

Black screen after updating nvidia driver

Updating the nvidia-driver on Linux (Mint) can lead to a black screen after boot. Here is how you can quickly revert to the previous working version:

Press Ctrl + Alt + F1 and log into a the virtual console with your username and password (If that does not work, boot first into recovery mode, then resume boot and then log into the console):

# list available nvidia drivers
$ ubuntu-drivers devices

# install last working driver from the list
$ sudo apt install nvidia-driver-520

How to use a YubiKey for two-factor autenthication on Linux Mint

This post will show you how to setup and use a YubiKey and the Yubico Authenticator application to sign in to a Microsoft Azure Cloud Account using Linux Mint 20 without the need for the Microsoft Authenticator being installed on your mobile phone:

Yubico Authenticator desktop installation

1. Download and install the Yubico Authenticator AppImage:

# install dependency first
$ sudo apt install pcscd
$ sudo systemctl enable --now pcscd

# download latest version with curl
$ cd  ~/Downloads
$ curl -L -O -J https://developers.yubico.com/yubioath-desktop/Releases/yubioath-desktop-latest-linux.AppImage

# make executable
$ chmod +x yubioath-desktop-latest-linux.AppImage

# extract icon, which we can use for the menu item below
$ cp yubioath-desktop-latest-linux.AppImage temp.7z
$ file-roller --extract-here temp.7z 

# move to /opt/yubico
$ sudo mkdir /opt/yubico
$ sudo mv yubioath-desktop-latest-linux.AppImage /opt/yubico/
$ sudo mv temp/com.yubico.yubioath.svg /opt/yubico/
Continue reading “How to use a YubiKey for two-factor autenthication on Linux Mint”