Summary: | Can't open a file with a shell script from digiKam | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Andrius <aegoreev> |
Component: | Usability-OpenWith | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, metzpinguin |
Priority: | NOR | ||
Version: | 5.7.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/digikam/0b6ef6e4e4d6adba5b4efe80bf4be3cc70b2ccf0 | Version Fixed In: | 5.8.0 |
Sentry Crash Report: |
Description
Andrius
2017-05-17 19:49:13 UTC
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 |