Bug 496529 - Unset environment variables are correctly saved, but incorrectly parsed when viewing entry
Summary: Unset environment variables are correctly saved, but incorrectly parsed when ...
Status: CONFIRMED
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.1.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-21 07:49 UTC by pcmaniaks_spam
Modified: 2024-11-30 22:06 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pcmaniaks_spam 2024-11-21 07:49:07 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY


STEPS TO REPRODUCE
1. Edit a menu entry.
2. Type "-u VARIABLE_NAME" in "Environment Variables" field.
3. Type "program" in "Program" field.
4. Type "agruments" in "Arguments" field.
5. Save entry.
6. Switch to a different menu entry, then switch back to the newly created entry.

OBSERVED RESULT
"Environment Variables" field is empty, "Program" field contains "-u", "Command-Line Arguments" field contains "VARIABLE_NAME program arguments". If saved again at this point, the menu entry will stop working (ie. the program will not launch).

EXPECTED RESULT
"Environment Variables" field should contain "-u VARIABLE_NAME", "Program" field should contains "program", "Command-Line Arguments" should contain "arguments".

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
After doing steps 1-5, the menu entry itself is saved correctly; in this case, in the .desktop file there's "Exec=env -u TEST program arguments". When editing such menu entry and saving incorrectly parsed values, it breaks and is saved as "Exec=-u TEST program arguments".
Comment 1 John Kizer 2024-11-25 19:50:34 UTC
I can reproduce this on version 6.2.3.

It is worth noting that clicking "Save" alone after viewing the incorrectly parsed entry didn't overwrite with an incorrect Exec= line for me - I needed to make an edit the incorrect entry without fixing it in order for the incorrect line to be written.