Saving Adobe Lightroom catalogs to network drives on Windows

Adobe Lightroom will not allow you to save catalogs to network drives by design. The following commands allow you to circumvent this limitation on Windows:

C:\> mklink /D H_mapping \\your_server\hugo
symbolic link created for H_mapping <<===>> \\your_server\hugo

C:\>mklink /J H_mapping_junction  H_mapping
Junction created for H_mapping_junction <<===>> H_mapping

Then you can save your Lightroom catalog in C:\H_mapping_junction. You need to run these commands with Administrator rights.

Tune Emacs binding for beancount

For editing beancount files there is an Emacs minor mode available. I find it useful and a quicker interface to use than Fava (which is already great).

I did feel that the most important command is not fast enough to reach (beancount-insert-account; bound to C-c '). The following command can be used in your init or .spacemacs to bind the insertion of accounts to C-c C-c as well:

(eval-after-load 'beancount '(define-key beancount-mode-map (kbd "C-c C-c") 'beancount-insert-account))

Opening OneNote links in Org-Mode

When adding OneNote URLs in an Org file on Windows, Org-Mode doesn’t know how to open these links. Add the below to your Emacs config and you can click the links. (Based on an earlier online example on opening Outlook URLs.)

(org-add-link-type "onenote" 'org-onenote-open) (
  defun org-onenote-open (link) "Open the OneNote item identified by the unique OneNote URL." 
    (w32-shell-execute "open" "C:\\Program Files\\Microsoft Office\\root\\Office16\\ONENOTE.exe" (concat "/hyperlink " "onenote:" (shell-quote-argument link))
))

Notes on bacula and vchanger

I’ve recently been experimenting with using bacula and vchanger to push data from a NAS to spare hard disks as a form of “tape backup”.

The tutorial at revpol.com is a nice tutorial to follow. It proposes to use autofs to automatically mount encrypted disks when they are connected to the system. While this worked fine, I found that I wasn’t achieving expected write speeds.

I was seeing performance like:

Which is far below what USB 3.0 can carry.

It turned out after some debugging that autofs was the culprit. With autofs disabled, the results were more in line with expectations:

Set-up: Ubuntu 18.04 LTS, USB3.0 HD dock, old WD Blue 5400rpm disk.

Steps to use systemd automount

The way that systemd shows the mount directory even if the disk is not mounted is different from autofs. Therefore, in your vchanger magazine line in vchanger.conf, it is recommended to make use of a subdirectory, e.g.:

magazine = "/mnt/vchanger/9140c104-9ddd-451d-b933-fe1df02e1234/data"

In your /etc/fstab you will need something like:

/dev/disk/by-uuid/9140c104-9ddd-451d-b933-fe1df02e1234 /mnt/vchanger/0707a287-c2d5-4512-8fd2-b0dad2094b61 btrfs defaults,compress=lzo,noauto,x-systemd.automount,x-systemd.idle-timeout=10,x-systemd.device-timeout=0.1s,x-systemd.mount-timeout=10

Important flags used:

  • x-systemd.automount,x-systemd.idle-timeout=10: when the disk has been unused for 10 seconds, unmount the disk (same as in autofs);
  • x-systemd.device-timeout=0.1s: systemd will block any operations on the target mount directory until this timeout expires. Therefore, it is recommended to set this to a low value, especially if you have many magazines.

I’ve used btrfs for its data corruption detection capabilities, but the filesystem chosen is of course irrelevant for the automounting.

Whenever making changes to the /etc/fstab in this manner, run these commands to have the settings take effect:

systemctl daemon-reload
systemctl restart local-fs.target

 

Status of OneNote compatibility Linux (wine/CrossOver)

While both wine and CrossOver have claimed support for Microsoft Office running on Linux, the reality is more mixed and depends on your definition of what is included in Office.

Yes, the core applications Microsoft Word, Excel and PowerPoint work. But in my interpretation, Microsoft OneNote is also definitely part of the Office suite and support for OneNote is unfortunately still very limited. My experience with OneNote under Linux is as follows.

OneNote 2013 installation bug on wine (is now fixed).
Version Status 
Compatability
OneNote 2016 Limited It will install and run, but it will not allow you to use notebooks stored on SharePoint servers or on OneDrive. Collaboration is therefore limited and you can only use locally stored notebooks.
OneNote 2013 Limited It will install and run, but it will not allow you to use notebooks stored on SharePoint servers or on OneDrive. Collaboration is therefore limited and you can only use locally stored notebooks.
OneNote 2010 Limited It will install and run, but it will not allow you to use notebooks stored on SharePoint servers or on OneDrive. Collaboration is therefore limited and you can only use locally stored notebooks.

Update Dec. 2019:  updated the table to reflect that OneNote 2013 and 2016 will now actually start, as announced here. I’ve also tried anbox as seen below.

Anbox is an android container environment for Linux. Therefore, it can also run the free OneNote app that Microsoft publishes in the Google Play Store.

Installation of Anbox is simple (I used the instructions on the ArchLinux wiki, but there is also a snap package). If you install the version that includes the Google Play Store, then you can easily install the free OneNote app:

My experience was, however, that it’s not yet a replacement:

  • Typing is not instantaneous
  • The app crashes often

I did not yet fully test copy pasting functionality (plain, HTML, images).