Bug 495412

Summary: Cannot remove environment variables with startup scripts
Product: [Plasma] plasmashell Reporter: dantmnf <dantmnf2+kdebugs>
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: kde, nate
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description dantmnf 2024-10-27 06:57:50 UTC
SUMMARY
`unset` in startup script does not work as expected.

STEPS TO REPRODUCE
1. set a environment variable in /etc/environment (e.g. `UNSET_ME=foo`)
2. unset it in $HOME/.config/plasma-workspace/env/foo.sh (`unset UNSET_ME`)

OBSERVED RESULT
The environment variable `UNSET_ME` is still available in plasma session.

EXPECTED RESULT
The environment variable `UNSET_ME` is not set in plasma session.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 6.12.0-rc4-1-mainline (64-bit)
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2024-10-28 02:29:56 UTC
Indeed, this isn't how it works.