Bug 460804 - Modifying Execution Command of a Desktop File Causes Error Unable to Find Application
Summary: Modifying Execution Command of a Desktop File Causes Error Unable to Find App...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.26.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-21 13:40 UTC by Sam Duan
Modified: 2022-10-21 14:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
The error given out. (In simplified Chinese) (50.18 KB, image/png)
2022-10-21 13:40 UTC, Sam Duan
Details
The modified desktop file. Notice the quotes in the Exec line. (462 bytes, application/x-desktop)
2022-10-21 13:41 UTC, Sam Duan
Details
This is what is shown in kmenuedit if I delete the quotes in the desktop file. (150.98 KB, image/png)
2022-10-21 14:14 UTC, Sam Duan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Duan 2022-10-21 13:40:26 UTC
Created attachment 153085 [details]
The error given out. (In simplified Chinese)

SUMMARY
After modifying an application's execution command, the application refuses to start from Plasma, giving out error "Unable to find application %f" (or something like that, depends on what's filled in the Command-line arguments). Checking the actual desktop file can we see a pair of single quotation marks are added excluding the argument. Deleting the marks makes the application executable from Plasma.


STEPS TO REPRODUCE
1. Start kmenuedit, 
2. Pick a program and modify its execution command (the option "Program"),
3. Save,
4. Run the application from Plasma.

OBSERVED RESULT
The app refuses to start, giving out error "Unable to find application %f".

EXPECTED RESULT
The app would start normally.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed 20221019
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Pictures of the error given in simplified Chinese and the modified desktop file are attached.
Comment 1 Sam Duan 2022-10-21 13:41:37 UTC
Created attachment 153086 [details]
The modified desktop file. Notice the quotes in the Exec line.
Comment 2 Fushan Wen 2022-10-21 14:09:40 UTC
You should probably use 

Program: env

Command-Line Arguments: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia kicad %f
Comment 3 Sam Duan 2022-10-21 14:12:01 UTC
(In reply to Fushan Wen from comment #2)
> You should probably use 
> 
> Program: env
> 
> Command-Line Arguments: __NV_PRIME_RENDER_OFFLOAD=1
> __GLX_VENDOR_LIBRARY_NAME=nvidia kicad %f

Tested just now. Still not working.
Comment 4 Sam Duan 2022-10-21 14:14:14 UTC
Created attachment 153087 [details]
This is what is shown in kmenuedit if I delete the quotes in the desktop file.
Comment 5 Fushan Wen 2022-10-21 14:38:26 UTC
Works here, need more people to confirm it.

https://fars.ee/jgFR.png