I have added few bash scripts to the system "Open with" menu. Normally I select files - right click - "open with" - select the script. Everything works just fine from my file manager (dolphin) but it is not working from digikam. Any ideas on why is this happening? https://youtu.be/jT1wo0aKJuo To reproduce the issue you can create a test script test.sh and make it executable: ----beginning of the code--- #!/usr/bin/env bash for FILE in "$@"; do echo "File is "$FILE" " done ----end of the code---- then create test.desktop file, copy it to $HOME/.local/share/applications/ and make executable. ---beginning of the code---- [Desktop Entry] Categories=AudioVideo;Video; Comment=Test Exec="/PATH/TO/test.sh" %F GenericName=Test Icon= MimeType=video/x-msvideo;video/quicktime;video/mpeg;video/mp4; Name=Test NoDisplay=false Path= StartupNotify=true Terminal=true TerminalOptions=\s--noclose Type=Application Version=1.0 X-DBUS-ServiceName= X-DBUS-StartupType=none X-KDE-SubstituteUID=false X-KDE-Username= ----end of the code---- Then open Dolphin - select few video files - open with - Test which will work. Then open digiKam - select few video files - open with - Test it won't work.
I think this is fixed. I am able to open images with my script in digikam 5.6.0 appimage
Good news. Closed... Gilles Caulier
I think the issue is back in 5.7.0 pre-release bundle. I have a script that locates a selected file in a file manager: #!/usr/bin/env bash for f in "$@"; do dbus-send --session --type=method_call --dest="org.freedesktop.FileManager1" "/org/freedesktop/FileManager1" "org.freedesktop.FileManager1.ShowItems" array:string:"file:"${f}"" string:"" done exit I can open a file with the script from any application on my Mint MATE but the shortcut does not work from digiKam. digiKam - select a file - right click - open with - thescript.sh - nothing happens. If I set Terminal=true in the .desktop file (which I don't need) the terminal window being opened and closed right away. Is there a solution for this?
We use a special function to start programs. It was not possible to use KIO from KF5 under different operating systems. The option to start in the terminal is not supported. Is it possible that you open a terminal in the script? Maik
(In reply to Maik Qualmann from comment #4) > We use a special function to start programs. It was not possible to use KIO > from KF5 under different operating systems. The option to start in the > terminal is not supported. Is it possible that you open a terminal in the > script? > > Maik Maik, My plan was to run the script in the background without opening a terminal emulator. Are you saying that I have to call the terminal from the script, run the command and close the terminal ?
Maik, I played a bit more with opening files from digikam with my scripts on a non KDE machine and here is what I found so far: - for background scripts (scripts that do not need a terminal window): right click - open with - /path/to/script.sh works just fine - if you want to open a script in a terminal: right click - open with - xterm -e /path/to/script.sh works just fine (make sure xterm is installed in your system) - weird thing that the same command but with mate-terminal or gnome-terminal does not work. No arguments (%F) being passed to the script. Not sure if it is digikam related or the terminal related issue. Same command from Caja(Nautilus) works just fine.
Git commit 0b6ef6e4e4d6adba5b4efe80bf4be3cc70b2ccf0 by Maik Qualmann. Committed on 18/09/2017 at 19:57. Pushed by mqualmann into branch 'master'. add terminal support for runFiles() only for Linux systems - first search for konsole from KF5 if not exist search for xterm - full terminal options support FIXED-IN: 5.8.0 M +1 -1 app/utils/contextmenuhelper.cpp M +39 -7 libs/threadimageio/dfileoperations.cpp M +2 -3 libs/threadimageio/dfileoperations.h M +1 -1 utilities/imageeditor/editor/editorwindow.cpp M +1 -1 utilities/importui/widgets/importcontextmenu.cpp https://commits.kde.org/digikam/0b6ef6e4e4d6adba5b4efe80bf4be3cc70b2ccf0