<div dir="ltr"><div>How can I open with shell script if "open in terminal" is not supported?<br></div>For some scripts I need them just to run, for others I need to have the terminal window open after finishing to be able to review errors and warnings<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best regards, <br></div></div></div></div>
<br><div class="gmail_quote">On Wed, May 17, 2017 at 2:55 PM, Maik Qualmann <span dir="ltr"><<a href="mailto:metzpinguin@gmail.com" target="_blank">metzpinguin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, is fixed, script is now running. We not support the function: open in the<br>
terminal from the *.desktop file.<br>
<br>
Maik<br>
<br>
On Mittwoch, 17. Mai 2017 22:43:02 CEST Gilles Caulier wrote:<br>
> Maik,<br>
><br>
> So the file #379956 is fixed ?<br>
><br>
> Gilles<br>
><br>
> 2017-05-17 21:37 GMT+02:00 Maik Qualmann <<a href="mailto:metzpinguin@gmail.com">metzpinguin@gmail.com</a>>:<br>
> > Problem is now fixed for digiKam-5.6.0, the script is running. The quotes<br>
> > in the command line were the problem. Another thing is, we do not support<br>
> > the function open in the terminal.<br>
> ><br>
> > Maik<br>
> ><br>
> > On Mittwoch, 17. Mai 2017 20:54:07 CEST <a href="mailto:aegoreev@gmail.com">aegoreev@gmail.com</a> wrote:<br>
> >> Sorry I made a mistake in the test.sh. Here is the correct code:<br>
> >><br>
> >> ----beginning of the code---<br>
> >> #!/usr/bin/env bash<br>
> >> for FILE in "$@"; do<br>
> >> echo "File is "$FILE" "<br>
> >> done<br>
> >> ----end of the code----<br>
> >><br>
> >> On Wednesday, May 17, 2017 12:52:01 PM MDT you wrote:<br>
> >> > To reproduce the issue you can creat a test script test.sh and make it<br>
> >> > executable:<br>
> >> > ----beginning of the code---<br>
> >> > #!/usr/bin/env bash<br>
> >> > for file in "$@"; do<br>
> >> > echo "File is "$@" "<br>
> >> > done<br>
> >> > ----end of the code----<br>
> >> ><br>
> >> > then create test.desktop file, copy it to<br>
> >> > $HOME/.local/share/<wbr>applications/<br>
> >> > and make executable.<br>
> >> ><br>
> >> > ---beginning of the code----<br>
> >> > [Desktop Entry]<br>
> >> > Categories=AudioVideo;Video;<br>
> >> > Comment=Test<br>
> >> > Exec="/PATH/TO/test.sh" %F<br>
> >> > GenericName=Test<br>
> >> > Icon=<br>
> >> > MimeType=video/x-msvideo;<wbr>video/quicktime;video/mpeg;<wbr>video/mp4;<br>
> >> > Name=Test<br>
> >> > NoDisplay=false<br>
> >> > Path=<br>
> >> > StartupNotify=true<br>
> >> > Terminal=true<br>
> >> > TerminalOptions=\s--noclose<br>
> >> > Type=Application<br>
> >> > Version=1.0<br>
> >> > X-DBUS-ServiceName=<br>
> >> > X-DBUS-StartupType=none<br>
> >> > X-KDE-SubstituteUID=false<br>
> >> > X-KDE-Username=<br>
> >> > ----end of the code----<br>
> >> ><br>
> >> > Then open Dolphin - select few video files - open with - Test<br>
> >> > which will work.<br>
> >> ><br>
> >> > Then open digiKam - select few video files - open with - Test<br>
> >> > it won't work.<br>
> >> ><br>
> >> > On Wednesday, May 17, 2017 12:32:34 PM MDT you wrote:<br>
> >> > > Gilles,<br>
> >> > > No I am not using the appimage.<br>
> >> > > In fact, Open With - "VLC media player" works.<br>
> >> > > Only shell scipts seem to have the issue.<br>
> >> > ><br>
> >> > > On Wednesday, May 17, 2017 12:20:25 PM MDT Gilles Caulier wrote:<br>
> >> > > > Did you use AppImage ? If yes, it's know that KService and KIO are<br>
> >> > > > definitively complex to run due to plenty runtime dependencies...<br>
> >> > > ><br>
> >> > > > The open With use these frameworks in background, and personalty<br>
> >> > > > the<br>
> >> > > > design of these comopents is bad and not adapted to bundle<br>
> >> > > > application. This include also MAcOS and Windows (OpenWith support<br>
> >> > > > is<br>
> >> > > > disabled while compilation for these OS.)<br>
> >> > > ><br>
> >> > > > Gilles Caulier<br>
> >> > > ><br>
> >> > > > 2017-05-17 20:07 GMT+02:00 <<a href="mailto:aegoreev@gmail.com">aegoreev@gmail.com</a>>:<br>
> >> > > > > I execute "/path/to/script.sh" %F when open with scipt.<br>
> >> > > > > Maybe digikam does not pass selected files as %F ?<br>
> >> > > > > However if I drag selected files from digikam and drop them in<br>
> >> > > > > terminal<br>
> >> > > > > as<br>
> >> > > > > "paste location" I do get /PATH/TO/FILE1 /PATH/TO/FILE2 etc.<br>
> >> > > > > ...<br>
> >> > > > ><br>
> >> > > > > On Wednesday, May 17, 2017 11:55:22 AM MDT you wrote:<br>
> >> > > > >> Hello,<br>
> >> > > > >> I have added few bash scripts to the system "Open with" menu.<br>
> >> > > > >> Normally I select files - right click - "open with" - select the<br>
> >> > > > >> script.<br>
> >> > > > >> Everything works just fine from my file manager (dolphin) but it<br>
> >> > > > >> is<br>
> >> > > > >> not<br>
> >> > > > >> working from digikam.<br>
> >> > > > >> Any ideas on why is this happening?<br>
> >> > > > >><br>
> >> > > > >> Thanks,<br>
> >> > > > >> AG<br>
> ><br>
> > --<br>
<br>
</blockquote></div><br></div>