Export and share photos with digiKam
Exporting Photos to Remote Hosts
The KioExportImport plugin allows digiKam to access files, websites, and remote hosts using KDE's KIO library (Figure 4). In practical terms, this plugin can be used to export photos directly from digiKam to remote machines via supported protocols (FISH, FTP, SFTP, SMB, and many others). This functionality can come in handy not only for off-site backup but also for publishing photos with web applications that are not directly supported by digiKam.
For example, if you happen to use Mejiro [2], cobbled together by yours truly, you can use the KioExportImport plugin to upload photos to the application. To do this, select the photos you want to upload and choose Export | Export to remote computer (Figure 4). Enter the URL to the remote destination directory, which should look something like the following (replace 127.0.0.1 with the actual domain name or IP address of the machine running Mejiro):
fish://127.0.0.1/var/www/mejiro/photos
To transfer the selected photos now, hit the Start export button.
digikamWebUi
As a desktop application, digiKam doesn't provide functionality for accessing the entire photo library via the web. The digikamWebUi [3] software fills this void by adding a web interface that allows you to view and manage photos in digiKam albums using nothing but a browser.
Although digikamWebUi is easy to use, deploying the application requires some manual work. The following installation instructions assume that you're deploying digikamWebUi on the same machine running digiKam, where all photos and digiKam databases are stored in the /home/user/photos
directory. The machine itself runs Debian or Ubuntu (or any of their derivatives).
digikamWebUi runs on the Apache/PHP/SQLite stack, so the first step is to install the required components:
sudo install apache2 php5 php5-sqlite sqlite3 git
The next step is to install and configure the CakePHP framework that powers digikamWebUi. Switch to the /var/www
directory and download the current release of CakePHP using the following commands, replacing x.x.x.tar.gz with the actual version number of the latest CakePHP release. You can check the latest version number at https://github.com/cakephp/cakephp/releases:
cd /var/www sudo wget https://github.com/cakephp/cakephp/archive/x.x.x.tar.gz
Unpack the downloaded archive and rename the resulting directory cakephp
:
sudo tar xzvf x.x.x.tar.gz sudo mv x.x.x cakephp
Make cakephp
writable by the server using the sudo chown -R www-data cakephp/
command, open the /var/www/cakephp/app/Config/core.php
file for editing, and change the default value of the Security.salt
parameter to a string consisting of 63 random alphanumeric characters (you can use the https://www.grc.com/passwords.htm page to generate a random string). Next, set the Security.cipherSeed
parameter to a different 29-number random value.
Now open the default file with sudo nano /etc/apache2/sites-enabled/000-default
for editing and locate the following fragment:
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory>
Change the AllowOverride None
command to AllowOverride All
and save the file; then, enable the mod_rewrite
Apache module:
sudo a2enmod rewrite sudo /etc/init.d/apache2 restart
Now you are ready to install digikamWebUi. Make sure that you are still in the /var/www
directory and clone the project's repository:
sudo git clone https://github.com/mehdilauters/digikamWebUi.git digikamwebui
Open the database file for editing with sudo nano digikamwebui/app/Config/database.php
and add the database connection profiles shown in Listing 1.
Listing 1
Database Connection Profiles
Next, switch to the /home/user/photos
directory and create the digikamWebUi.db
SQLite database using the supplied digikamWebUi.sql
file:
cd ~/photos sqlite3 digikamWebUi.db < /var/www/digikamwebui/app/Config/Schema/digikamWebUi.sql
It's important that the created database has the same permissions as the /photos
directory, so use the chmod 777 -R ~/photos
command to apply the same permissions to the directory and all the files in it.
Finally, open the /var/www/digikamwebui/app/Config/core.php
file for editing and change Configure::write('debug', 2);
to Configure::write('debug', 0);
to disable debugging messages.
Point the browser to http://127.0.0.1/digikamwebui/users/add and add a new user. Once you've done that, go to http://127.0.0.1/digikamwebui/users/login, log in using the specified credentials, and you should see digikamWebUi in all its beauty (Figure 5).
digikamWebUi's interface is divided into three columns. The Albums column to the left shows a hierarchical list of all albums in digiKam, and you can switch to a specific album by clicking on its name. When processing the digiKam library, digikamWebUi parses tags found in photos and lists them in the Tags column to the right. As you would expect, clicking on a tag shows all photos containing the tag. The middle column shows thumbnails of photos in the currently selected album or photos containing a specific tag. To view a larger version of a photo, click on its thumbnail.
Commands under each photo can be used to perform common operations, such as deleting, rotating, and rating the photo. Choosing Edit opens the photo editing page. Here, you can edit the photo's name, assign tags, and move the photo to a different album. Using digikamWebUi, you can display photos as a slideshow and view them on the map (Figure 6). The latter feature can be used not only to show photo thumbnails on the map but also to travel in time using the timeline slider at the top.
When using digikamWebUi, keep in mind that it needs to cache files when it accesses digiKam albums for the first time. That means it can be pretty slow in the beginning. digikamWebUi is still rough around the edges, but if you need to access and manage your digiKam albums via the web, this is the tool you need.
Final Word
Although digiKam is first and foremost a desktop application, it features export capabilities that can be used to push photos to a variety of popular photo-sharing and file storage services. Additionally, if you need to access your digiKam library via the web, digikamWebUi has you covered.
Infos
- Wikimedia Commons: http://commons.wikimedia.org
- Mejiro: http://dmpop.github.io/mejiro
- digikamWebUi: http://github.com/mehdilauters/digikamWebUi
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.