Thanks for the hint, didier!
Just for explanation:
The deletion is a reaction to a faulty behavior of my Salix systems. The more files that accumulate in ~/.cache and /tmp, the more conspicuous things arise after booting. For example, the mouse pointer is no longer displayed, but the mouse functions are present; or the clipboard (Clipman) is empty. During shutdown, the background remains and the hardware is no longer turned off. This behavior started with Salix Xfce 14.0. In my memory, the versions 13.* showed no such behavior. Initially, I manually deleted, then added program text to rc.local_shutdown for auto-help and testing. The testing is very time consuming and for lack of time I could not test everything and that's why it stayed with the extinguishing process. Why I came to deleting files, I do not remember today. The behavior occurs on two different Fujitsu-Siemens Esprimo (nVIDIA and SiS). Both have had their power supplies, hard drives and memory replaced for other reasons. That did not affect the behavior. Maybe it's the swapper or file system or Xfce or it's a shutdown error. I dont know.
The script checks if the unwanted files and directories (as below) are older than the current OS session and deletes them if necessary. Thus, the difficulties no longer occur.
Code: Select all
# directories from each user home hdlist=( # .cache/midori/adblock .cache/midori/thumbnails .cache/midori/web .cache/mozilla/firefox/pb5qbs4e.default/cache2/entries .cache/mozilla/firefox/pb5qbs4e.default/safebrowsing .cache/mozilla/firefox/pb5qbs4e.default/startupCache .cache/mozilla/firefox/pb5qbs4e.default/thumbnails # .cache/sessions .thumbnails/normal ) # directories from /tmp tdlist=( /tmp/.ICE-unix /tmp/gpg-* /tmp/icedteaplugin-* # /tmp/ssh-* ) # files from /tmp tflist=( /tmp/*.part # /tmp/.xfsm-ICE-* )