Carrying Photo Metadata from Darktable to Piwigo

Darktable exports photo fields to metadata as follows (as reported by exiv2 pr -pa {file}.jpg):

Darktable title -> Xmp.dc.title
Darktable description -> Xmp.dc.description
Darktable tagging section -> Xmp.dc:subject (as a comma-separated list)

Unfortunately, Piwigo does not read XMP metadata so only the description is available as Exif.Image.ImageDescription. IPTC is required for the title and tags. Darktable does not export IPTC, but can be scripted to copy XMP tags to IPTC. See instructions here: https://discuss.pixls.us/t/name-description-and-keywords-are-not-recognized-by-shutterstock/6726/26

and source code here: https://github.com/chrik5/lua-scripts/blob/exiftool/contrib/exiftool_export.lua

In Darktable, using exiftool on export from above, check enable exiftool, set options to -@ and create file xmp2iptc.txt with the following contents:

-XMP-dc:Subject > IPTC:Keywords
-XMP-dc:Description > IPTC:Caption-Abstract
# -XMP-dc:Title > IPTC:ObjectName

(uncomment out the last line if you want to use the Title in Darktable rather than the filename Piwigo uses by default; and update use_iptc_mapping array below)
Set this file as Argumentsfile.
Then export the files from Darktable.

Using Piwigo plugin LocalFiles Editor add these lines to local config file local/config/config.inc.php:

