Bug 1376981

Summary: Launching program/script in terminal via kde gui broken with konsole5-16.08.1
Product: [Fedora] Fedora Reporter: samoht0 <samoht0-bugzilla>
Component: kf5-kioAssignee: Daniel Vrátil <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: germano.massullo, jgrulich, kde-sig, kevin, me, praiskup, rdieter, than
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kf5-kio-5.26.0-2.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-22 00:21:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description samoht0 2016-09-17 07:19:23 UTC
Version-Release number of selected component (if applicable):

konsole5-16.08.1-1.fc24

How reproducible:

Setup a shortcut in KDE app launcher with checked Option "Start in Terminal".

OR

Use as desktop shortcut with terminal option true:

[Desktop Entry]
Comment=
Exec=/path/to/bash/script
GenericName=
Icon=
MimeType=
Name=
Path=
StartupNotify=true
Terminal=true <============ !!!
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

Actual results:

Start notification is shown, but terminal never comes up. Program/script doesn't run.

Expected results:

Program/script running and showing output in terminal.

Additional info:

Downgrade to konsole5-16.04.3-1.fc24 + konsole5-part-16.04.3-1.fc24 fixes the issue.

Maybe a side effect of this bug:
https://bugs.kde.org/show_bug.cgi?id=368596

Comment 1 Rex Dieter 2016-09-17 14:00:14 UTC
Thanks, confirmed, reported upstream,
https://bugs.kde.org/show_bug.cgi?id=368949

Comment 2 Rex Dieter 2016-09-17 14:37:27 UTC
Also related,
Regression in Konsole's handling of command line parameters
https://bugs.kde.org/show_bug.cgi?id=366793

Comment 3 Rex Dieter 2016-09-17 14:55:03 UTC
Per my comment upstream:

So, kio contains this code:

    if (d->service.terminal()) {
        KConfigGroup cg(KSharedConfig::openConfig(), "General");
        QString terminal = cg.readPathEntry("TerminalApplication", QStringLiteral("konsole"));
        if (terminal == QLatin1String("konsole")) {
            if (!d->service.path().isEmpty()) {
                terminal += " --workdir " + KShell::quoteArg(d->service.path());
            }
            terminal += QLatin1String(" -caption=%c %i %m");
        }


And konsole seems to no longer support the -caption command line option,
$ konsole  -caption="foo"
Unknown options: c, a.


One workaround we could implement (and probably upstreamable) is to patch kio to longer use the (deprecated) -caption commandline option.

Comment 4 Rex Dieter 2016-09-17 15:04:56 UTC
Yay, upstream already implemented the fix to kio as I surmised, backporting.

Comment 5 Fedora Update System 2016-09-17 16:05:34 UTC
kf5-kio-5.26.0-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4bfcb7b83a

Comment 6 samoht0 2016-09-17 22:33:53 UTC
(In reply to Rex Dieter from comment #4)
> Yay, upstream already implemented the fix to kio as I surmised, backporting.

Thanks. Will pickup patched kf5-kio and test when pushed testing.

Comment 7 Fedora Update System 2016-09-18 06:51:05 UTC
kf5-kio-5.26.0-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-4bfcb7b83a

Comment 8 samoht0 2016-09-18 12:50:24 UTC
Sadly, the patch doesn't work for me with konsole5-16.08.1-1.fc24.

I additionally recognized it causing a regression, as it breaks launching program/script in terminal with konsole5-16.04.3-1.fc24.

Downgrade to kf5-kio-5.26.0-1.fc2 + konsole5-16.04.3-1.fc24 brings behavior back to normal.

Any ideas?

Comment 9 Rex Dieter 2016-09-18 15:19:23 UTC
It fixed it for me, but I had to restart my session after installing kf5-kio-5.26.0-2 (*probably* stale kdeinit5).  Did you try testing after logout/login again?

Comment 10 samoht0 2016-09-18 18:05:54 UTC
Yes, I did logout/login, but as your feedback was positive, I did some extra testing with new shortcuts. This brought following conclusions:

Yes, it's generally fixed. But there are new restrictions about command line:

* $HOME/remaining/path don't work anymore. /home/UN must be used.
  Had $HOME in all my shortcuts.
* Command line options require now use of quotation marks "/path/to/script -opt"
  Don't know how to deal with this, when path needs quotation marks itself.

This is somewhat a regression, but I can live with this state.

Comment 11 samoht0 2016-09-18 20:30:55 UTC
Remaining regressions are likely because of KDE #366793.

Comment 12 Kevin Kofler 2016-09-19 11:53:09 UTC
> * Command line options require now use of quotation marks "/path/to/script -opt"
>   Don't know how to deal with this, when path needs quotation marks itself.

This is indeed bug #1377017 = kde#366793.

Comment 13 Fedora Update System 2016-09-22 00:21:55 UTC
kf5-kio-5.26.0-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.