Moving hiri to /opt on Linux

It's considered a good practice in Linux to store all your third-party binary software under /opt. However, if you move your Hiri package installation there, you might run into problems whereby calendar in Hiri doesn't load. You might see lines such as these in your log:

Hmm, that's not terribly descriptive so let's see what's the problem and how to fix it.

Let's assume that you just downloaded your Hiri.tar.gz archive to $HOME/Downloads. To unpack:

tar xvzf Hiri.tar.gz

A folder hiri will be created and Hiri will work without problems if we leave it there. But since we want to follow best practices, we decide to move it to /opt:

sudo mv hiri /opt

Try to start:

/opt/hiri/hiri.sh

...and bang - the calendar doesn't load.

The problem is that all software under /opt should have root:root ownership and hiri folder is still owned by your regular user. That leads to problems when loading certain libraries that are required for the calendar. The solution is to do:

sudo chown -R root:root hiri

That will fix the problem and your calendar will start loading again. Bear in mind that you should always run Hiri as a regular user - there's no need to ever run it as a superuser (root).