[konsole] [Bug 377412] konsole with -e option doesn't keep the window open anymore

Michael bugzilla_noreply at kde.org
Sat Apr 22 21:52:14 UTC 2017


https://bugs.kde.org/show_bug.cgi?id=377412

--- Comment #6 from Michael <kde at callthecomputerdoctor.com> ---
(In reply to Wolfgang Bauer from comment #3)
> PS, this should work like you expect it to, it does here with Konsole 17.04
> at least:
> konsole --noclose -e sh -c 'echo foo && sleep 3 && echo "bar" && sleep 3 &&
> echo "closing"'

Thank you for addressing this issue! Yes, adding the --noclose keeps Konsole
open, but that's a different functionality than what we had before. Allow me to
explain further.

I used to have long, one-liner scripts that were embedded in a .desktop file,
like the one I just attached. A client could click on the .desktop file and it
would create a Konsole window, run the script, log the results inside the
window, and when the script was over, Konsole would disappear. Perfect. Just as
expected. 

For example, here's the relevant line that gets executed in a .desktop file
that used to work:

Exec=konsole -e  echo ""  &&  downloads="$HOME/Downloads"  &&  echo
"Waiting..." | toilet --font term --filter border  &&  kdialog
${WINDOWID:+--attach $WINDOWID} --caption ' ' --title ' ' --inputbox "Paste a
Youtube, Vimeo, or virtually any video URL here to get the video:" "URL or
video code"  2>/dev/null  >  /tmp/yturl  &&  echo "Getting the file name from
online..." | toilet --font term --filter border  &&  {  youtube-dl
--get-filename --output "$downloads/%(title)s.%(ext)s" --batch-file /tmp/yturl 
>  /tmp/ytpath  &&  thepath="$(cat /tmp/ytpath)"  &&  echo "Downloading the
video..." | toilet --font term --filter border  &&  youtube-dl --batch-file
/tmp/yturl --newline --no-mtime --output "$thepath"  &&  qdbus 
org.freedesktop.FileManager1  /org/freedesktop/FileManager1 
org.freedesktop.FileManager1.ShowItems "$thepath" "1";  }  ||  {  size=$( wc -c
< "/tmp/yturl" )  &&  if [ $size -gt 1 ]; then  kdialog ${WINDOWID:+--attach
$WINDOWID} --caption ' ' --title ' ' --msgbox "Sorry, unable to download “$(cat
/tmp/yturl)”"  2>/dev/null; else  kdialog ${WINDOWID:+--attach $WINDOWID}
--caption ' ' --title ' ' --msgbox "Cancelled."  2>/dev/null;  fi;  }

Now this .desktop file won't work. Konsole has removed needed functionality.

I've attached the .desktop file to play with.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list