[kstart] [Bug 456589] New: kstart5 fails to launch applications when arguments supplied

Lukas Sabota bugzilla_noreply at kde.org
Mon Jul 11 15:15:10 BST 2022


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

            Bug ID: 456589
           Summary: kstart5 fails to launch applications when arguments
                    supplied
           Product: kstart
           Version: 5.25.2
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: lukas at lwsabota.com
  Target Milestone: ---

SUMMARY
kstart5 is no longer able to start applications when arguments are supplied. 
See the below example:

    $ kstart5 konsole -e top   
    kstart: Unknown option 'e'.

Here's an attempt to quote the entire command on the command-line:

    $ kstart5 'konsole -e top'
    Omitting both --window and --windowclass arguments is not recommended
    kf.kio.gui: Could not find an executable named: "konsole -e top"
    QObject::connect(KProcessRunner, KJob): invalid nullptr parameter
    QObject::connect(KProcessRunner, KJob): invalid nullptr parameter

This seems to affect kglobalaccel5 as well when launching .desktop files that
contain commands with arguments.  Here is an example of a .desktop file that
can no longer be launched with a kglobalaccel shortcut key:

$ cat ~/.local/share/applications/rofi-run.desktop

[Desktop Entry]
Categories=Utility;
Comment=Dmenu replacement to run applications
Exec=rofi -show run %u
Keywords=Terminal
Name=rofi-run
NoDisplay=false
Terminal=false
Type=Application
Version=1.0

When I press the shortcut associated with this desktop entry, the application
is not launched and the following error message is displayed in the user
journal:

Jul 11 09:51:25 myhostname kglobalaccel5[23085]: kstart: Unknown options: s, o,
w.

This error messages matches the output of attempting to run the command in the
desktop file with kstart5:

$ kstart5 rofi -show run  
kstart: Unknown options: s, o, w

However, the desktop file can be run through kstart5 by using the --application
flag:

$ kstart5 --application rofi-run                       
Omitting both --window and --windowclass arguments is not recommended
24849

I'm not privy to the internals of how kglobalaccel and kstart5 communicate with
one another, but it seems something has changed in a recent release.  I'm not
sure whether this bug should be considered in kstart5, or whether kglobalaccel
should be passing different arguments to kstart5.  Feel free to reassign this
"product" as necessary.

Let me know if there is any unclear information that I can clear up.  Thanks!

STEPS TO REPRODUCE
1. Configure a desktop file that requires multiple arguments in the Exec=
field.
2. Assign the above desktop application to a plasma custom shortcut.
3. Press the assigned key combination.

OBSERVED RESULT
The application does not start and an error message is generated in the logs

Jul 11 09:51:27 myhostname kglobalaccel5[23090]: kstart: Unknown options: s, o,
w.

EXPECTED RESULT
Expected that the application launches as configured.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.10-arch1-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION

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


More information about the Unassigned-bugs mailing list