Bug 493907

Summary: Properties dialog silently encloses arguments containing variables in quotations, breaking variable expansion
Product: [Frameworks and Libraries] frameworks-kio Reporter: Steve Vialle <steve_v>
Component: Properties dialogAssignee: KIO Bugs <kio-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: kdelibs-bugs-null, nate, nicolas.fella
Priority: NOR    
Version First Reported In: 6.5.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Steve Vialle 2024-10-01 10:16:57 UTC
SUMMARY
Using daemon+cdemu as an example:

Args entered in autostart kcm "application arguments" (.desktop file properties editor):
--bind --respawn --pidfiles=$XDG_RUNTIME_DIR --name=cdemu /usr/bin/cdemu-daemon

Displayed after closing/saving entry and reopening:
--bind --respawn '--pidfiles=$XDG_RUNTIME_DIR' --name=cdemu /usr/bin/cdemu-daemon

Resulting arguments from 'ps':
--bind --respawn --pidfiles=$XDG_RUNTIME_DIR --name=cdemu /usr/bin/cdemu-daemon

Manually edited .desktop file:
--bind --respawn --pidfiles=$XDG_RUNTIME_DIR --name=cdemu /usr/bin/cdemu-daemon

Resulting arguments from 'ps':
--bind --respawn --pidfiles=/run/user/1004 --name=cdemu /usr/bin/cdemu-daemon

STEPS TO REPRODUCE
1. Add an argument containing a variable expansion to an autostart .desktop file using the properties editor in the autostart kcm.
2. Observe generated .desktop file and resulting command-line executed during plasma startup.

OBSERVED RESULT
.desktop properties editor silently adds single quotes when saving file.

EXPECTED RESULT
.desktop properties editor does what I tell it to, and doesn't silently "correct" arguments containing variable expansions.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.6.51-gentoo-dist (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION