A right-click on an album should offer the option to open the album in a terminal, the same way as it offers to open the album in a file manager. Some old discussions in https://bugs.kde.org/show_bug.cgi?id=158507 According to https://bugs.kde.org/show_bug.cgi?id=322117, this was once available? Was this functionality removed?
This feature have been removed because the quick way to provide the functionality through KF5 is not portable and rely to KIO which is not portable.
Is is a pity that the functionality of digikam has to suffer due to portability. would you accept a patch with conditional compiler directives such that KIO code is only compiled if the target is KDE?
To be honest, we need a better solution, more portable. KIO will work only with Plasma desktop. What's about Gnome and other plenty desktop under Linux ? KIO is not only a simple shared libs, there are many run-time dependencies which make an unsolvable puzzle. I know, i tried to embed KIO in digiKam Appimage, and after one week, i left the idea. It's impossible... So typically, a solution to start a simple terminal opening the current selected album is the right way. Remember : MacOS which has a BSD terminal, and Windows with the older CMD MSDOS like terminal... Gilles Caulier
I investigated a bit the problem of launching a terminal cross platform The following code snippet allows to handle the case of KDE, but it should be easy to extend it for various desktop environments. I just guessed the values for GNOME, I didn't test for GNOME QByteArray env = qgetenv("XDG_CURRENT_DESKTOP"); QString desktopEnvironment = QString::fromLocal8Bit(env.data()); QMap<QString, QString> terminals; terminals["KDE"] = "konsole"; terminals["GNOME"] = "gnome-shell"; terminals["WINDOWS"] = "cmd.exe"; if (terminals.contains(desktopEnvironment)) { QProcess *process = new QProcess(this); QString terminal = terminals[desktopEnvironment]; QString folder = "/share/pictures"; process->setWorkingDirectory(folder); process->start(terminal); } While getting the current platform (linux/win/osx) seems straight forward with either QSysInfo or https://wiki.qt.io/Get_OS_name, it is tricky to get the desktop environment, but it is still feasible w/o too much hassle: https://stackoverflow.com/questions/47022134/how-can-i-find-out-at-runtime-which-desktop-environment-that-a-qt-application Remember, if the terminal is not available, the option is just disabled. It doesn't have to exist for every exotic desktop environment what do you think?
This first approach sound acceptable. Look also the Qtbase approach, even if it use a wrong way with KDE and KIO, and it's a little bit complicated. At least all most important cases are processed, and it must work with MacOS: https://github.com/qt/qtbase/blob/5.11/src/platformsupport/services/genericunix/qgenericunixservices.cpp#L78 You can certainly take few ideas from this code. Gilles Caulier