// use_iptc: Use IPTC data during database synchronization with files
// metadata
$conf['use_iptc'] = true;
// use_iptc_mapping : in which IPTC fields will Piwigo find image 
// information? This setting is used during metadata synchronisation. It 
// associates a piwigo_images column name to a IPTC key 
// See https://exiftool.org/TagNames/IPTC.html 
// and http://piwigo.org/doc/doku.php?id=user_documentation:metadata&s 
$conf['use_iptc_mapping'] = array(   
  'keywords'        => '2#025',
  'comment'         => '2#120'   

From this point on, you’ll only have to remember to activate exiftool on export in Darktable and Piwigo will do the rest.


Comments (0)


Ubuntu 18.04 Slow

On two new Ubuntu 18.04 installations, internet access was extremely slow on the first access of a website. I eventually tracked it down to IPv6 DNS, for instance:
dig slashdot.org A
would respond immediately, but
dig slashdot.org AAAA
would hang for a while then return
;; connection timed out; no servers could be reached
I checked the name servers returned by my ISP that my router was using and they worked fine. It was only when using the default DNS returned by my router’s DHCP that it hung. The reason for this was that IPv6 was disabled at the router, a NetGear R6700v2. To fix, log in to the router’s administration web page and go to Advanced -> Advanced Setup -> IPv6 and change Internet Connection Type from Disabled to DHCP.


Comments (0)


Install Ubuntu 18.04 on Thinkpad T560

Install synaptic:
sudo apt install synaptic

install pCloud from pcloud.com
Add synced directory pCloudDrive/sync -> ~/pcloud-sync

Download the KeePassX 0.4 .DEB from https://launchpad.net/ubuntu/xenial/amd64/keepassx/0.4.3+dfsg-0.1ubuntu1
sudo dpkg -i keepassx_0.4.3+dfsg-0.1ubuntu1_amd64.deb
sudo apt --fix-broken install
To prevent it from being upgraded to version 2, in Synaptic, select keepassx and, from the menu, select “Package” -> “Lock Version”. Also make sure Software Updater isn’t set to automatically install updates, as it does not respect the version lock.

Sign in to Firefox. If the menu is missing, hit F10 and select View -> Toolbars -> Menu Bar and Bookmarks Toolbar.

Use Synaptic to load these packages:
kvpm (replaces system-config-lvm, which is not available for Ubuntu 18)
gnome-raw-thumbnailer (to view .CR2 file thumbnails, also view in Files with zoom of 150%)

Copy the /etc/group entry for ds411p2 from another machine that already has it.

Add an entry for the NAS to /etc/hosts, of the form: ds411p2

Install NAS credentials
From another NAS-connected machine, copy the NAS authorization file:
/etc/ds411p2pwd. Set permissions to u=rw,go=. Repeat for ~/.ds411p2pwd.

Set up NAS mounts
As root, edit /etc/fstab and add these lines, substituting your username for {me}:

//ds411p2/video /mnt/ds411p2-public-video cifs vers=1.0,rw,suid,gid=ds411p2,credentials=/etc/ds411p2pwd 0 0
//ds411p2/music /mnt/ds411p2-public-music cifs vers=1.0,rw,suid,gid=ds411p2,credentials=/etc/ds411p2pwd 0 0
//ds411p2/photo /mnt/ds411p2-public-photo cifs vers=1.0,rw,suid,gid=ds411p2,credentials=/etc/ds411p2pwd 0 0

//ds411p2/home /home/{me}/ds411p2 cifs vers=1.0,user,uid={me},gid={me},rw,suid,credentials=/home/{me}/.ds411p2pwd 0 0
//ds411p2/video /home/{me}/ds411p2-public-video cifs vers=1.0,user,uid={me},gid={me},rw,suid,credentials=/home/{me}/.ds411p2pwd 0 0

Note the option vers=1.0 is newly required for Ubuntu 18.04 and the DS411+II NAS.
As root, create the above directories in /mnt. You can (as root) mount them now.

Add support for the fingerprint reader:
sudo apt install libpam-fprintd
Register your fingerprint (run as user, not root):
Set sudo to use fingerprint scanner:
sudo pam-auth-update

Install Dot Files

Install xsane

Set up HP LaserJet MFP M477fdn with hp-setup


Comments (0)


Local network DNS on Linux

From within a local network, you have to use hostname.local rather than hostname for name resolution to work.


Comments (0)


Meld Window Does Not Appear on macOS Mojave

When running Meld on macOS Mojave, the Meld window will sometimes fail to appear.  The menu is there, but not the window.  Once this happens, it will stay broken until some saved state files are deleted:
rm -rf ~/Library/Saved\ Application\ State/org.gnome.meld.savedState/

The kludgey fix is to have the Meld start-up script do this for you. Add that line to /usr/local/Caskroom/meld/3.19.2-r6,osx-15/meld.wrapper.sh right before
exec '/Applications/Meld.app/Contents/MacOS/Meld' "$@"

Source: https://github.com/yousseb/meld/issues/70


Comments (0)


NVidia GeForce GTX 750 Ubuntu Drivers (again)

The proprietary NVidia drivers for the GeForce GTX 750 are acting up again. Here’s the fix:

First verify that the wrong driver is in use:

lspci -nnk | grep -iA2 vga
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107 [GeForce GTX 750] [10de:1381] (rev a2) 
    Subsystem: Micro-Star International Co., Ltd. [MSI] GM107 [GeForce GTX 750] [1462:3101]
    Kernel driver in use: nvidia

You should see nvidia as the kernel driver.  If you’re here, you probably see nouveau and maybe a few others.  Nouveau doesn’t work right with the GTX 750 and never has (and probably never will).

Download the NVidia 64-bit Linux driver.  At the time of this writing, it’s at https://www.geforce.com/drivers/results/145182

Install the driver. This is a two step process because the Nouveau driver is likely loaded by initramfs and needs to be removed. This requires a reboot.

sudo service lightdm stop
sudo sh ./NVIDIA*         # This is the driver you just downloaded
sudo update-initramfs -u  # purge nouveau driver from initramfs
sudo reboot

If your graphics are running at the right resolution, you can stop here.  If not, continue:

sudo service lightdm stop
sudo sh ./NVIDIA*
sudo service lightdm start

Source:  https://askubuntu.com/questions/823304/ubuntu-16-04-nvidia-driver-works-until-reboot


Comments (0)


Pairing Bose QuietComfort 35 series II headphones with Ubuntu 16.04

  1. Turn off smartphone’s Bluetooth if headphones are connected to it.
  2. On headphones, hold Bluetooth slider forward until headphones reply “Ready to connect”.
  3. On the computer, go to System Settings > Bluetooth.
  4. Select + to add a device.
  5. Select “Bose QC35 II”. Leave PIN options as they are.
  6. Go to System Settings > Sound
  7. Select Output tab.
  8. On “Play sound through”, choose Headphone – Bose QC35 II.
  9. Change Mode to High Fidelity Playback (A2DP Sink).


Comments (0)


Bluetooth on Ubuntu 16.04

I tried to pair headphones to my Ubuntu desktop and couldn’t do it because Bluetooth refused to turn on. My first instinct was to check if Bluetooth was disabled in BIOS, but this Lenovo K450 doesn’t have that option. Here’s how it was fixed:

System Settings > Bluetooth, showed Bluetooth off. Turning it on still showed “Bluetooth is disabled”.

Checking if it was software disabled checked out also:
rfkill list bluetooth
showed that it was not blocked.

Finally, I found it was disabled in the Bluetooth configuration file. To enable, edit /etc/bluetooth/main.conf and add the line:
Ask Ubuntu Reference
Then restart Bluetooth:
sudo service bluetooth restart


Comments (0)


Expanding a Mounted Root LVM Filesystem

These instructions are from https://www.rootusers.com/lvm-resize-how-to-increase-an-lvm-partition/. Note: Some output to the commands below that’s not relevant to these instructions has been removed, so your output will be different.

See capacity of current root file system:

$ df -h /
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root2   99G   82G   12G  88% /

Check size of volume group to make sure it has enough space:

$ sudo vgdisplay
  --- Volume group ---
  VG Name               ubuntu-vg
  VG Size               931.27 GiB
Alloc PE / Size 53231 / 207.93 GiB
Free PE / Size 185174 / 723.34 GiB

Check size of logical volume:

$ sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/root2
  LV Name                root2
  VG Name                ubuntu-vg
  LV Size                100.00 GiB

It has 100GB, but needs 175GB.

To expand the volume group by 75GB:

$ sudo lvextend -L+75G /dev/ubuntu-vg/root2

Check that it’s now 175GB:

$ sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/root2
  LV Name                root2
  VG Name                ubuntu-vg
  LV Size                175.00 GiB

Now expand the file system:

$ sudo resize2fs /dev/ubuntu-vg/root2

Check that it’s done:

$ df -h /
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root2  173G   93G   72G  57% /


Comments (0)


Dual Application Switchers

I have a dual monitor set up running Ubuntu 16. The goofy thing was there were two application switchers. One would be displayed on the monitor with the active window and the other would be displayed on the monitor with the cursor. If the cursor was on the same monitor as the active window, one would be on top of the other and it was difficult to tell what application would become active.
To fix this, run CompizConfig Settings Manager and uncheck “Application Switcher” in the Window Management section.


Comments (0)