Bug 460518 - Specifying env variables is now much more obtuse compared to version 5.25
Summary: Specifying env variables is now much more obtuse compared to version 5.25
Status: RESOLVED FIXED
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: 5.26.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-16 08:23 UTC by spamless.9v5xj
Modified: 2022-11-12 13:30 UTC (History)
2 users (show)

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


Attachments
How it worked in 5.25 (2.03 MB, image/png)
2022-10-16 08:23 UTC, spamless.9v5xj
Details
How it works (doesn't work) now (768.59 KB, image/png)
2022-10-16 08:24 UTC, spamless.9v5xj
Details
How it works (doesn't work) now, p2 (589.64 KB, image/png)
2022-10-16 08:24 UTC, spamless.9v5xj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description spamless.9v5xj 2022-10-16 08:23:02 UTC
KMenuEditor 5.26 splits what was previously the "Command" textbox into a "Program" textbox and a "Command-Line Arguments" textbox. Attempting to pass an environment variable (ie trying to run a command such as "LANG=C /usr/bin/foobar" is now much more wonky, as it requires filling in 'env' for the "Program" textbox and the actual program into the "Command-Line Arguments" textbox, which isn't particularly intuitive or elegant.
Comment 1 spamless.9v5xj 2022-10-16 08:23:40 UTC
Created attachment 152878 [details]
How it worked in 5.25
Comment 2 spamless.9v5xj 2022-10-16 08:24:04 UTC
Created attachment 152879 [details]
How it works (doesn't work) now
Comment 3 spamless.9v5xj 2022-10-16 08:24:23 UTC
Created attachment 152880 [details]
How it works (doesn't work) now, p2
Comment 4 Nicolas Fella 2022-10-16 10:36:05 UTC
This was done intentionally to prevent you from entering "FOO=bar app". This is not a valid Exec line according to https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html

Quoting:
> The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments.

Your way of specifying environment variables happend to work in some places, but fails in other, so this change was done to make it explicit that this way is not supported
Comment 5 medin 2022-11-11 12:29:05 UTC
(In reply to Nicolas Fella from comment #4)
> This was done intentionally to prevent you from entering "FOO=bar app". This
> is not a valid Exec line according to
> https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html
> 
> Quoting:
> > The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments.
> 
> Your way of specifying environment variables happend to work in some places,
> but fails in other, so this change was done to make it explicit that this
> way is not supported

I happen to install the same app with different versions and formats (appimage and native) that use different config paths, how I'm supposed to specify those paths as env vars in the command line inside kmenueditor ?
Comment 6 medin 2022-11-12 13:30:52 UTC
Fixed with Bug 461315.