Table of Contents
Use Web GUI or CLI to create a new jail according to your liking.
I’m going to do it via Web GUI with
NAT Port Forwarding enabled.
I’ll also add a port mapping for ssh from jail’s tcp port
22 to host’s
Connect to the newly created jail so we can fetch and extract ports:
iocage console digikam portsnap fetch portsnap extract
At this point, it might be worth to install
xauth which will be required to start
digikam via ssh with X11 Forwarding enabled and
vim to edit few config files.
pkg install xauth vim
Now, the meaty part.
You can follow the official freshports installation instructions for digikam :
cd /usr/ports/graphics/digikam/ && make install clean
But this process will take ages as you will be prompted multiple times for build options for all digikam’s dependencies and later on it will take ages to compile all of them.
To save yourself that trouble you can generate a list of digikam’s dependencies and
install them with
cd /usr/ports/graphics/digikam/ pkg install `make all-depends-list | cut -d / -f 4,5`
If you’ll get an error saying that following packages couldn’t be found:
Save the list of all (700+) dependencies in a sorted file:
make all-depends-list | cut -d / -f 4,5 | sort > reqs
and remove missing ones from
Finally, install the dependencies with:
pkg install `cat reqs`
We can finally build and install
make install clean
digikam user with
Remember to set
GID to same value as the account you normally use to manage your photos.
In my case it’s
# adduser Username: digikam Full name: digikam Uid (Leave empty for default): 1001 Login group [digikam]: Login group is digikam. Invite digikam into other groups? : Login class [default]: Shell (sh csh tcsh bash rbash git-shell nologin) [sh]: bash Home directory [/home/digikam]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: Use a random password? (yes/no) [no]: Enter password: Enter password again: Lock out the account after creation? [no]: Username : digikam Password : ***** Full Name : digikam Uid : 1001 Class : Groups : digikam Home : /home/digikam Home Mode : Shell : /usr/local/bin/bash Locked : no OK? (yes/no): yes adduser: INFO: Successfully added (digikam) to the user database. Add another user? (yes/no): no Goodbye!
You can now create a
Pictures directory as root:
mkdir /home/digikam/Pictures chown digigam:digikam /home/digikam/Pictures
or do it as
su - digikam mkdir ~/Pictures
Let’s start with editing
ssh daemon configuration
Here’s an example config that enables
X11 Forwarding and password-less login:
AcceptEnv LANG LC_* AllowUsers digikam AuthorizedKeysFile .ssh/authorized_keys ChallengeResponseAuthentication no PermitRootLogin no Port 22 PrintMotd yes Subsystem sftp /usr/libexec/sftp-server UsePAM yes X11Forwarding yes
We can now enable
ssh by adding
PS. if you don’t like IPv6 like me, turn it off:
Once done, switch to
digikam user with
su - digikam and add you public key to
Finally, exit and stop the jail so you can add a mount point via WEB GUI from your pictures
directory to newly created
~/Pictures which should be located under:
Create a new desktop file:
[Desktop Entry] Version=1.0 Type=Application Name=Digikam NAS remote Icon= ~/.icons/digikam_oxygen.svg Exec=ssh -X digikam@<YOUR_NAS_IP_OR_DOMAIN_NAME> -p 22222 digikam Comment=Digikam photo manager Categories=Photography; Terminal=false
Once saved, you should see a new entry in your application launcher.
If you’re on Gnome and the digikam launcher doesn’t show up, then restart it with:
r and hit
You should now see
Digikam NAS remote enty in your application launcher.