Bug 356850

Summary: KDEVARTMP environment variable is ignored after upgrade from KDE 4 to 5
Product: [Unmaintained] kdelibs Reporter: Daniel Boles <db0451>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: bhush94, nate, plasma-bugs, simonandric5
Priority: NOR Keywords: regression, triaged, usability
Version: 4.14.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: ~/.config/plasma-workspace/env/kwin_env.sh (formerly in ~/.kde/env/)

Description Daniel Boles 2015-12-17 19:43:04 UTC
I previously used a .sh file in ~/.kde/env to mkdir a folder in my /tmp ramdrive and set KDEVARTMP to that folder. This resulted in KDE caching everything in RAM and seemed to have no ill effects. I have since upgraded from KDE 4 to 5, moved the .sh script to the new corresponding location - ~/.config/plasma-workspace/env - and noticed that although it is executed and the environment variable set, that variable is seemingly no longer used. KDE continues to use its default path in /var/tmp

Is this intentional and the documentation outdated, or has KDEVARTMP been deprecated, or is something else stopping this from working with the folder I designate? Thanks in advance.

Reproducible: Always

Steps to Reproduce:
1. export KDEVARTMP from a startup env script, e.g. as /tmp/KDEVARTMP (prefaced by the required mkdir so this folder exists in advance)

Actual Results:  
2. KDEVARTMP is set
3. It does not have the documented effect, i.e. changing kdecache-* directories to be placed in the KDEVARTMP path

Expected Results:  
3. kde-cache-* et al should be placed in the KDEVARTMP path as claimed in the documentation
Comment 1 Daniel Boles 2015-12-17 19:52:42 UTC
Created attachment 96155 [details]
~/.config/plasma-workspace/env/kwin_env.sh (formerly in ~/.kde/env/)

This is the script that gets run, exports the KDEVARTMP file, but does not have the previous/desired effect. chmod permissions are 755 and it's executable. /tmp is mounted as a tmpfs in RAM and previously worked fine as the path for KDEVARTMP stuff (kde-cache etc) in v4
Comment 2 David Edmundson 2015-12-20 20:53:43 UTC
KDEVARTMP won't be used, as tempdir code moved to Qt.

Looking at Qt code it seems env var TMPDIR can be used instead.

If you could update the documentation (it's a wiki) that would be very much appreciated.
Comment 3 Daniel Boles 2015-12-21 10:02:42 UTC
Thanks, David. That makes sense and is quicker than me browsing source for days to reach the same conclusion! Before I look at updating the wiki, can you advise whether any other variables therein (especially the closely related KDETMP, which I admit I haven't checked yet) have also been superseded in KDE5? That way I can cover them all.
Comment 4 Daniel Boles 2015-12-21 10:50:03 UTC
I'm away from this PC at the moment but will confirm later whether/what it currently has TMPDIR set to, and whether changing it affects the location of kdecache-* stuff. I assume/hope it will but will post back either way.
Comment 5 Daniel Boles 2015-12-22 00:24:46 UTC
nope, changing TMPDIR has no effect - it moves _other_ stuff, including kde-username, but the kde-cache-* directories remain firmly planted in /var/tmp

so this isn't really "RESOLVED" until someone stipulates either that it's no longer possible to change the location of these caches, or provides a proper way to do it (which TMPDIR isn't)

would appreciate the help arriving at a final answer for this one - thanks
Comment 6 David Edmundson 2015-12-22 18:27:00 UTC
I've double checked. Nothing in Plasma 5 / Frameworks 5 uses /var/kde-cache directories.

Can you ls those directories, it's probably some old kde4 stuff - at which point KDEVARTMP will still apply.
Comment 7 Daniel Boles 2015-12-22 18:41:18 UTC
Thanks again - good point - it does look to be v4 stuff in there. I nuked all 3 (-daniel, -root, and -kdm) dirs and only the former was recreated. After a reboot and login, it has these contents:

*+daniel@v3-771g:~$ ls /var/tmp/kdecache-daniel/
total 176328
drwx------ 2 daniel daniel     4096 Dec 22 18:36 ./
drwxrwxrwt 7 root   root       4096 Dec 22 18:36 ../
-rw-r--r-- 1 daniel daniel 10547304 Dec 22 18:36 icon-cache.kcache
-rw-r--r-- 1 daniel daniel  1221311 Dec 22 18:36 ksycoca4
-rw-r--r-- 1 daniel daniel      536 Dec 22 18:36 ksycoca4stamp
-rw------- 1 daniel daniel       48 Dec 22 18:36 Personal Calendarrc
-rw------- 1 daniel daniel      910 Dec 22 18:36 plasma-svgelements-slim-glow
-rw-r--r-- 1 daniel daniel 84377704 Dec 22 18:36 plasma_theme_internal-system-colors.kcache
-rw-r--r-- 1 daniel daniel 84377704 Dec 22 18:36 plasma_theme_slim-glow.kcache
+daniel@v3-771g:~$ 

I don't know whether these components should still be  installed? Happy to remove them if not. Also, I haven't a clue where Slim Glow is coming from, since I use Breeze as my Desktop Theme - Slim Glow rings a bell; I might've used it under v4, but it's not even presented as an option now. The only change I made to the Breeze Desktop Theme was to apply Oxygen colours - in case that's relevant to the old stuff floating around (as it was the main v4 theme).

Still, these legacy components don't seem to obey the old KDEVARTMP as otherwise I would've seen kdecache-daniel being recreated in /tmp on prior logins, but it always went into /var/tmp

Thanks!
Comment 8 Nate Graham 2017-11-28 21:51:40 UTC
Is there a bug left to fix here, or can we close this?
Comment 9 Andrew Crouthamel 2018-09-28 03:35:05 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Andrew Crouthamel 2018-10-29 02:06:49 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!